WO2021120764A1 - 一种收发数据的方法及装置 - Google Patents

一种收发数据的方法及装置 Download PDF

Info

Publication number
WO2021120764A1
WO2021120764A1 PCT/CN2020/117403 CN2020117403W WO2021120764A1 WO 2021120764 A1 WO2021120764 A1 WO 2021120764A1 CN 2020117403 W CN2020117403 W CN 2020117403W WO 2021120764 A1 WO2021120764 A1 WO 2021120764A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
switch
sending
sending end
receiving end
Prior art date
Application number
PCT/CN2020/117403
Other languages
English (en)
French (fr)
Inventor
管紫轩
张亚丽
刘孟竹
夏寅贲
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021120764A1 publication Critical patent/WO2021120764A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/39Credit based

Definitions

  • This application relates to the field of communications, and in particular to a method and device for sending and receiving data.
  • a data center is a network that contains multiple devices (such as servers, routers, and switches) for transmitting, accelerating, computing, and storing data.
  • the device that sends data can be called the sender, and the device that receives the data can be called the receiver.
  • the receiving end receives packets from multiple sending ends, if the amount of data received per second is greater than the bandwidth of the receiving end, it may cause network congestion at the receiving end.
  • Bandwidth may refer to the number of bits that can be transmitted per second, and the unit is bit rate (bit per second, bps). The higher the bit rate, the more data is transferred per second.
  • the receiving end can store the information of each data stream of at least one sending end, and adjust the sending rate of each data stream according to the bandwidth of the receiving end, so that the sending rate of each data stream is the same, which ensures the fairness between different data streams.
  • the sum of the data rates received by the receiving end is less than or equal to the bandwidth of the receiving end to avoid network congestion at the receiving end.
  • the number of data streams also increases, which may cause the data stream information to be stored at the receiving end to exceed the storage capacity of the receiving end, so that the receiving end cannot maintain some data stream information.
  • the receiving end can send a credit mark to each sending end according to a preset time interval.
  • the credit mark is used to instruct the sending end to send data according to the preset amount of data to avoid occurrences at the receiving end. Network congestion.
  • the sending end may send data of multiple data streams to the receiving end.
  • the sending end can adjust the data volume of the sent data according to the preset data volume, so that all data streams send data at a time.
  • the sum is equal to the preset amount of data.
  • the data volume of data sent by the data stream between different sending ends may be different. In this case, it is impossible to guarantee the data between different sending ends.
  • the fairness of the data flow is possible to ensure the data between different sending ends.
  • the present application provides a method and device for sending and receiving data, which solves the problem of how to make each data stream send the same amount of data once while reducing the storage overhead of the receiving end, so as to ensure the fairness between data streams.
  • the present application provides a method for receiving data, which can be applied to a receiving end device, or the method can be applied to a communication device that can support the receiving end device to implement the method, for example, the communication device includes a chip system.
  • each indication message includes a credit mark
  • the credit mark instructs the sending end according to the first data amount Send data so that the sender sends data of M data streams to the receiver according to the M credit marks, and the receiver receives data from the sender of M data streams.
  • the data volume of each data stream in the M data streams Is the first amount of data.
  • the notification message includes the number of data streams M of the data to be sent by the first sending end, where M is an integer greater than or equal to 1.
  • the receiving end learns the number of data streams to be sent by the sending end by receiving a notification message from the sending end. Since the receiving end does not need to store the information of each data stream at the sending end, it only needs to store the number of data streams at each sending end, thereby effectively reducing the storage overhead of the receiving end.
  • the receiving end sends a credit mark to the sending end according to the number of data streams to be sent, and controls the sending rate of the sending end so that the sending end sends the data of each data stream according to the amount of data indicated by the credit mark, so that each The data volume of the data stream sent once is the same to ensure the fairness between the data streams.
  • the receiving end after the receiving end receives the notification message from the first sending end, the receiving end updates the first value according to M; or, storing M as the first value; where the first value indicates the receiving end
  • the receiving end reduces the storage overhead of the receiving end by storing the number of data streams at the sending end.
  • the notification message further includes the remaining data amount of the first sending end, the receiving end updates the second value according to the remaining data amount of the first sending end, and the second value indicates the amount of the first sending end stored by the receiving end.
  • the remaining data amount; or, the remaining data amount is stored as a second value, and the second value indicates the remaining data amount of the first sending end stored by the receiving end; the remaining data amount of the first sending end is the data to be sent from the first sending end to the receiving end The remaining amount of data. Therefore, the receiving end further determines whether it is necessary to send a credit mark to the sending end by storing the remaining data amount of the data to be sent from the sending end to the receiving end.
  • the receiving end when the received remaining data amount of the first sending end is 0, the receiving end deletes the stored information of the first sending end. Since the remaining data amount of the first sending end is 0, the receiving end does not need to send a credit mark to the first sending end. If the receiving end still schedules the first sending end, it will increase the delay for the receiving end to schedule other sending ends and send credit marks to other sending ends. Therefore, the receiving end deletes the stored information of the first sending end, which can reduce the delay for the receiving end to schedule other sending ends.
  • the receiving end receives the data from the second sending end, and determines the data volume of the data received from the second sending end; when the difference between the second data volume and the third data volume is greater than the preset data
  • the stop message is sent to the second sender when the amount of data is measured, where the stop message instructs the second sender to stop sending data, and the third data amount is determined according to the bandwidth of the receiving end and the number of data streams from multiple sending ends.
  • the two sending ends include a first sending end and a second sending end. In the case that the second sending end cannot identify the credit mark, the receiving end can count the data volume of the data from the second sending end.
  • the receiving end can send a stop message to the second sending end to instruct the second sending end to stop sending data, so as to prevent the receiving end from receiving too much data from the second sending end and causing network congestion.
  • the present application provides a method for sending data, which can be applied to a sending end device, or the method can be applied to a communication device that can support the sending end device to implement the method, for example, the communication device includes a chip system.
  • the sender sends a notification message to the receiver to inform the receiver of the number M of data streams to be sent by the sender. Then, the sender receives M indication messages from the receiver, and sends M to the receiver according to the M credit marks. Data of two data streams, the data amount of data of each data stream in the M data streams is the first data amount.
  • each of the M indication messages includes a credit mark, the credit mark instructs the sending end to send data according to the first data amount, and M is an integer greater than or equal to 1.
  • the sending end sends a notification message to the receiving end, so that the receiving end knows the number of data streams to be sent by the sending end. Since the receiving end does not need to store the information of each data stream at the sending end, it only needs to store the number of data streams at each sending end, thereby effectively reducing the storage overhead of the receiving end.
  • the receiving end sends a credit mark to the sending end according to the number of data streams to be sent, so that the sending end sends the data of each data stream according to the amount of data indicated by the credit mark, so that each data stream sends data once. The amount of data is the same, ensuring fairness between data streams.
  • the notification message further includes the remaining data volume of the sending end, and the remaining data volume of the sending end is the remaining data volume of the data to be sent from the sending end to the receiving end. Therefore, it is convenient for the receiving end to further determine whether it is necessary to send a credit mark to the sending end by storing the remaining data amount of the data to be sent from the sending end to the receiving end.
  • the method further includes: the sending end determines whether the number of credit marks of the receiving end is greater than 0; if the number of credit marks is greater than 0, the sending end sends a notification message to the receiving end. Therefore, the sending end sends the data of each data stream according to the data volume indicated by the credit mark, so that the data volume of each data stream sent once is the same, and the fairness between the data streams is guaranteed.
  • the sending end after the sending end receives M indication messages from the receiving end, the sending end updates the number of credit marks of the receiving end stored by the sending end. Therefore, the sending end sends data according to the credit mark by updating the number of credit marks in time.
  • the present application also provides a communication device, the beneficial effects of which can be referred to the description of the first aspect.
  • the communication device has the function of realizing the behavior in the method example of the first aspect described above.
  • the function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • the present application also provides a communication device, the beneficial effects of which can be referred to the description of the second aspect.
  • the communication device has the function of realizing the behavior in the method example of the second aspect described above.
  • the function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • the present application provides a communication device.
  • the communication device may be the receiving end device in the above method, or a chip set in the receiving end device.
  • the communication device includes a communication interface/interface circuit, a processor, and optionally, a memory.
  • the memory is used to store computer programs or instructions
  • the processor is coupled with the memory and the communication interface/interface circuit.
  • the communication device is caused to execute the above-mentioned method executed by the receiving end device. method.
  • the present application provides a communication device.
  • the communication device may be the sender device in the foregoing method, or a chip set in the sender device.
  • the communication device includes a communication interface/interface circuit, a processor, and optionally, a memory.
  • the memory is used to store computer programs or instructions
  • the processor is coupled with the memory and the communication interface/interface circuit.
  • the communication device executes the above-mentioned method executed by the sending end device. method.
  • a computer program product includes: computer program code.
  • the method executed by the receiving end device in the above aspects can be implemented.
  • a computer program product includes: computer program code, when the computer program code is executed, the method executed by the sending end device in the above aspects can be implemented.
  • the present application provides a chip system, which includes a processor, and is configured to implement the functions of the receiving end device in the methods of the foregoing aspects.
  • the chip system further includes a memory for storing program instructions and/or data.
  • the chip system can be composed of chips, and can also include chips and other discrete devices.
  • the present application provides a chip system, which includes a processor, and is configured to implement the functions of the sending end device in the methods of the foregoing aspects.
  • the chip system further includes a memory for storing program instructions and/or data.
  • the chip system can be composed of chips, and can also include chips and other discrete devices.
  • the present application provides a computer-readable storage medium that stores a computer program.
  • the computer program When the computer program is executed, the method executed by the receiving end device in the above aspects can be implemented.
  • the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed, the method executed by the sender device in each of the above aspects can be implemented.
  • the names of the receiving end device, the sending end device, and the communication device do not limit the device itself. In actual implementation, these devices may appear under other names. As long as the function of each device is similar to that of this application, it falls within the scope of the claims of this application and its equivalent technologies.
  • FIG. 1 is a schematic diagram of the architecture of a data center network provided by an embodiment of the application
  • FIG. 2 is a flowchart of a method for receiving and sending data according to an embodiment of the application
  • FIG. 3 is a schematic diagram of a data receiving scene provided by an embodiment of the application.
  • FIG. 4 is a flowchart of a method for receiving data according to an embodiment of the application
  • FIG. 5 is a flowchart of a method for sending data according to an embodiment of the application
  • Fig. 6 is a schematic diagram of a dispatch switch provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of a dispatch switch provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of a dispatch switch provided by an embodiment of the application.
  • FIG. 9 is a flowchart of a method for receiving and sending data according to an embodiment of the application.
  • FIG. 10 is a schematic diagram of a data sending scenario provided by an embodiment of this application.
  • FIG. 11 is a flowchart of a method for sending data according to an embodiment of the application.
  • FIG. 12 is a schematic diagram of a dispatch switch provided by an embodiment of the application.
  • FIG. 13 is a schematic diagram of a dispatch switch provided by an embodiment of the application.
  • FIG. 14 is a schematic diagram of a dispatch switch provided by an embodiment of the application.
  • FIG. 15 is a flowchart of a method for receiving and sending data according to an embodiment of the application.
  • FIG. 16 is a schematic structural diagram of a communication device provided by an embodiment of this application.
  • FIG. 17 is a schematic structural diagram of a communication device provided by an embodiment of this application.
  • FIG. 18 is a schematic structural diagram of a communication device provided by an embodiment of this application.
  • words such as “exemplary” or “for example” are used as examples, illustrations, or illustrations. Any embodiment or design solution described as “exemplary” or “for example” in the embodiments of the present application should not be construed as being more preferable or advantageous than other embodiments or design solutions. To be precise, words such as “exemplary” or “for example” are used to present related concepts in a specific manner.
  • the data center network topology can be a three-layer network topology or a two-layer network topology.
  • the three-layer network topology can be divided into a core layer, an aggregation layer, and an access layer.
  • the two-layer network topology can be divided into a core layer (also called a backbone spine layer). ) And the access layer (also known as the leaf layer).
  • the core layer is the high-speed switching backbone layer of the data center network, which is used to connect the data center with equipment outside the data center (such as external operator equipment).
  • the core layer may include switches and routers with high bandwidth (eg, a bandwidth of more than Gigabit).
  • the core layer has at least one of the following characteristics: reliability, high efficiency, redundancy, fault tolerance, manageability, adaptability, low latency, etc.
  • the routing connection of the core layer plays a very important role in the data center network. Generally, the reliability of the data center network can be achieved through the redundant connection of multiple devices.
  • the convergence layer is the "intermediary" between the access layer and the core layer. It is used to aggregate data from workstations (such as terminal devices or servers) before entering the core layer to reduce the load on the core layer.
  • the convergence layer may include switches and routers that support Layer 3 switching technology and Virtual Local Area Network (VLAN).
  • VLAN Virtual Local Area Network
  • the access layer is connected to workstations and is used to provide workstation access to the local network segment.
  • the access layer can include switches and routers that do not support VLAN and Layer 3 switching technology, and can also include switches and routers that support VLAN and Layer 3 switching technology.
  • FIG. 1 is a schematic diagram of the architecture of a data center network applied in the embodiment of the present application.
  • the data center network is composed of access equipment at the access layer, aggregation equipment at the aggregation layer, and core equipment at the core layer. Access equipment is connected to workstations, which include servers and terminal devices.
  • the data center network 100 includes a core layer 110, an aggregation layer 120 and an access layer 130.
  • the core layer 110 includes a switch 111 and a router 112.
  • the convergence layer 120 includes a switch 121, a switch 122, a router 123, and a router 124.
  • the access layer 130 includes a switch 131, a switch 132, a switch 133, and a switch 134.
  • both the switch 111 and the router 112 are connected to the Internet.
  • the switch 121, the switch 122, the router 123, and the router 124 are all connected to the switch 111.
  • the switch 121, the switch 122, the router 123, and the router 124 are all connected to the router 112.
  • the switch 131 is connected to the switch 121 and the switch 122, respectively.
  • the switch 132 is connected to the switch 121 and the switch 122 respectively.
  • the switch 133 is connected to the router 123 and the router 124, respectively.
  • the switch 134 is connected to the router 123 and the router 124 respectively.
  • the workstation 141 and the workstation 142 are respectively connected to the switch 131.
  • the workstation 143 and the workstation 144 are respectively connected to the switch 132.
  • the workstation 145 and the workstation 146 are connected to the switch 133 respectively.
  • the workstation 147 and the workstation 148 are respectively connected to the switch 134.
  • the workstation can be
  • FIG. 1 is only a schematic diagram.
  • the data center network may also include other devices, such as a device management server. These servers are used to manage all switches and routers to ensure that they work properly, not shown in Figure 1.
  • the embodiments of the present application do not limit the number of switches, routers, and workstations included in the data center network.
  • the connection manner between the switch, router, and workstation shown in FIG. 1 is only a schematic illustration. In actual applications, the switch, router, and workstation may also be connected in other manners, which is not limited in this application.
  • Each device in the data center network can be used as a sender to send data, or as a receiver to receive data.
  • One sender can send data to multiple receivers.
  • One receiving end can also receive data sent by multiple sending ends. For example, data is stored in multiple servers. When a certain server obtains the data, it can send a data query request to multiple servers and obtain the data from multiple servers. After multiple servers have inquired about the data, they will feed back the relevant data to the server that issued the data inquiry request.
  • the sending rate of the sending end can be controlled according to the bandwidth of the receiving end, so that the sum of the data receiving rate at the receiving end is less than or equal to the bandwidth of the receiving end.
  • the number of data streams at each sending end is different. How to ensure that the sending rate of each data stream is the same and the fairness of data streams between different sending ends is an urgent problem to be solved.
  • an embodiment of the present application provides a method for sending and receiving data.
  • the sender sends a notification message to the receiver to notify the receiver of the number of data streams M of the data to be sent by the sender, where M is an integer greater than or equal to 1.
  • each indication message includes a credit mark, and the credit mark instructs the sending end to send according to the first amount of data Data, so that the sender sends data of M data streams to the receiver according to M credit marks, and the receiver receives data from M data streams from the sender.
  • the data volume of each data stream in the M data streams is The first amount of data.
  • the receiving end learns the number of data streams to be sent by the sending end by receiving a notification message from the sending end. Since the receiving end does not need to store the information of each data stream at the sending end, only the number of data streams at the sending end is stored, which effectively reduces the storage overhead of the receiving end.
  • the receiving end sends a credit mark to the sending end according to the number of data streams to be sent, so that the sending end sends the data of each data stream according to the amount of data indicated by the credit mark, so that each data stream sends data once.
  • the same amount of data ensures the fairness between data streams, and also makes the sum of the data rates received by the receiving end less than or equal to the bandwidth of the receiving end, avoiding network congestion at the receiving end.
  • the method and strategy for sending and receiving data provided in the embodiments of the present application may be deployed on each device in the convergence layer 120 and the access layer 130 in the data center network, or deployed on each workstation. Devices in the same layer can use this strategy to receive and send data, and devices in different layers can use traditional technology to receive and send data. For example, the device in the access layer 130 queries the stored forwarding table according to the destination Internet Protocol (IP) address and the destination port number in the quintuple, and forwards data to the device in the convergence layer 120.
  • IP Internet Protocol
  • the methods and strategies for sending and receiving data provided in the embodiments of the present application are mainly deployed on devices in the access layer 130.
  • the switch 131 can be used as the sending end, and the switch 132 can be used as the receiving end.
  • This strategy can be used to receive and send data between the switch 131 and the switch 132.
  • the switch 131 and the switch 132 are connected through the switch 121, namely Data can be transmitted between the switch 131 and the switch 132 through the switch 121.
  • the switch 132 can be used as the sending end, and the switch 133 can be used as the receiving end.
  • the switch 132 and the switch 133 can use this strategy to receive and send data.
  • the switch 132 and the switch 133 are connected through the devices in the core layer 110 and the devices in the convergence layer 120, that is, the switch 132 and the switch 133 transmit data through the devices in the core layer 110 and the devices in the convergence layer 120.
  • the switch 132 and the switch 133 transmit data through the switch 122, the switch 111, and the router 123.
  • the switch 131 may serve as a sending end or a receiving end, and the switch 131 itself may use this strategy to receive and send data.
  • one device in the data center network can receive data sent by other devices in the same layer.
  • the switch 131 may receive data sent by the switch 132, the switch 133, and the switch 134.
  • a device in the data center network can send data to other devices in the same layer.
  • the switch 131 may send data to the switch 132, the switch 133, and the switch 134.
  • the devices in the core layer 110, the convergence layer 120, and the access layer 130 are used to forward data, and the device that sends the data and the device that receives the data is the workstation.
  • the destination IP address and destination port number refer to the IP address and port number of the workstation receiving the data.
  • the workstation 141 may be a source device for sending data
  • the workstation 145 may be a destination device for receiving data.
  • Fig. 2 is a flowchart of a method for receiving and sending data according to an embodiment of the application. It is assumed here that the workstation 141 sends data to the workstation 145, the workstation 141 may be the source device that sends the data, and the workstation 145 may be the destination device that receives the data. As an example, the sending end is the switch 131 and the receiving end is the switch 133. As shown in Figure 2, the method may include:
  • the switch 131 sends a notification message to the switch 133.
  • the notification message includes the number M of data streams to be sent from the switch 131 to the switch 133, where M is an integer greater than or equal to 1.
  • the notification message may be a control message.
  • the control message may be a connection establishment notification message sent when the switch 131 and the switch 133 initially establish a connection.
  • the control message may be a synchronization message (SYN).
  • the control message may be an acknowledgement message (acknowledge, ACK) and so on.
  • the notification message may be a data message.
  • the data packet includes service-related data sent by the switch 131 to the switch 133.
  • the data message may be a modified data message.
  • the control message may be a message including control instruction data, and the control message does not include service-related data.
  • the notification message can also be other messages, which are not limited.
  • the notification message also includes the remaining data volume of the switch 131, and the remaining data volume of the switch 131 is the remaining data volume of the data to be sent by the switch 131 to the switch 133, so that the switch 133 can learn whether the switch 131 still has a message to the switch 133. 133 sent data.
  • the notification message may also include a source port number, a destination port number, a source IP address, a destination IP address, and a transport layer protocol (such as Transmission Control Protocol (TCP)).
  • the source port number may be the port number of the workstation 141.
  • the destination port number may be the port number of the workstation 145.
  • the source IP address may be the IP address of the workstation 141.
  • the destination IP address may be the IP address of the workstation 145.
  • devices in the data center network can distinguish different data streams by port numbers.
  • the switch 133 can distinguish different data streams based on the source port number.
  • the switch 131 may query the forwarding table according to the IP address of the workstation 145 and the port number of the workstation 145 to determine the path for forwarding the notification message.
  • the switch 131 may query the forwarding table stored by the switch 131 according to the IP address of the workstation 145 and the port number of the workstation 145, and determine to forward the notification message to the switch 121.
  • the switch 121 can query the forwarding table stored by the switch 121 according to the IP address of the workstation 145 and the port number of the workstation 145, and determine to forward the notification message to the switch 111.
  • the switch 111 can query the forwarding table stored in the switch 111 according to the IP address of the workstation 145 and the port number of the workstation 145, and determine to forward the notification message to the router 123.
  • the router 123 can query the forwarding table stored by the router 123 according to the IP address of the workstation 145 and the port number of the workstation 145, and determine to forward the notification message to the switch 133.
  • the above-mentioned path for the switch 131 to send the notification message to the switch 133 is just an example for illustration, and other paths may be used in practical applications and are not limited.
  • the switch 133 receives a notification message from the switch 131.
  • the notification message includes the number M of data streams to be sent by the switch 131 and the amount of remaining data, where M is an integer greater than or equal to 1.
  • the switch 133 can receive notification messages from multiple sending ends, and the switch 133 can store the number of data streams and the remaining data volume of each sending end, so that the switch 133 can provide information according to the number of data streams at the sending end.
  • the sender feeds back the credit mark.
  • the switch 133 may configure a virtual output queue (VOQ) for each sending end to distinguish information from different sending ends.
  • the sending end VOQ is used for the receiving end (such as the switch 133) to distinguish information from different sending ends.
  • the switch 133 receives notification messages from the switch 131, the switch 132, and the switch 134.
  • the switch 133 can configure the sending end VOQ1, the sending end VOQ2, and the sending end VOQ3.
  • the sending end VOQ1 is used to store the information of the switch 131.
  • the sending end VOQ2 is used to store the information of the switch 132.
  • the sending end VOQ3 is used to store the information of the switch 134.
  • the switch 133 may determine the identity of the sending end VOQ according to the address of the sending end, and store the information of the sending end in the sending end VOQ indicated by the identity of the sending end VOQ.
  • the switch 133 may determine the identity of the sending end VOQ1 according to the address of the switch 131, and store the information of the switch 131 in the sending end VOQ1.
  • the switch 133 may determine the identity of the sending end VOQ2 according to the address of the switch 132, and store the information of the switch 132 in the sending end VOQ2.
  • the switch 133 may determine the identity of the sending end VOQ3 according to the address of the switch 134, and store the information of the switch 134 in the sending end VOQ3.
  • the information of the sending end may include the address of the sending end, the identification of the VOQ of the sending end, the first value and the second value.
  • the first value indicates the number of data streams stored by the switch 133 that the sender sends to the switch 133.
  • the second value indicates the remaining amount of data stored by the switch 133 to be sent by the sender to the switch 133. It is understandable that the remaining data volume of the data to be sent by the sending end to the switch 133 is the total remaining data volume of the data stream sent by the sending end to the switch 133. For example, the number of data streams sent by the sender to the switch 133 is 3, and the remaining data volume of the data to be sent by the sender to the switch 133 is the total remaining data volume of 3 data streams. Among them, the unit of the remaining data amount may be byte.
  • the corresponding relationship of the information of the sending end may be presented in the form of a table.
  • Each row in the table may be called an entry, and each entry is used to store information of a sending end.
  • the information of the sender may also include the serial number and the name of the sender.
  • the first value and the second value may not be included in the table. The first value and the second value of the sending end can be stored in the corresponding sending end VOQ.
  • Table 1 presents the correspondence between the information on the sending end.
  • VOQ1 represents the VOQ of the transmitter.
  • VOQ1_1 may represent the identification of the VOQ of the switch 131.
  • the address of the switch 131 may be 192.168.0.4.
  • the address 192.168.0.4 of the switch 131 has a corresponding relationship with the identifier VOQ_1 of the VOQ of the switch 131.
  • the number of data streams sent by the switch 131 to the switch 133 is 2; the remaining data volume of the data to be sent by the switch 131 to the switch 133 is 1000 bytes.
  • VOQ1_2 may represent the identifier of the VOQ of the switch 132.
  • the address of the switch 132 may be 192.168.0.5.
  • the address 192.168.0.5 of the switch 132 has a corresponding relationship with the identifier VOQ_2 of the VOQ of the switch 132.
  • the number of data streams sent by the switch 132 to the switch 133 is 5; the remaining data volume of the data to be sent by the switch 132 to the switch 133 is 5000 bytes.
  • VOQ1_3 may represent the identifier of the VOQ of the switch 134.
  • the address of the switch 134 may be 192.168.0.6.
  • the address 192.168.0.3 of the switch 134 has a corresponding relationship with the identifier VOQ_3 of the VOQ of the switch 134.
  • the number of data streams sent by the switch 134 to the switch 133 is 4; the remaining data volume of the data to be sent by the switch 134 to the switch 133 is 3000 bytes.
  • Table 1 only illustrates the storage form in the storage device of the corresponding relationship of the sending end information in the form of a table, and does not limit the storage form of the corresponding relationship of the sending end information in the storage device.
  • the sending end s
  • the storage form of the corresponding relationship of the information in the storage device may also be stored in other forms, which is not limited in the embodiment of the present application.
  • the switch 133 may update the correspondence table of the information of the sender according to the content contained in the notification message. For example, as shown in FIG. 4, after the switch 133 receives the notification message from the switch 131, it may also perform S401 to S405.
  • the switch 133 determines whether information about the switch 131 is stored.
  • the switch 133 determines that the information of the switch 131 is stored, execute S402; if the switch 133 determines that the information of the switch 131 is not stored, it means that the switch 133 has received the data sent by the switch 131 for the first time, and the remaining data amount of the switch 131 is not 0, Go to S405.
  • the switch 133 determines whether the received remaining data volume of the switch 131 is zero.
  • switch 133 determines that the remaining data volume of the received switch 131 is not 0, execute S403; if the switch 133 determines that the remaining data volume of the received switch 131 is 0, it means that the switch 131 has no data to be sent to the switch 133, and execute S404 .
  • the remaining data volume of the switch 131 is the remaining data volume of the data to be sent from the switch 131 to the switch 133.
  • the switch 133 updates the first value according to the number M of data streams to be sent by the switch 131, and updates the second value according to the remaining data volume of the data streams to be sent by the switch 131.
  • the switch 133 updates the first value of the table entry of the switch 131 according to the number M of data streams to be sent by the switch 131. Assuming that the first value of the switch 131 stored by the switch 133 is 2, the number of received data streams of the data to be sent by the switch 131 is 3, and the first value of the switch 131 is updated to 3.
  • the switch 133 updates the second value of the table entry of the switch 131 according to the remaining data volume of the data stream of the data to be sent by the switch 131. Assuming that the second value of the switch 131 stored by the switch 133 is 1000 bytes, the remaining data volume of the received data stream of the data to be sent by the switch 131 is 2000 bytes, and the second value of the switch 131 is updated to 2000 bytes.
  • the switch 133 deletes the stored information of the switch 131.
  • the switch 133 deletes the stored information of the table entry of the switch 131, that is, it can delete the stored name, address, VOQ identifier of the switch 131, the number of data streams to be sent, and the remaining data amount.
  • Table 2 it is a table in which the information of the table entry of the switch 131 in Table 1 is deleted.
  • the switch 133 stores the number M of data streams of the data to be sent by the switch 131 as a first value, and stores the remaining data volume of the data streams of the data to be sent by the switch 131 as a second value.
  • the switch 133 stores the number M of data streams to be sent by the switch 131 as the first value of the table entry of the switch 131. Assuming that the number of data streams of data to be sent by the switch 131 received by the switch 133 is 3, the first value of the switch 131 is stored as 3.
  • the switch 133 stores the remaining data volume of the data stream of the data to be sent by the switch 131 as the second value of the table entry of the switch 131. Assuming that the remaining data volume of the data stream of the data to be sent by the switch 131 received by the switch 133 is 2000 bytes, the second value of the switch 131 is stored as 2000 bytes.
  • the switch 133 When the switch 133 receives the data sent by the sender for the first time, an entry can be added to Table 1, and the information of the sender can be added. For example, the switch 133 receives the data sent by the switch 131 for the first time, and the switch 133 may configure an entry of the switch 131. As shown in Table 3, the corresponding relationship of the information of the switch 131 is added to Table 3 so that the switch 133 can determine the identifier of the switch 131 according to the address of the switch 131, and store the number of data to be sent by the switch 131 and the remaining data amount.
  • the switch 133 determines that the information of the switch 131 is not stored, and the remaining data volume of the switch 131 is 0, the switch 133 does not need to add an entry of the switch 131.
  • the switch 133 may schedule the sending end in a round-robin manner, and feed back the credit mark to the sending end according to the number of data streams at the sending end. The more data streams at the sending end, the more credit marks are fed back to the sending end.
  • the number of data streams at the sending end is recorded in the entries of the information correspondence table of the sending end, and the switch 133 can schedule the entries recorded in the correspondence table of the sending end information in a round-robin manner, according to the number of data streams at the sending end. The number feeds back the credit mark to the sender.
  • the VOQ at the sending end records the number of data streams at the sending end
  • the switch 133 may schedule the sending end VOQ in a cyclic manner, and feedback the credit mark to the sending end according to the number of data streams at the sending end.
  • the switch 133 may cyclically schedule the VOQ of the sending end according to the entry recorded in the correspondence table of the information of the sending end.
  • S501 to S502 can be executed.
  • the i-th sending end is taken as an example for description, and the i-th sending end may be any sending end in the correspondence table of the information of the sending end.
  • the switch 133 sends Xi indication messages to the i-th sending end within Xi cycles.
  • Xi may represent the number of data streams of the i-th sending end to be sent.
  • the switch 133 sends an indication message in each of the Xi cycles.
  • Each indication message includes a credit mark, and the credit mark instructs the i-th sender to send data according to the first data amount.
  • the first amount of data may be pre-configured.
  • Each device in the data center network is pre-configured with the first data amount, so that the device can send data according to the first data amount indicated by the credit mark.
  • the period, the first data amount, and the bandwidth of the switch 133 satisfy formula (1).
  • C represents the period
  • D represents the first data volume
  • BW represents the bandwidth of the switch 133.
  • the switch 133 schedules the i+1th sending end.
  • the switch 133 sends Xi+1 indication messages to the i+1th sending end in Xi+1 cycles.
  • Xi+1 may represent the number of data streams of the i+1th sending end to be sent.
  • the switch 133 schedules an interval of Xi cycles between the i-th sending end and the (i+1)th sending end.
  • the switch 133 sequentially schedules the VOQ of the switch 131, the VOQ of the switch 132, and the VOQ of the switch 134, and loops accordingly.
  • S203 is executed.
  • the switch 133 increases the number of VOQs at the dispatching end.
  • the access layer 130 of the data center network also includes a switch 135, which is respectively connected to the devices and workstations in the aggregation layer 120, and the information of the switch 135 is added to the correspondence table of the information on the sending end.
  • the switch 133 schedules the VOQ of the switch 131, the VOQ of the switch 132, the VOQ of the switch 134, and the VOQ of the switch 135 in turn, and loops accordingly.
  • the switch 133 reduces the number of VOQs at the dispatching end. For example, as shown in FIG. 8, to reduce the correspondence of the information of the switch 134, the switch 133 sequentially schedules the VOQ of the switch 131 and the VOQ of the switch 132, and loops accordingly.
  • the switch 133 sends M indication messages to the switch 131 in M cycles, and each indication message includes a credit mark.
  • the switch 133 sends an indication message to the switch 131 in each of the M cycles.
  • the credit mark instructs the switch 131 to send data according to the first data amount.
  • the switch 131 receives M indication messages from the switch 133.
  • the switch 131 may receive the indication message in a cycle in which the switch 133 sends the indication message, that is, receive an indication message from the switch 133 in each cycle of M cycles.
  • the switch 131 may not periodically receive the indication message sent by the switch 133, and the time interval for the switch 131 to receive the M indication messages from the switch 133 may be different.
  • the method further includes S901.
  • the switch 131 updates the number of credit marks of the switch 133 stored in the switch 131.
  • the switch 131 receives a credit mark from the switch 133, and adds one to the number of credit marks of the switch 133.
  • S205 The switch 131 sends data of M data streams to the switch 133 according to the M credit labels.
  • the switch 131 may send data of each of the M data streams to the switch 133 according to the M credit labels, or send data of part of the M data streams to the switch 133, which is not limited.
  • the reduction of the remaining data amount of the data flow of the data to be sent from the switch 131 to the switch 133 satisfies the formula (2).
  • E represents the amount of reduction
  • A1 represents the number of credit marks used by the switch 131 to send data to the switch 133
  • D represents the first amount of data.
  • the switch 131 may poll the M data streams of the switch 133, each time one data stream is polled, the data is sent once according to a credit mark, and the data volume of the sent data is the first data volume.
  • the switch 133 receives data of M data streams from the switch 131.
  • the switch 133 may receive the data of M data streams according to the period in which the switch 131 sends the data of M data streams, that is, receive data of one data stream from the switch 131 in each period of the M cycles.
  • the data volume of each data stream is the first data volume.
  • the switch 133 may not periodically receive the data sent by the switch 131, and the time interval for the switch 133 to receive the data of the M data streams from the switch 131 may be different.
  • the switch 133 learns the number of data streams in which the switch 131 is to send data by receiving the notification message from the switch 131. Since the switch 133 does not need to store the information of each data stream of the switch 131, the number of data streams of the switch 131 is stored, which effectively reduces the storage overhead of the switch 133. In addition, the switch 133 sends a credit mark to the switch 131 according to the number of data streams to be sent, so that the switch 131 sends the data of each data stream according to the amount of data indicated by the credit mark, so that each data stream sends one data stream. The same amount of data guarantees fairness between data streams, and also makes the sum of the data receiving rates of the switch 133 less than or equal to the bandwidth of the switch 133, so as to avoid network congestion of the switch 133.
  • the switch 131 can send data to multiple receiving ends, if all data streams sent to different receiving ends are queued in a queue, the phenomenon of "head of line blocking" may occur.
  • the data volume of the first data stream is extremely large, and the data volume of the second data stream is extremely small.
  • the first data flow may be a data flow corresponding to data sent by the switch 131 to the switch 133.
  • the second data flow may be a data flow corresponding to the data sent by the switch 131 to the switch 134.
  • the switch 131 may configure a VOQ for each receiving end to distribute data of data streams to different receiving ends.
  • the receiving end VOQ is used for the sending end (such as the switch 131) to distinguish data of data streams from different receiving ends.
  • the switch 131 sends data to the switch 132, the switch 133, and the switch 134, and the switch 131 may be configured with a receiving end VOQ1, a receiving end VOQ2, and a receiving end VOQ3.
  • the receiving end VOQ1 is used to buffer the data sent to the switch 132.
  • the receiving end VOQ2 is used to buffer the data sent to the switch 133.
  • the receiving end VOQ3 is used to buffer the data sent to the switch 134.
  • the switch 131 divides the data sent to different receiving ends according to the receiving end VOQ, buffers the data sent to different receiving ends in the corresponding VOQ of the receiving end, and the data sent to different receiving ends queues up in the VOQ of different receiving ends to avoid occurrence The phenomenon of "head-of-line blocking".
  • the identifier of the receiving end VOQ may be determined according to the address of the receiving end, and the data sent to the receiving end is buffered in the receiving end VOQ indicated by the identifier of the receiving end VOQ.
  • the switch 131 may determine the identifier of the receiving end VOQ1 according to the address of the switch 132, and buffer the data sent to the switch 132 to the receiving end VOQ1.
  • the switch 131 may determine the identifier of the receiving end VOQ2 according to the address of the switch 133, and buffer the data sent to the switch 133 to the receiving end VOQ2.
  • the switch 131 may determine the identifier of the receiving end VOQ3 according to the address of the switch 134, and buffer the data sent to the switch 134 to the receiving end VOQ3.
  • the correspondence between the address of the receiving end and the identifier of the receiving end VOQ can be presented in the form of a table, that is, Table 4 presents the correspondence between the address of the receiving end and the identifier of the receiving end VOQ.
  • VOQ2 represents the VOQ of the receiving end.
  • VOQ2_1 may represent the identifier of the VOQ of the switch 132.
  • the address of the switch 132 may be 192.168.0.1.
  • the address 192.168.0.1 of the switch 132 has a corresponding relationship with the identifier VOQ2_1 of the VOQ of the switch 132.
  • VOQ2_2 may represent the identifier of the VOQ of the switch 133.
  • the address of the switch 133 may be 192.168.0.2.
  • the address 192.168.0.2 of the switch 133 has a corresponding relationship with the identifier VOQ2_2 of the VOQ of the switch 133.
  • VOQ2_3 may represent the identification of the VOQ of the switch 134.
  • the address of the switch 134 may be 192.168.0.3.
  • the address 192.168.0.3 of the switch 134 has a corresponding relationship with the VOQ identifier VOQ2_3 of the switch 134.
  • Table 4 only illustrates the storage form in the storage device of the correspondence between the address of the receiving end and the identification of the receiving end VOQ in the form of a table, and does not store the correspondence between the address of the receiving end and the identification of the receiving end VOQ in the storage device.
  • the storage form in the device is limited.
  • the storage form of the corresponding relationship between the address of the receiving end and the VOQ identifier of the receiving end in the storage device may also be stored in other forms, which is not limited in the embodiment of the present application.
  • each row in Table 4 may be called a table entry.
  • an entry can be added to Table 4, and the corresponding relationship between the address of the receiving end and the VOQ identifier of the receiving end can be added.
  • the access layer 130 of the data center network also includes a switch 135.
  • the switch 131 generates the data of the data stream sent to the switch 135.
  • the switch 131 can be configured with the receiving end VOQ4, and the receiving end VOQ4 is used to buffer the data sent to the switch 135. .
  • the corresponding relationship between the address of the switch 135 and the VOQ4 identifier of the switch 135 is added in Table 4, so that the switch 131 can determine the identifier of the receiving end VOQ4 according to the address of the switch 135, and send it to the switch 135.
  • the data is buffered to the receiving end VOQ4.
  • VOQ2_4 can represent the identifier of the VOQ of the switch 135.
  • the address of the switch 135 may be 192.168.0.4.
  • the address 192.168.0.4 of the switch 135 has a corresponding relationship with the identifier VOQ_4 of the VOQ of the switch 135.
  • the switch 131 may delete the entry corresponding to the receiving end. For example, the data sent from the switch 131 to the switch 134 is completed, and the switch 131 deletes the entry of the switch 134. As shown in Table 6, it is a table in which the entry of the switch 134 is deleted.
  • the switch 131 may schedule the receiving end VOQ in a round-robin manner, and send the data buffered by the receiving end VOQ.
  • the switch 131 may cyclically schedule the receiving end VOQ according to the entry recorded in the correspondence table of the address of the receiving end and the identifier of the receiving end VOQ.
  • the switch 131 schedules a receiving end VOQ, and can perform S1101 to S1103, that is, sending data of the receiving end VOQ according to the credit mark.
  • the i-th receiving end VOQ is taken as an example for description.
  • the i-th receiving end VOQ may be any receiving end VOQ in the correspondence table of the address of the receiving end and the identifier of the receiving end VOQ.
  • the switch 131 determines whether the number of credit marks of the i-th receiving end is greater than zero.
  • the switch 131 sends data to the i-th receiving end according to the Xi credit marks.
  • the switch 131 sends a data packet to the i-th receiving end according to the first data amount indicated by the credit mark, and the data amount of the data packet is the first data amount.
  • the data packet includes the number of data streams for which the switch 131 is to send data.
  • the switch 131 does not send data once, the number of credit marks is reduced by one, so that the switch 131 can send data according to the remaining credit marks.
  • the switch 131 schedules the (i+1)th receiving end.
  • the switch 131 determines whether the number of credit marks of the (i+1)th receiving end is greater than 0, thereby determining whether to send the data in the VOQ of the (i+1)th receiving end.
  • the switch 131 schedules an interval of Xi cycles between the i-th receiving end and the (i+1)-th receiving end.
  • the switch 131 may determine whether the number of credit marks of the switch 133 is greater than 0. If the switch 131 determines that the number of the credit marks of the switch 133 is greater than 0, the switch 131 sends 133 sends a notification message; if the switch 131 determines that the number of credit marks of the switch 133 is equal to 0, it dispatches other receiving ends.
  • the switch 131 schedules the VOQ of the switch 132, the VOQ of the switch 133, and the VOQ of the switch 134 in turn, and loops accordingly.
  • the switch 131 increases the number of VOQs of the receiving end that are scheduled. For example, as shown in FIG. 13, assuming that the access layer 130 of the data center network also includes a switch 135, the correspondence between the address of the receiving end and the VOQ identifier of the receiving end is newly added to the address of the switch 135 and the VOQ4 identifier of the switch 135. Correspondingly, the switch 131 sequentially schedules the VOQ of the switch 132, the VOQ of the switch 133, the VOQ of the switch 134, and the VOQ of the switch 135, and so on.
  • the switch 131 reduces the number of scheduling receiving end VOQs. For example, as shown in FIG. 14, to reduce the correspondence between the address of the switch 134 and the identifier of the VOQ3 of the switch 134, the switch 131 sequentially schedules the VOQ of the switch 132 and the VOQ of the switch 133, and so on.
  • the receiving end can instruct the sending end to stop sending data according to the amount of data received.
  • the method further includes the following steps.
  • the switch 134 sends data to the switch 133.
  • the switch 133 receives data from the switch 134.
  • the switch 133 determines the second data volume.
  • the switch 133 counts the data received from the switch 134, and the second data volume is the data volume of the data received from the switch 134.
  • S1504 is executed.
  • the third data amount is determined according to the bandwidth of the switch 133 and the number of data streams of multiple sending ends. In some embodiments, the third amount of data may satisfy formula (3).
  • F represents the third data volume
  • BW represents the bandwidth of the switch 133
  • K represents the number of data streams of the switch 134
  • L represents the number of data streams of all sending ends that send data to the switch 133, which may include the data of the switch 134
  • the switch 133 sends a stop message to the switch 134.
  • the stop message instructs the switch 134 to stop sending data.
  • the switch 134 receives the stop message from the switch 133 and stops sending data to the switch 133.
  • the switch 133 can count the data volume of the data from the switch 134, if the data volume of the data from the switch 134 and the data volume of the data from the switch 131 are greater than the processing data of the switch 133
  • the switch 133 can send a stop message to the switch 134 to instruct the switch 134 to stop sending data, so as to prevent the switch 133 from receiving too much data from the switch 134, which may cause network congestion.
  • the switch includes hardware structures and/or software modules corresponding to various functions.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application scenarios and design constraints of the technical solution.
  • FIG. 16, FIG. 17, and FIG. 18 are schematic structural diagrams of possible communication devices provided by embodiments of this application. These communication devices can be used to implement the function of the switch in the foregoing method embodiment, and therefore can also achieve the beneficial effects of the foregoing method embodiment.
  • an embodiment of the present application provides a communication device 1600.
  • the communication device 1600 may be the switch 131 shown in FIG. 1, or a module (such as a chip) applied to the switch 131.
  • the communication device 1600 includes a receiving unit 1610, a sending unit 1620, and a processing unit 1630.
  • the communication device 1600 is configured to implement the function of the switch 131 in the method embodiment shown in FIG. 2, FIG. 9, FIG. 11, or FIG. 15.
  • the receiving unit 1610 is used to perform S204; the sending unit 1620 is used to perform S201 and S205.
  • the receiving unit 1610 is used to perform S204; the sending unit 1620 is used to perform S201 and S205, and the processing unit 1630 is used to perform S901.
  • the sending unit 1620 is used to perform S1102
  • the processing unit 1630 is used to perform S1101 and S1103.
  • the receiving unit 1610 is used to perform S204; the sending unit 1620 is used to perform S201 and S205, and the processing unit 1630 is used to perform S901.
  • receiving unit 1610 More detailed descriptions about the above-mentioned receiving unit 1610, sending unit 1620, and processing unit 1630 can be directly obtained with reference to the relevant descriptions in the method embodiments shown in FIG. 2, FIG. 9, FIG. 11, or FIG. 15.
  • an embodiment of the present application provides a communication device 1700.
  • the communication device 1700 may be the switch 133 shown in FIG. 1, or a module (such as a chip) applied to the switch 133.
  • the communication device 1700 includes a first receiving unit 1710, a first sending unit 1720, a first processing unit 1730, a second receiving unit 1740, a second sending unit 1750, and a second processing unit 1760.
  • the communication device 1700 is configured to implement the function of the switch 133 in the method embodiment shown in FIG. 2, FIG. 4, FIG. 5, FIG. 9 or FIG. 15.
  • the first receiving unit 1710 is used to perform S202 and S206
  • the first sending unit 1720 is used to perform S203.
  • the communication device 1700 When the communication device 1700 is used to implement the function of the switch 133 in the method embodiment shown in FIG. 4: the first receiving unit 1710 is used to perform S202; the first processing unit 1730 is used to perform S401 to S405.
  • the first sending unit 1720 is used to perform S501; the first processing unit 1730 is used to perform S502.
  • the first receiving unit 1710 is used to perform S202 and S206
  • the first sending unit 1720 is used to perform S203.
  • the first receiving unit 1710 is used to perform S202 and S206
  • the first sending unit 1720 is used to perform S203.
  • the second receiving unit 1740 is used to perform S1502
  • the second processing unit 1760 is used to perform S1503
  • the second sending unit 1750 is used to perform S1504.
  • processing unit 1710 and the transceiver unit 1720 can be obtained directly with reference to the relevant descriptions in the method embodiments shown in FIG. 2, FIG. 4, FIG. 5, FIG. 9 or FIG. 15.
  • the communication device 1800 includes a processor 1810 and an interface circuit 1820.
  • the processor 1810 and the interface circuit 1820 are coupled to each other.
  • the interface circuit 1820 may be a transceiver or an input/output interface.
  • the communication device 1800 may further include a memory 1830 configured to store instructions executed by the processor 1810 or input data required by the processor 1810 to run the instructions or store data generated after the processor 1810 runs the instructions.
  • the processor 1810 is used to execute the above-mentioned processing unit 1630, the first processing unit 1730 or the second processing
  • the function of the unit 1760, the interface circuit 1820 is used to perform the functions of the receiving unit 1610, the sending unit 1620, the first receiving unit 1710, the first sending unit 1720, the second receiving unit 1740, or the second sending unit 1750.
  • the processor in the embodiments of the present application may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits. (Application Specific Integrated Circuit, ASIC), Field Programmable Gate Array (Field Programmable Gate Array, FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.
  • the general-purpose processor may be a microprocessor or any conventional processor.
  • the method steps in the embodiments of the present application can be implemented by hardware, and can also be implemented by a processor executing software instructions.
  • Software instructions can be composed of corresponding software modules, which can be stored in random access memory (Random Access Memory, RAM), flash memory, read-only memory (Read-Only Memory, ROM), and programmable read-only memory (Programmable ROM) , PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM or well-known in the art Any other form of storage medium.
  • RAM Random Access Memory
  • ROM read-only memory
  • PROM programmable read-only memory
  • Erasable PROM Erasable PROM
  • EPROM electrically erasable programmable read-only memory
  • register hard disk, mobile hard disk, CD-ROM or well-known in the art Any other form of storage medium.
  • An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium.
  • the storage medium may also be an integral part of the processor.
  • the processor and the storage medium may be located in the ASIC.
  • the ASIC can be located in a network device or a terminal device.
  • the processor and the storage medium may also exist as discrete components in the network device or the terminal device.
  • the computer program product includes one or more computer programs or instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, network equipment, user equipment, or other programmable devices.
  • the computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer program or instruction may be downloaded from a website, computer, The server or data center transmits to another website site, computer, server or data center through wired or wireless means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that integrates one or more available media.
  • the usable medium may be a magnetic medium, such as a floppy disk, a hard disk, and a magnetic tape; it may also be an optical medium, such as a digital video disc (digital video disc, DVD); and it may also be a semiconductor medium, such as a solid state drive (solid state drive). , SSD).
  • “at least one” refers to one or more, and “multiple” refers to two or more.
  • “And/or” describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated object before and after is an “or” relationship; in the formula of this application, the character “/” indicates that the associated object before and after is a kind of "division" Relationship.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种收发数据的方法及装置,涉及通信领域,解决了如何在降低接收端的存储开销的情况下,使每条数据流发送一次数据的数据量相同,保障数据流之间的公平性的问题。发送端向接收端发送通知报文,以通知接收端该发送端待发送数据的数据流的个数M,M为大于或等于1的整数。在接收端接收来自发送端的通知报文后,在M个周期的每个周期内向发送端发送一个指示报文,每个指示报文包括一个信用标记,信用标记指示发送端依据第一数据量发送数据,使得发送端根据M个信用标记向接收端发送M个数据流的数据,接收端接收来自发送端的M个数据流的数据,M个数据流中每条数据流的数据的数据量为第一数据量。

Description

一种收发数据的方法及装置
本申请要求于2019年12月19日提交国家知识产权局、申请号为201911319930.2、发明名称为“一种收发数据的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及一种收发数据的方法及装置。
背景技术
数据中心(data center)是一个包含多个设备(如:服务器、路由器、交换机)的网络,用于传输、加速、计算和存储数据。发送数据的设备可以称为发送端,接收数据的设备可以称为接收端。在接收端接收到来自多个发送端的报文的情况下,如果每秒接收到的数据量大于该接收端的带宽,可能导致接收端发生网络拥塞。带宽可以是指每秒可传输的比特(bit)数,单位为比特率(bit per second,bps)。比特率越高,每秒传送的数据越多。
通常,接收端可以存储至少一个发送端的每条数据流的信息,根据该接收端的带宽调控每条数据流的发送速率,使每条数据流的发送速率相同,保障了不同数据流之间的公平性,并且,使该接收端接收数据的速率之和小于或等于该接收端的带宽,避免接收端发生网络拥塞。但是,随着数据中心的规模增加,数据流的个数亦随之增加,可能导致接收端待存储的数据流的信息超过接收端的存储容量,这样接收端就无法维护一些数据流的信息。
为了避免接收端无法维护数据流的信息,接收端可以根据预设的时间间隔向每个发送端发送信用标记,该信用标记用于指示发送端依据预设的数据量发送数据,避免接收端发生网络拥塞。但是,发送端可能会向接收端发送多个数据流的数据,对于每条数据流,发送端可以根据预设的数据量调控发送数据的数据量,使所有数据流发送一次数据的数据量之和等于预设的数据量。在这种情况下,由于不同的发送端的数据流的个数存在差异,导致不同发送端之间的数据流发送一次数据的数据量可能不同,在这种情况下,无法保障不同发送端之间的数据流的公平性。
因此,如何在降低接收端的存储开销的情况下,使每条数据流发送一次数据的数据量相同,保障数据流之间的公平性是一个亟待解决的问题。
发明内容
本申请提供一种收发数据的方法及装置,解决了如何在降低接收端的存储开销的情况下,使每条数据流发送一次数据的数据量相同,保障数据流之间的公平性的问题。
第一方面,本申请提供了一种接收数据的方法,该方法可应用于接收端设备,或者该方法可应用于可以支持接收端设备实现该方法的通信装置,例如该通信装置包括芯片系统。
接收端接收来自第一发送端的通知报文后,在M个周期的每个周期内向发送端发 送一个指示报文,每个指示报文包括一个信用标记,信用标记指示发送端依据第一数据量发送数据,以便于发送端根据M个信用标记向接收端发送M个数据流的数据,接收端接收来自发送端的M个数据流的数据,M个数据流中每条数据流的数据的数据量为第一数据量。通知报文包括第一发送端待发送数据的数据流的个数M,M为大于或等于1的整数。
本申请提供的接收数据的方法,接收端通过接收来自发送端的通知报文,获知发送端待发送数据的数据流的个数。由于接收端无需存储发送端的每个数据流的信息,只需存储每个发送端的数据流的个数,从而,有效地降低了接收端的存储开销。另外,接收端根据待发送数据的数据流的个数向发送端发送信用标记,控制发送端的发送速率,使得发送端根据信用标记指示的数据量发送每个数据流的数据,从而,使每条数据流发送一次数据的数据量相同,保障数据流之间的公平性。
在一种可能的实现方式中,在接收端接收来自第一发送端的通知报文之后,接收端根据M更新第一数值;或者,将M存为第一数值;其中,第一数值指示接收端存储的第一发送端向接收端发送的数据流的个数。从而,接收端通过存储发送端的数据流的个数降低了接收端的存储开销。
在另一种可能的实现方式中,通知报文还包括第一发送端的剩余数据量,接收端根据第一发送端的剩余数据量更新第二数值,第二数值指示接收端存储的第一发送端的剩余数据量;或者,将剩余数据量存为第二数值,第二数值指示接收端存储的第一发送端的剩余数据量;第一发送端的剩余数据量为第一发送端向接收端待发送数据的剩余数据量。从而,接收端通过存储发送端向接收端待发送数据的剩余数据量,进一步确定是否需要给发送端发送信用标记。
在另一种可能的实现方式中,当接收到的第一发送端的剩余数据量为0时,接收端删除存储的第一发送端的信息。由于第一发送端的剩余数据量为0,所以接收端无需向第一发送端发送信用标记。如果接收端仍调度第一发送端,会增加接收端调度其他发送端,并向其他发送端发送信用标记的时延。因此,接收端删除存储的第一发送端的信息,能够减少接收端调度其他发送端的时延。
在另一种可能的实现方式中,接收端接收来自第二发送端的数据,确定接收到的来自第二发送端的数据的数据量;当第二数据量与第三数据量之差大于预设数据量时,向第二发送端发送停止报文,其中,停止报文指示第二发送端停止发送数据,第三数据量是根据接收端的带宽和多个发送端的数据流的个数确定的,多个发送端包括第一发送端和第二发送端。在第二发送端无法识别信用标记的情况下,接收端可以统计来自第二发送端的数据的数据量,若来自第二发送端的数据的数据量和来自第一发送端的数据的数据量大于接收端的处理数据的能力,接收端可以向第二发送端发送停止报文,指示第二发送端停止发送数据,避免接收端接收过多的来自第二发送端的数据的数据量,发生网络拥塞。
第二方面,本申请提供了一种发送数据的方法,该方法可应用于发送端设备,或者该方法可应用于可以支持发送端设备实现该方法的通信装置,例如该通信装置包括芯片系统。
发送端向接收端发送通知报文,告知接收端发送端待发送数据的数据流的个数M, 随后,发送端接收来自接收端的M个指示报文,根据M个信用标记向接收端发送M个数据流的数据,M个数据流中每条数据流的数据的数据量为第一数据量。其中,M个指示报文中的每个指示报文包括一个信用标记,信用标记指示发送端依据第一数据量发送数据,M为大于或等于1的整数。
本申请提供的发送数据的方法,发送端通过向接收端发送通知报文,使得接收端获知发送端待发送数据的数据流的个数。由于接收端无需存储发送端的每个数据流的信息,只需存储每个发送端的数据流的个数,从而有效地降低了接收端的存储开销。另外,接收端根据待发送数据的数据流的个数向发送端发送信用标记,使得发送端根据信用标记指示的数据量发送每个数据流的数据,从而,使每条数据流发送一次数据的数据量相同,保障数据流之间的公平性。
在一种可能的实现方式中,通知报文还包括发送端的剩余数据量,发送端的剩余数据量为发送端向接收端待发送数据的剩余数据量。从而,以便于接收端通过存储发送端向接收端待发送数据的剩余数据量,进一步确定是否需要给发送端发送信用标记。
在另一种可能的实现方式中,方法还包括:发送端确定接收端的信用标记的个数是否大于0;若信用标记的个数大于0,发送端向接收端发送通知报文。从而,发送端根据信用标记指示的数据量发送每个数据流的数据,使每条数据流发送一次数据的数据量相同,保障数据流之间的公平性。
在另一种可能的实现方式中,在发送端接收来自接收端的M个指示报文之后,发送端更新发送端存储的接收端的信用标记的个数。从而,发送端通过及时更新信用标记的个数,根据信用标记发送数据。
第三方面,本申请还提供了一种通信装置,其有益效果可以参见第一方面的描述。所述通信装置具有实现上述第一方面的方法实例中行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。
第四方面,本申请还提供了一种通信装置,其有益效果可以参见第二方面的描述。所述通信装置具有实现上述第二方面的方法实例中行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。
第五方面,本申请提供了一种通信装置,该通信装置可以为上述方法中的接收端设备,或者为设置在接收端设备中的芯片。该通信装置包括通信接口/接口电路以及处理器,可选的,还包括存储器。其中,该存储器用于存储计算机程序或指令,处理器与存储器、通信接口/接口电路耦合,当处理器执行所述计算机程序或指令时,使通信装置执行上述方法中由接收端设备所执行的方法。
第六方面,本申请提供了一种通信装置,该通信装置可以为上述方法中的发送端设备,或者为设置在发送端设备中的芯片。该通信装置包括通信接口/接口电路以及处理器,可选的,还包括存储器。其中,该存储器用于存储计算机程序或指令,处理器与存储器、通信接口/接口电路耦合,当处理器执行所述计算机程序或指令时,使通信装置执行上述方法中由发送端设备所执行的方法。
第七方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序 代码,当所述计算机程序代码被运行时,可以实现上述各方面中由接收端设备执行的方法。
第八方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被运行时,可以实现上述各方面中由发送端设备执行的方法。
第九方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于实现上述各方面的方法中接收端设备的功能。在一种可能的设计中,所述芯片系统还包括存储器,用于保存程序指令和/或数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
第十方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于实现上述各方面的方法中发送端设备的功能。在一种可能的设计中,所述芯片系统还包括存储器,用于保存程序指令和/或数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
第十一方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,当该计算机程序被运行时,可以实现上述各方面中由接收端设备执行的方法。
第十二方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,当该计算机程序被运行时,可以实现上述各方面中由发送端设备执行的方法。
本申请中,接收端设备、发送端设备和通信装置的名字对设备本身不构成限定,在实际实现中,这些设备可以以其他名称出现。只要各个设备的功能和本申请类似,属于本申请权利要求及其等同技术的范围之内。
附图说明
图1为本申请一实施例提供的一种数据中心网络的架构示意图;
图2为本申请一实施例提供的一种接收和发送数据的方法的流程图;
图3为本申请一实施例提供的接收数据的场景示意图;
图4为本申请一实施例提供的一种接收数据的方法的流程图;
图5为本申请一实施例提供的一种发送数据的方法的流程图;
图6为本申请一实施例提供的调度交换机的示意图;
图7为本申请一实施例提供的调度交换机的示意图;
图8为本申请一实施例提供的调度交换机的示意图;
图9为本申请一实施例提供的一种接收和发送数据的方法的流程图;
图10为本申请一实施例提供的发送数据的场景示意图;
图11为本申请一实施例提供的一种发送数据的方法的流程图;
图12为本申请一实施例提供的调度交换机的示意图;
图13为本申请一实施例提供的调度交换机的示意图;
图14为本申请一实施例提供的调度交换机的示意图;
图15为本申请一实施例提供的一种接收和发送数据的方法的流程图;
图16为本申请一实施例提供的一种通信装置的结构示意图;
图17为本申请一实施例提供的一种通信装置的结构示意图;
图18为本申请一实施例提供的一种通信装置的结构示意图。
具体实施方式
本申请说明书和权利要求书及上述附图中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于限定特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
为了下述各实施例的描述清楚简洁,首先给出相关技术的简要介绍:
数据中心网络拓扑可以是一个三层网络拓扑或者二层网络拓扑,三层网络拓扑可以分为核心层、汇聚层和接入层,二层网络拓扑可以分为核心层(又称为骨干spine层)和接入层(又称为叶子leaf层)。
核心层是数据中心网络的高速交换主干层,用于将数据中心与数据中心之外的设备(如:外部运营商设备)连接。核心层可以包括具有高带宽(如:千兆以上带宽)的交换机和路由器。核心层具有如下至少一个特性:可靠性、高效性、冗余性、容错性、可管理性、适应性、低延时性等。核心层的路由连接在数据中心网络中起到十分关键的作用,一般可以通过多台设备的冗余连接来实现数据中心网络的可靠性。
汇聚层是接入层和核心层的“中介”,用于在工作站(如:终端设备或服务器)发出的数据进入核心层前汇聚数据,以减轻核心层的负荷。汇聚层可以包括支持三层交换技术和虚拟局域网(Virtual Local Area Network,VLAN)的交换机和路由器。
接入层与工作站相连,用于向本地网段提供工作站接入。接入层可以包括不支持VLAN和三层交换技术的交换机和路由器,也可以包括支持VLAN和三层交换技术的交换机和路由器。
示例的,图1是本申请的实施例应用的数据中心网络的架构示意图,该数据中心网络由接入层的接入设备、汇聚层的汇聚设备和核心层的核心设备所组成。接入设备连接工作站,工作站包括服务器和终端设备。如图1所示,该数据中心网络100包括核心层110、汇聚层120和接入层130。核心层110包括交换机111和路由器112。汇聚层120包括交换机121、交换机122、路由器123和路由器124。接入层130包括交换机131、交换机132、交换机133和交换机134。
其中,交换机111和路由器112均连接互联网(Internet)。交换机121、交换机122、路由器123和路由器124均与交换机111相连接。交换机121、交换机122、路由器123和路由器124均与路由器112相连接。交换机131分别与交换机121和交换机122相连。交换机132分别与交换机121和交换机122相连。交换机133分别与路由器123和路由器124相连。交换机134分别与路由器123和路由器124相连。工作站141和工作站142分别与交换机131连接。工作站143和工作站144分别与交换机132连接。工作站145和工作站146分别与交换机133连接。工作站147和工作站148分别与交换机134连接。工作站可以是服务器或终端设备,不予限定。
图1只是示意图,该数据中心网络中还可以包括其它设备,如还可以包括设备管 理服务器。这些服务器用于管理所有交换机和路由器,确保它们正常工作,在图1中未画出。本申请的实施例对数据中心网络中包括的交换机、路由器和工作站的数量不做限定。另外,图1中所示的交换机、路由器和工作站间的连接方式只是一种示意性说明,在实际应用中,交换机、路由器和工作站还可以采用其他方式连接,本申请不予限定。
数据中心网络中的每个设备既可以作为发送端发送数据,也可以作为接收端接收数据。一个发送端可以向多个接收端发送数据。一个接收端也可以接收多个发送端发送的数据。比如,数据存储在多台服务器中,某一台服务器获取该数据时,可以向多台服务器发送数据查询请求,从多台服务器中获取该数据。多台服务器查询到数据后,向发出数据查询请求的服务器反馈相关的数据。为了避免接收端发生网络拥塞,可以根据接收端的带宽控制发送端的发送速率,使接收端接收数据的速率之和小于或等于该接收端的带宽。但是,每个发送端的数据流的个数存在差异,如何保障每条数据流的发送速率相同,保障不同发送端之间的数据流的公平性是一个亟待解决的问题。
为了解决在降低接收端的存储开销的情况下,使每条数据流发送一次数据的数据量相同,保障数据流之间的公平性问题,本申请实施例提供一种收发数据的方法。发送端向接收端发送通知报文,通知接收端该发送端待发送数据的数据流的个数M,M为大于或等于1的整数。在接收端接收来自发送端的通知报文后,在M个周期的每个周期内向发送端发送一个指示报文,每个指示报文包括一个信用标记,信用标记指示发送端依据第一数据量发送数据,以便于发送端根据M个信用标记向接收端发送M个数据流的数据,接收端接收来自发送端的M个数据流的数据,M个数据流中每条数据流的数据的数据量为第一数据量。
本申请实施例提供的收发数据的方法,接收端通过接收来自发送端的通知报文,获知发送端待发送数据的数据流的个数。由于接收端无需存储发送端的每个数据流的信息,仅存储发送端的数据流的个数,有效地降低了接收端的存储开销。另外,接收端根据待发送数据的数据流的个数向发送端发送信用标记,使得发送端根据信用标记指示的数据量发送每个数据流的数据,从而,使每条数据流发送一次数据的数据量相同,保障数据流之间的公平性,也使得接收端接收数据的速率之和小于或等于该接收端的带宽,避免接收端发生网络拥塞。
本申请实施例提供的收发数据的方法策略可以部署在数据中心网络中的汇聚层120和接入层130中的每个设备上,或者,部署在每个工作站上。同一层中的设备间可以采用该策略接收和发送数据,不同层间的设备可以采用传统技术接收和发送数据。例如,接入层130中的设备根据五元组中的目的网络协议(Internet Protocol,IP)地址和目的端口号查询存储的转发表,向汇聚层120中的设备转发数据。在一些实施例中,本申请实施例提供的收发数据的方法策略主要部署在接入层130中的设备。
例如,如图1所示,交换机131可以作为发送端,交换机132可以作为接收端,交换机131和交换机132间可以采用该策略接收和发送数据,其中,交换机131和交换机132通过交换机121连接,即交换机131和交换机132间可以通过交换机121传输数据。
又例如,如图1所示,交换机132可以作为发送端,交换机133可以作为接收端, 交换机132和交换机133间可以采用该策略接收和发送数据。其中,交换机132和交换机133通过核心层110中的设备和汇聚层120中的设备连接,即交换机132和交换机133间通过核心层110中的设备和汇聚层120中的设备传输数据。比如,交换机132和交换机133间通过交换机122、交换机111和路由器123传输数据。
又例如,交换机131既可以作为发送端,也可以作为接收端,交换机131自己可以采用该策略接收和发送数据。
可选的,数据中心网络中的一个设备可以接收同一层中的其他设备发送的数据。例如,交换机131可以接收交换机132、交换机133和交换机134发送的数据。数据中心网络中的一个设备可以向同一层中的其他设备发送数据。例如,交换机131可以向交换机132、交换机133和交换机134发送数据。
应理解,核心层110、汇聚层120和接入层130中的设备用于转发数据,发出数据的设备和接收数据的设备是工作站。目的IP地址和目的端口号是指接收数据的工作站的IP地址和端口号。例如,工作站141可以是发出数据的源设备,工作站145可以是接收数据的目的设备。
接下来,结合附图对本申请实施例的实施方式进行详细描述。
图2为本申请实施例提供的一种接收和发送数据的方法的流程图。在这里假设工作站141向工作站145发送数据,工作站141可以是发出数据的源设备,工作站145可以是接收数据的目的设备。发送端为交换机131和接收端为交换机133为例进行说明。如图2所示,该方法可以包括:
S201、交换机131向交换机133发送通知报文。
通知报文包括交换机131向交换机133待发送数据的数据流的个数M,M为大于或等于1的整数。
可理解的,交换机131向交换机133待发送数据的数据流的个数可以是1条,也可以是2条或者更多。例如,当M=1时,表示交换机131向交换机133待发送数据的数据流的个数为1;当M=2时,表示交换机131向交换机133待发送数据的数据流的个数为2。
在一些实施例中,该通知报文可以是控制报文。例如,控制报文可以是交换机131与交换机133初始建立连接时,发送的建立连接通告报文,比如,该控制报文可以是同步报文(synchronization,SYN)。又例如,控制报文可以是确认报文(acknowledge,ACK)等等。
在另一些实施例中,该通知报文可以是数据报文。该数据报文包括交换机131向交换机133发送的与业务相关的数据。该数据报文可以是修改后的数据报文。可选的,控制报文可以是包括控制指令数据的报文,控制报文不包括与业务相关的数据。通知报文还可以是其他报文,不予限定。
可选的,通知报文还包括交换机131的剩余数据量,交换机131的剩余数据量为交换机131向交换机133待发送数据的剩余数据量,从而,以便于交换机133获知交换机131是否还有向交换机133发送的数据。
通知报文还可以包括源端口号、目的端口号、源IP地址、目的IP地址和传输层协议(如:传输控制协议(Transmission Control Protocol,TCP))。源端口号可以是 工作站141的端口号。目的端口号可以是工作站145的端口号。源IP地址可以是工作站141的IP地址。目的IP地址可以是工作站145的IP地址。
可选的,数据中心网络中的设备可以通过端口号来区分不同的数据流。例如,交换机133可以根据源端口号区分不同的数据流。
可选的,交换机131可以根据工作站145的IP地址和工作站145的端口号查询转发表,确定转发通知报文的路径。
例如,交换机131可以根据工作站145的IP地址和工作站145的端口号查询交换机131存储的转发表,确定向交换机121转发通知报文。
交换机121可以根据工作站145的IP地址和工作站145的端口号查询交换机121存储的转发表,确定向交换机111转发通知报文。
交换机111可以根据工作站145的IP地址和工作站145的端口号查询交换机111存储的转发表,确定向路由器123转发通知报文。
路由器123可以根据工作站145的IP地址和工作站145的端口号查询路由器123存储的转发表,确定向交换机133转发通知报文。
上述交换机131向交换机133发送通知报文的路径只是举例说明,实际应用中还可以由其他路径,不予限定。
S202、交换机133接收来自交换机131的通知报文。
通知报文包括交换机131待发送数据的数据流的个数M和剩余数据量,M为大于或等于1的整数。
在一些实施例中,交换机133可以接收来自多个发送端的通知报文,交换机133可以存储每个发送端的数据流的个数和剩余数据量,以便于交换机133根据发送端的数据流的个数向发送端反馈信用标记。
在一种可能的设计中,交换机133可以为每个发送端配置一个虚拟输出队列(virtual output queue,VOQ),区分不同发送端的信息。发送端VOQ用于接收端(如:交换机133)区分不同发送端的信息。示例的,如图3所示,交换机133接收来自交换机131、交换机132和交换机134的通知报文。交换机133可以配置发送端VOQ1、发送端VOQ2和发送端VOQ3。发送端VOQ1用于存储交换机131的信息。发送端VOQ2用于存储交换机132的信息。发送端VOQ3用于存储交换机134的信息。
可选的,交换机133接收到通知报文后,可以根据发送端的地址确定发送端VOQ的标识,将发送端的信息存储到发送端VOQ的标识指示的发送端VOQ中。例如,交换机133可以根据交换机131的地址确定发送端VOQ1的标识,将交换机131的信息存储到发送端VOQ1。交换机133可以根据交换机132的地址确定发送端VOQ2的标识,将交换机132的信息存储到发送端VOQ2。交换机133可以根据交换机134的地址确定发送端VOQ3的标识,将交换机134的信息存储到发送端VOQ3。
发送端的信息可以包括发送端的地址、发送端VOQ的标识、第一数值和第二数值。第一数值指示交换机133存储的发送端向交换机133发送的数据流的个数。第二数值指示交换机133存储的发送端向交换机133待发送数据的剩余数据量。可理解的,发送端向交换机133待发送数据的剩余数据量为发送端向交换机133发送的数据流的总的剩余数据量。例如,发送端向交换机133发送的数据流的个数为3,发送端向交 换机133待发送数据的剩余数据量为3条数据流的总的剩余数据量。其中,剩余数据量的单位可以为字节(byte)。
可选的,发送端的信息的对应关系可以以表格的形式呈现,表中的每一行可以称为表项,每个表项用于存储一个发送端的信息。发送端的信息还可以包括序号和发送端名称。可选的,表中可以不包括第一数值和第二数值。发送端的第一数值和第二数值可以存储在对应的发送端VOQ中。
示例的,表1呈现了发送端的信息的对应关系。
表1
序号 发送端名称 发送端的地址 发送端VOQ的标识 第一数值 第二数值
1 交换机131 192.168.0.4 VOQ1_1 2 1000
2 交换机132 192.168.0.5 VOQ1_2 5 5000
3 交换机134 192.168.0.6 VOQ1_3 4 3000
由表1可知,VOQ1表示发送端的VOQ。VOQ1_1可以表示交换机131的VOQ的标识。交换机131的地址可以是192.168.0.4。交换机131的地址192.168.0.4与交换机131的VOQ的标识VOQ_1具有对应关系。交换机131向交换机133发送的数据流的个数为2;交换机131向交换机133待发送数据的剩余数据量为1000字节。
VOQ1_2可以表示交换机132的VOQ的标识。交换机132的地址可以是192.168.0.5。交换机132的地址192.168.0.5与交换机132的VOQ的标识VOQ_2具有对应关系。交换机132向交换机133发送的数据流的个数为5;交换机132向交换机133待发送数据的剩余数据量为5000字节。
VOQ1_3可以表示交换机134的VOQ的标识。交换机134的地址可以是192.168.0.6。交换机134的地址192.168.0.3与交换机134的VOQ的标识VOQ_3具有对应关系。交换机134向交换机133发送的数据流的个数为4;交换机134向交换机133待发送数据的剩余数据量为3000字节。
需要说明的是,表1只是以表格的形式示意发送端的信息的对应关系在存储设备中的存储形式,并不是对发送端的信息的对应关系在存储设备中的存储形式的限定,当然,发送端的信息的对应关系在存储设备中的存储形式还可以以其他的形式存储,本申请实施例对此不做限定。
可选的,在交换机133接收来自发送端的通知报文后,可以根据通知报文包含的内容更新发送端的信息的对应关系表。示例的,如图4所示,交换机133接收来自交换机131的通知报文后,还可以执行S401至S405。
S401、交换机133确定是否存储有交换机131的信息。
若交换机133确定存储有交换机131的信息,执行S402;若交换机133确定未存储交换机131的信息,表示交换机133第一次接收到交换机131发送的数据,且交换机131的剩余数据量不为0,执行S405。
S402、交换机133确定接收到的交换机131的剩余数据量是否为0。
若交换机133确定接收到的交换机131的剩余数据量不为0,执行S403;若交换机133确定接收到的交换机131的剩余数据量为0,表示交换机131没有向交换机133 待发送的数据,执行S404。
可理解的,交换机131的剩余数据量为交换机131向交换机133待发送数据的剩余数据量。
S403、交换机133根据交换机131待发送数据的数据流的个数M更新第一数值,以及根据交换机131待发送数据的数据流的剩余数据量更新第二数值。
可选的,交换机133根据交换机131待发送数据的数据流的个数M更新交换机131表项的第一数值。假设交换机133存储的交换机131的第一数值为2,接收到的交换机131待发送数据的数据流的个数为3,交换机131的第一数值更新为3。
可选的,交换机133根据交换机131待发送数据的数据流的剩余数据量更新交换机131表项的第二数值。假设交换机133存储的交换机131的第二数值为1000字节,接收到的交换机131待发送数据的数据流的剩余数据量为2000字节,交换机131的第二数值更新为2000字节。
S404、交换机133删除存储的交换机131的信息。
交换机133删除存储的交换机131的表项的信息,即可以删除存储的交换机131的名称、地址、VOQ的标识、待发送数据的数据流的个数和剩余数据量。示例的,如表2所示,为删除了表1中的交换机131的表项的信息的表。
表2
序号 发送端名称 发送端的地址 发送端VOQ的标识 第一数值 第二数值
1 交换机132 192.168.0.5 VOQ1_2 5 5000
2 交换机134 192.168.0.6 VOQ1_3 4 3000
S405、交换机133将交换机131待发送数据的数据流的个数M存为第一数值,以及将交换机131待发送数据的数据流的剩余数据量存为第二数值。
可选的,交换机133将交换机131待发送数据的数据流的个数M存为交换机131表项的第一数值。假设交换机133接收到的交换机131待发送数据的数据流的个数为3,将交换机131的第一数值存为3。
可选的,交换机133将交换机131待发送数据的数据流的剩余数据量存为交换机131表项的第二数值。假设交换机133接收到的交换机131待发送数据的数据流的剩余数据量为2000字节,将交换机131的第二数值存为2000字节。
在交换机133首次接收到发送端发送的数据,可以在表1中新增表项,新增发送端的信息。示例的,交换机133首次接收到交换机131发送的数据,交换机133可以配置交换机131的表项。如表3所示,在表3中新增交换机131的信息的对应关系,以便于交换机133可以根据交换机131的地址确定交换机131的标识,存储交换机131待发送数据的个数和剩余数据量。
表3
序号 发送端名称 发送端的地址 发送端VOQ的标识 第一数值 第二数值
1 交换机132 192.168.0.5 VOQ1_2 5 5000
2 交换机134 192.168.0.6 VOQ1_3 4 3000
3 交换机131 192.168.0.4 VOQ1_1 2 1000
在另一些实施例中,若交换机133确定未存储交换机131的信息,且交换机131的剩余数据量为0,交换机133无需新增交换机131的表项。
在一种可能的设计中,交换机133可以采用循环方式调度发送端,根据发送端的数据流的个数向发送端反馈信用标记。发送端的数据流的个数越多,向发送端反馈信用标记的越多。
例如,发送端的信息的对应关系表的表项中记录有发送端的数据流的个数,交换机133可以采用循环方式调度发送端的信息的对应关系表中记录的表项,根据发送端的数据流的个数向发送端反馈信用标记。
又例如,发送端VOQ中记录有发送端的数据流的个数,交换机133可以采用循环方式调度发送端VOQ,根据发送端的数据流的个数向发送端反馈信用标记。可选的,交换机133可以根据发送端的信息的对应关系表中记录的表项循环调度发送端VOQ。
如图5所示,交换机133调度到一个发送端后,可以执行S501至S502。这里以第i发送端为例进行说明,第i发送端可以是发送端的信息的对应关系表中任意一个发送端。
S501、交换机133在Xi个周期内向第i发送端发送Xi个指示报文。
Xi可以表示第i发送端的待发送数据流的数据流的个数。交换机133在Xi个周期的每个周期内发送一个指示报文。每个指示报文包括一个信用标记,信用标记指示第i发送端依据第一数据量发送数据。第一数据量可以是预先配置的。数据中心网络中的每个设备均预先配置第一数据量,以便于设备根据信用标记指示的第一数据量发送数据。
在一些实施例中,周期、第一数据量和交换机133的带宽满足公式(1)。
C=D/BW    (1)
其中,C表示周期,D表示第一数据量,BW表示交换机133的带宽。
S502、交换机133调度第i+1发送端。
交换机133在Xi+1个周期内向第i+1发送端发送Xi+1个指示报文。Xi+1可以表示第i+1发送端的待发送数据流的数据流的个数。
可理解的,交换机133调度第i发送端和第i+1发送端之间间隔了Xi个周期。
示例的,如图6所示,交换机133依次调度交换机131的VOQ、交换机132的VOQ和交换机134的VOQ,依此循环。当交换机133调度到交换机131时,执行S203。
可选的,若发送端的信息的对应关系表中新增了表项,交换机133增加调度发送端VOQ的个数。例如,如图7所示,假设数据中心网络的接入层130还包括交换机135,交换机135分别与汇聚层120中的设备和工作站连接,发送端的信息的对应关系表中新增交换机135的信息的对应关系,交换机133依次调度交换机131的VOQ、交换机132的VOQ、交换机134的VOQ和交换机135的VOQ,依此循环。
可选的,若发送端的信息的对应关系表中删除了表项,交换机133减少调度发送端VOQ的个数。例如,如图8所示,减少交换机134的信息的对应关系,交换机133依次调度交换机131的VOQ和交换机132的VOQ,依此循环。
S203、交换机133在M个周期内向交换机131发送M个指示报文,每个指示报 文包括一个信用标记。
交换机133在M个周期的每个周期内向交换机131发送一个指示报文。信用标记指示交换机131依据第一数据量发送数据。
S204、交换机131接收来自交换机133的M个指示报文。
在一些实施例中,交换机131可以以交换机133发送指示报文的周期接收指示报文,即在M个周期的每个周期内接收来自交换机133的一个指示报文。
在另一些实施例中,由于数据中心网络存在某些质量问题,交换机131可能不按周期接收交换机133发送的指示报文,交换机131接收来自交换机133的M个指示报文的时间间隔可能不同。
可选的,如图9所示,在交换机131接收来自交换机133的M个指示报文之后,方法还包括S901。
S901、交换机131更新交换机131存储的交换机133的信用标记的个数。
在一些实施例中,交换机131接收到来自交换机133的一个信用标记,就对交换机133的信用标记的个数加一。
S205、交换机131根据M个信用标记向交换机133发送M个数据流的数据。
交换机131可以根据M个信用标记向交换机133发送M个数据流中每个数据流的数据,或者向交换机133发送M个数据流中部分数据流的数据,不予限定。交换机131向交换机133待发送数据的数据流的剩余数据量的减少量满足公式(2)。
E=A1*D     (2)
其中,E表示减少量,A1表示交换机131向交换机133发送数据的信用标记的个数,D表示第一数据量。
在一些实施例中,交换机131可以轮询交换机133的M个数据流,每次轮询到一个数据流,根据一个信用标记发送一次数据,发送的数据的数据量为第一数据量。
S206、交换机133接收来自交换机131的M个数据流的数据。
交换机133可以根据交换机131发送M个数据流的数据的周期接收M个数据流的数据,即在在M个周期的每个周期内接收来自交换机131的一个数据流的数据,M个数据流中每条数据流的数据的数据量为第一数据量。
在另一些实施例中,由于数据中心网络存在某些质量问题,交换机133可能不按周期接收交换机131发送的数据,交换机133接收来自交换机131的M个数据流的数据的时间间隔可能不同。
从而,交换机133通过接收来自交换机131的通知报文,获知交换机131待发送数据的数据流的个数。由于交换机133无需存储交换机131的每个数据流的信息,存储交换机131的数据流的个数,有效地降低了交换机133的存储开销。另外,交换机133根据待发送数据的数据流的个数向交换机131发送信用标记,使得交换机131根据信用标记指示的数据量发送每个数据流的数据,从而,使每条数据流发送一次数据的数据量相同,保障数据流之间的公平性,也使得交换机133接收数据的速率之和小于或等于该交换机133的带宽,避免交换机133发生网络拥塞。
在另一些实施例中,由于交换机131可以向多个接收端发送数据,如果将发往不同接收端的数据流全排在一个队列,这样可能发生“队头阻塞”的现象。比如第一个 数据流的数据量特别多,第二个数据流的数据量特别少,在第一个数据流的数据发送完成后,再发送第二个数据流的数据,因此,第二个数据流的数据被阻塞。例如,第一个数据流可以是交换机131向交换机133发送数据对应的数据流。第二个数据流可以是交换机131向交换机134发送数据对应的数据流。
在一种可能的设计中,交换机131可以为每个接收端配置一个VOQ,区分发往不同接收端的数据流的数据。接收端VOQ用于发送端(如:交换机131)区分不同接收端的数据流的数据。示例的,如图10所示,交换机131向交换机132、交换机133和交换机134发送数据,交换机131可以配置接收端VOQ1、接收端VOQ2和接收端VOQ3。接收端VOQ1用于缓存发往交换机132的数据。接收端VOQ2用于缓存发往交换机133的数据。接收端VOQ3用于缓存发往交换机134的数据。
从而,交换机131依据接收端VOQ对发往不同接收端的数据进行划分,将发往不同接收端的数据缓存在接收端对应的VOQ内,发往不同接收端的数据在不同接收端VOQ内排队,避免发生“队头阻塞”的现象。
可选的,交换机131生成数据后,可以根据接收端的地址确定接收端VOQ的标识,将发往接收端的数据缓存到接收端VOQ的标识指示的接收端VOQ中。例如,交换机131可以根据交换机132的地址确定接收端VOQ1的标识,将发往交换机132的数据缓存到接收端VOQ1。交换机131可以根据交换机133的地址确定接收端VOQ2的标识,将发往交换机133的数据缓存到接收端VOQ2。交换机131可以根据交换机134的地址确定接收端VOQ3的标识,将发往交换机134的数据缓存到接收端VOQ3。
接收端的地址与接收端VOQ的标识的对应关系可以以表格的形式呈现,即表4呈现了接收端的地址与接收端VOQ的标识的对应关系。
表4
序号 接收端 接收端的地址 接收端VOQ的标识
1 交换机132 192.168.0.1 VOQ2_1
2 交换机133 192.168.0.2 VOQ2_2
3 交换机134 192.168.0.3 VOQ2_3
由表4可知,VOQ2表示接收端的VOQ。VOQ2_1可以表示交换机132的VOQ的标识。交换机132的地址可以是192.168.0.1。交换机132的地址192.168.0.1与交换机132的VOQ的标识VOQ2_1具有对应关系。
VOQ2_2可以表示交换机133的VOQ的标识。交换机133的地址可以是192.168.0.2。交换机133的地址192.168.0.2与交换机133的VOQ的标识VOQ2_2具有对应关系。
VOQ2_3可以表示交换机134的VOQ的标识。交换机134的地址可以是192.168.0.3。交换机134的地址192.168.0.3与交换机134的VOQ的标识VOQ2_3具有对应关系。
需要说明的是,表4只是以表格的形式示意接收端的地址与接收端VOQ的标识的对应关系在存储设备中的存储形式,并不是对接收端的地址与接收端VOQ的标识的对应关系在存储设备中的存储形式的限定,当然,接收端的地址与接收端VOQ的标识的对应关系在存储设备中的存储形式还可以以其他的形式存储,本申请实施例对此不做限定。
可选的,表4中的每一行可以称为表项。在交换机131初次生成了发往接收端的数据流,可以在表4中新增表项,新增接收端的地址与接收端VOQ的标识的对应关系。示例的,假设数据中心网络的接入层130还包括交换机135,交换机131生成发往交换机135的数据流的数据,交换机131可以配置接收端VOQ4,接收端VOQ4用于缓存发往交换机135的数据。如表5所示,在表4中新增交换机135的地址和交换机135的VOQ4的标识的对应关系,以便于交换机131可以根据交换机135的地址确定接收端VOQ4的标识,将发往交换机135的数据缓存到接收端VOQ4。
表5
序号 接收端 接收端的地址 接收端VOQ的标识
1 交换机132 192.168.0.1 VOQ2_1
2 交换机133 192.168.0.2 VOQ2_2
3 交换机134 192.168.0.3 VOQ2_3
4 交换机135 192.168.0.4 VOQ2_4
由表5可知,VOQ2_4可以表示交换机135的VOQ的标识。交换机135的地址可以是192.168.0.4。交换机135的地址192.168.0.4与交换机135的VOQ的标识VOQ_4具有对应关系。
可选的,在交换机131将表4中的接收端的数据发送完成后,交换机131可以删除该接收端对应的表项。示例的,交换机131发往交换机134的数据发送完成,交换机131删除交换机134的表项,如表6所示,为删除交换机134的表项的表。
表6
序号 接收端 接收端的地址 接收端VOQ的标识
1 交换机132 192.168.0.1 VOQ2_1
2 交换机133 192.168.0.2 VOQ2_2
在一种可能的设计中,交换机131可以采用循环方式调度接收端VOQ,发送接收端VOQ缓存的数据。可选的,交换机131可以根据接收端的地址与接收端VOQ的标识的对应关系表中记录的表项循环调度接收端VOQ。
在一些实施例中,如图11所示,交换机131调度到一个接收端VOQ,可以执行S1101至S1103,即根据信用标记发送该接收端VOQ的数据。这里以第i接收端VOQ为例进行说明,第i接收端VOQ可以是接收端的地址与接收端VOQ的标识的对应关系表中任意一个接收端VOQ。
S1101、交换机131确定第i接收端的信用标记的个数是否大于0。
若交换机131确定第i接收端的信用标记的个数大于0,执行S1102;若交换机131确定第i接收端的信用标记的个数等于0,不允许发送第i接收端VOQ内的数据,执行S1103。
S1102、交换机131根据Xi个信用标记向第i接收端发送数据。
在一些实施例中,交换机131根据信用标记指示的第一数据量向第i接收端发送数据报文,数据报文的数据量为第一数据量。数据报文包括交换机131待发送数据的 数据流的个数。
可选的,交换机131没发送一次数据,信用标记的个数就减一,以便于交换机131根据剩余的信用标记发送数据。
S1103、交换机131调度第i+1接收端。
交换机131确定第i+1接收端的信用标记的个数是否大于0,从而,确定是否发送第i+1接收端VOQ内的数据。
可理解的,交换机131调度第i接收端和第i+1接收端之间间隔了Xi个周期。
示例的,在交换机131向交换机133发送通知报文前,交换机131可以确定交换机133的信用标记的个数是否大于0,若交换机131确定交换机133的信用标记的个数大于0,交换机131向交换机133发送通知报文;若交换机131确定交换机133的信用标记的个数等于0,调度其他接收端。
示例的,如图12所示,交换机131依次调度交换机132的VOQ、交换机133的VOQ和交换机134的VOQ,依此循环。
可选的,若接收端的地址与接收端VOQ的标识的对应关系表中新增了表项,交换机131增加调度接收端VOQ的个数。例如,如图13所示,假设数据中心网络的接入层130还包括交换机135,接收端的地址与接收端VOQ的标识的对应关系表中新增交换机135的地址和交换机135的VOQ4的标识的对应关系,交换机131依次调度交换机132的VOQ、交换机133的VOQ、交换机134的VOQ和交换机135的VOQ,依此循环。
可选的,若接收端的地址与接收端VOQ的标识的对应关系表中删除了表项,交换机131减少调度接收端VOQ的个数。例如,如图14所示,减少交换机134的地址和交换机134的VOQ3的标识的对应关系,交换机131依次调度交换机132的VOQ和交换机133的VOQ,依此循环。
在另一些实施例中,数据中心网络中有些设备可能无法识别信用标记,对于该类设备而言,接收端可以根据接收到的数据的数据量指示发送端停止发送数据。如图15所示,所述方法还包括以下步骤。
S1501、交换机134向交换机133发送数据。
S1502、交换机133接收来自交换机134的数据。
S1503、交换机133确定第二数据量。
交换机133统计接收到的来自交换机134的数据,第二数据量为接收到的来自交换机134的数据的数据量。当第二数据量与第三数据量之差大于预设数据量,或第二数据量与第三数据量之差的绝对值大于预设数据量时,执行S1504。
第三数据量是根据交换机133的带宽和多个发送端的数据流的个数确定的。在一些实施例中,第三数据量可以满足公式(3)。
F=BW*(K/L)     (3)
其中,F表示第三数据量,BW表示交换机133的带宽,K表示交换机134的数据流的个数,L表示向交换机133发送数据的所有发送端的数据流的个数,可以包括交换机134的数据流的个数和交换机131的数据流的个数。
S1504、交换机133向交换机134发送停止报文。
停止报文指示交换机134停止发送数据。
S1505、交换机134接收来自交换机133的停止报文,停止向交换机133发送数据。
从而,在交换机134无法识别信用标记的情况下,交换机133可以统计来自交换机134的数据的数据量,若来自交换机134的数据的数据量和来自交换机131的数据的数据量大于交换机133的处理数据的能力,交换机133可以向交换机134发送停止报文,指示交换机134停止发送数据,避免交换机133接收过多的来自交换机134的数据的数据量,发生网络拥塞。
可以理解的是,为了实现上述实施例中功能,交换机包括了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本申请中所公开的实施例描述的各示例的单元及方法步骤,本申请能够以硬件或硬件和计算机软件相结合的形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用场景和设计约束条件。
图16、图17和图18为本申请的实施例提供的可能的通信装置的结构示意图。这些通信装置可以用于实现上述方法实施例中交换机的功能,因此也能实现上述方法实施例所具备的有益效果。
如图16所示,本申请实施例提供了一种通信装置1600,该通信装置1600可以是如图1所示的交换机131,还可以是应用于交换机131的模块(如芯片)。该通信装置1600包括接收单元1610、发送单元1620、处理单元1630。通信装置1600用于实现上述图2、图9、图11或图15中所示的方法实施例中交换机131的功能。
当通信装置1600用于实现图2所示的方法实施例中交换机131的功能时:接收单元1610用于执行S204;发送单元1620用于执行S201和S205。
当通信装置1600用于实现图9所示的方法实施例中交换机131的功能时:接收单元1610用于执行S204;发送单元1620用于执行S201和S205,处理单元1630用于执行S901。
当通信装置1600用于实现图11所示的方法实施例中交换机131的功能时:发送单元1620用于执行S1102,处理单元1630用于执行S1101和S1103。
当通信装置1600用于实现图15所示的方法实施例中交换机131的功能时:接收单元1610用于执行S204;发送单元1620用于执行S201和S205,处理单元1630用于执行S901。
有关上述接收单元1610、发送单元1620、处理单元1630更详细的描述可以直接参考图2、图9、图11或图15所示的方法实施例中相关描述直接得到。
如图17所示,本申请实施例提供了一种通信装置1700,该通信装置1700可以是如图1所示的交换机133,还可以是应用于交换机133的模块(如芯片)。该通信装置1700包括第一接收单元1710、第一发送单元1720、第一处理单元1730、第二接收单元1740、第二发送单元1750和第二处理单元1760。通信装置1700用于实现上述图2、图4、图5、图9或图15中所示的方法实施例中交换机133的功能。
当通信装置1700用于实现图2所示的方法实施例中交换机133的功能时:第一接收单元1710用于执行S202和S206,第一发送单元1720用于执行S203。
当通信装置1700用于实现图4所示的方法实施例中交换机133的功能时:第一接 收单元1710用于执行S202;第一处理单元1730用于执行S401至S405。
当通信装置1700用于实现图5所示的方法实施例中交换机133的功能时:第一发送单元1720用于执行S501;第一处理单元1730用于执行S502。
当通信装置1700用于实现图9所示的方法实施例中交换机133的功能时:第一接收单元1710用于执行S202和S206,第一发送单元1720用于执行S203。
当通信装置1700用于实现图15所示的方法实施例中交换机133的功能时:第一接收单元1710用于执行S202和S206,第一发送单元1720用于执行S203。
当通信装置1700用于实现图15所示的方法实施例中交换机133的功能时:第二接收单元1740用于执行S1502,第二处理单元1760用于执行S1503,第二发送单元1750用于执行S1504。
有关上述处理单元1710和收发单元1720更详细的描述可以直接参考图2、图4、图5、图9或图15所示的方法实施例中相关描述直接得到。
如图18所示,通信装置1800包括处理器1810和接口电路1820。处理器1810和接口电路1820之间相互耦合。可以理解的是,接口电路1820可以为收发器或输入输出接口。可选的,通信装置1800还可以包括存储器1830,用于存储处理器1810执行的指令或存储处理器1810运行指令所需要的输入数据或存储处理器1810运行指令后产生的数据。
当通信装置1800用于实现图2、图4、图5、图9、图11或图15所示的方法时,处理器1810用于执行上述处理单元1630、第一处理单元1730或第二处理单元1760的功能,接口电路1820用于执行上述接收单元1610、发送单元1620、第一接收单元1710、第一发送单元1720、第二接收单元1740或第二发送单元1750的功能。
可以理解的是,本申请的实施例中的处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其它通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其它可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。通用处理器可以是微处理器,也可以是任何常规的处理器。
本申请的实施例中的方法步骤可以通过硬件的方式来实现,也可以由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于网络设备或终端设备中。当然,处理器和存储介质也可以作为分立组件存在于网络设备或终端设备中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实 现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序或指令。在计算机上加载和执行所述计算机程序或指令时,全部或部分地执行本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、用户设备或者其它可编程装置。所述计算机程序或指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机程序或指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是集成一个或多个可用介质的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,例如,软盘、硬盘、磁带;也可以是光介质,例如,数字视频光盘(digital video disc,DVD);还可以是半导体介质,例如,固态硬盘(solid state drive,SSD)。
在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。在本申请的文字描述中,字符“/”,一般表示前后关联对象是一种“或”的关系;在本申请的公式中,字符“/”,表示前后关联对象是一种“相除”的关系。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定。

Claims (20)

  1. 一种接收数据的方法,其特征在于,包括:
    接收端接收来自第一发送端的通知报文,所述通知报文包括所述第一发送端待发送数据的数据流的个数M,M为大于或等于1的整数;
    所述接收端在M个周期内向所述第一发送端发送M个指示报文,一个所述周期内发送一个所述指示报文,每个指示报文包括一个信用标记,所述信用标记指示所述第一发送端依据第一数据量发送数据;
    所述接收端接收来自所述第一发送端的M个数据流的数据,所述M个数据流中每条数据流的数据的数据量为所述第一数据量。
  2. 根据权利要求1所述的方法,其特征在于,在所述接收端接收来自第一发送端的通知报文之后,所述方法还包括:
    所述接收端根据所述M更新第一数值;
    或者,
    将所述M存为第一数值;
    所述第一数值指示所述接收端存储的所述第一发送端向所述接收端发送的数据流的个数。
  3. 根据权利要求2所述的方法,其特征在于,所述通知报文还包括所述第一发送端的剩余数据量,所述方法还包括:
    所述接收端根据所述第一发送端的剩余数据量更新第二数值,所述第二数值指示所述接收端存储的所述第一发送端的剩余数据量;
    或者,
    将所述剩余数据量存为第二数值,所述第二数值指示所述接收端存储的所述第一发送端的剩余数据量;
    所述第一发送端的剩余数据量为所述第一发送端向所述接收端待发送数据的剩余数据量。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    当接收到的所述第一发送端的剩余数据量为0时,所述接收端删除存储的所述第一发送端的信息。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述方法还包括:
    所述接收端接收来自第二发送端的数据;
    所述接收端确定第二数据量,所述第二数据量为接收到的来自所述第二发送端的数据的数据量;
    当所述第二数据量与第三数据量之差大于预设数据量时,向所述第二发送端发送停止报文,所述停止报文指示所述第二发送端停止发送数据,所述第三数据量是根据所述接收端的带宽和多个发送端的数据流的个数确定的,所述多个发送端包括所述第一发送端和所述第二发送端。
  6. 一种发送数据的方法,其特征在于,包括:
    发送端向接收端发送通知报文,所述通知报文包括所述发送端待发送数据的数据流的个数M,M为大于或等于1的整数;
    所述发送端接收来自所述接收端的M个指示报文,所述M个指示报文中的每个指示报文包括一个信用标记,所述信用标记指示所述发送端依据第一数据量发送数据;
    所述发送端根据所述M个信用标记向所述接收端发送M个数据流的数据,所述M个数据流中每条数据流的数据的数据量为所述第一数据量。
  7. 根据权利要求6所述的方法,其特征在于,所述通知报文还包括所述发送端的剩余数据量,所述发送端的剩余数据量为所述发送端向所述接收端待发送数据的剩余数据量。
  8. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    所述发送端确定所述接收端的所述信用标记的个数是否大于0;
    若所述信用标记的个数大于0,所述发送端向所述接收端发送所述通知报文。
  9. 根据权利要求6-8中任一项所述的方法,其特征在于,在所述发送端接收来自所述接收端的M个指示报文之后,所述方法还包括:
    所述发送端更新所述发送端存储的所述接收端的信用标记的个数。
  10. 一种通信装置,其特征在于,所述通信装置为接收端,包括:
    第一接收单元,用于接收来自第一发送端的通知报文,所述通知报文包括所述第一发送端待发送数据的数据流的个数M,M为大于或等于1的整数;
    第一发送单元,还用于在M个周期内向所述第一发送端发送M个指示报文,一个所述周期内发送一个所述指示报文,每个指示报文包括一个信用标记,所述信用标记指示所述第一发送端依据第一数据量发送数据;
    所述第一接收单元,还用于接收来自所述第一发送端的M个数据流的数据,所述M个数据流中每条数据流的数据的数据量为所述第一数据量。
  11. 根据权利要求10所述的通信装置,其特征在于,所述装置还包括第一处理单元,其中,
    所述第一处理单元,用于根据所述M更新第一数值;
    或者,
    将所述M存为第一数值;
    所述第一数值指示所述接收端存储的所述第一发送端向所述接收端发送的数据流的个数。
  12. 根据权利要求11所述的通信装置,其特征在于,所述通知报文还包括所述第一发送端的剩余数据量,所述第一处理单元还用于:
    根据所述第一发送端的剩余数据量更新第二数值,所述第二数值指示所述接收端存储的所述第一发送端的剩余数据量;
    或者,
    将所述剩余数据量存为第二数值,所述第二数值指示所述接收端存储的所述第一发送端的剩余数据量;
    所述第一发送端的剩余数据量为所述第一发送端向所述接收端待发送数据的剩余数据量。
  13. 根据权利要求12所述的通信装置,其特征在于,
    当接收到的所述第一发送端的剩余数据量为0时,所述第一处理单元还用于删除 存储的所述第一发送端的信息。
  14. 根据权利要求10-13中任一项所述的通信装置,其特征在于,所述通信装置还包括第二接收单元、第二发送单元和第二处理单元,
    所述第二接收单元用于接收来自第二发送端的数据;
    所述第二处理单元,用于确定第二数据量,所述第二数据量为接收到的来自所述第二发送端的数据的数据量;
    所述第二发送单元,用于当所述第二数据量与第三数据量之差大于预设数据量时,向所述第二发送端发送停止报文,所述停止报文指示所述第二发送端停止发送数据,所述第三数据量是根据所述接收端的带宽和多个发送端的数据流的个数确定的,所述多个发送端包括所述第一发送端和所述第二发送端。
  15. 一种通信装置,其特征在于,所述通信装置为发送端,包括:
    发送单元,用于向接收端发送通知报文,所述通知报文包括所述发送端待发送数据的数据流的个数M,M为大于或等于1的整数;
    接收单元,用于接收来自所述接收端的M个指示报文,所述M个指示报文中的每个指示报文包括一个信用标记,所述信用标记指示所述发送端依据第一数据量发送数据;
    所述发送单元,还用于根据所述M个信用标记向所述接收端发送M个数据流的数据,所述M个数据流中每条数据流的数据的数据量为所述第一数据量。
  16. 根据权利要求15所述的通信装置,其特征在于,所述通知报文还包括所述发送端的剩余数据量,所述发送端的剩余数据量为所述发送端向所述接收端待发送数据的剩余数据量。
  17. 根据权利要求15或16所述的通信装置,其特征在于,所述发送单元,用于在所述接收端的所述信用标记的个数大于0时,向所述接收端发送所述通知报文。
  18. 根据权利要求15-17中任一项所述的装置,其特征在于,所述装置还包括处理单元,其中,
    所述处理单元,用于更新所述发送端存储的所述接收端的信用标记的个数。
  19. 一种通信装置,其特征在于,包括处理器、存储器和接口电路,所述接口电路用于接收来自所述通信装置之外的其它通信装置的报文并传输至所述处理器,所述存储器用于存储代码指令,使得所述代码指令被所述处理器执行时实现如权利要求1-5中任一项所述的方法。
  20. 一种通信装置,其特征在于,包括处理器、存储器和接口电路,所述接口电路用于将来自所述处理器的报文发送给所述通信装置之外的其它通信装置,所述存储器用于存储代码指令,使得所述代码指令被所述处理器执行时实现如权利要求6-9中任一项所述的方法。
PCT/CN2020/117403 2019-12-19 2020-09-24 一种收发数据的方法及装置 WO2021120764A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911319930.2A CN113014498A (zh) 2019-12-19 2019-12-19 一种收发数据的方法及装置
CN201911319930.2 2019-12-19

Publications (1)

Publication Number Publication Date
WO2021120764A1 true WO2021120764A1 (zh) 2021-06-24

Family

ID=76381568

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117403 WO2021120764A1 (zh) 2019-12-19 2020-09-24 一种收发数据的方法及装置

Country Status (2)

Country Link
CN (1) CN113014498A (zh)
WO (1) WO2021120764A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978986B (zh) * 2022-05-13 2024-05-14 中国联合网络通信集团有限公司 一种数据传输方法、装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018004944A1 (en) * 2016-06-30 2018-01-04 Intel Corporation System to monitor and control data in a network
CN108418767A (zh) * 2018-02-09 2018-08-17 华为技术有限公司 数据传输方法、设备及计算机存储介质
CN109067665A (zh) * 2018-09-25 2018-12-21 华为技术有限公司 拥塞控制方法和网络设备
CN109995664A (zh) * 2017-12-29 2019-07-09 华为技术有限公司 一种发送数据流的方法、设备和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018004944A1 (en) * 2016-06-30 2018-01-04 Intel Corporation System to monitor and control data in a network
CN109995664A (zh) * 2017-12-29 2019-07-09 华为技术有限公司 一种发送数据流的方法、设备和系统
CN108418767A (zh) * 2018-02-09 2018-08-17 华为技术有限公司 数据传输方法、设备及计算机存储介质
CN109067665A (zh) * 2018-09-25 2018-12-21 华为技术有限公司 拥塞控制方法和网络设备

Also Published As

Publication number Publication date
CN113014498A (zh) 2021-06-22

Similar Documents

Publication Publication Date Title
CN109412964B (zh) 报文控制方法及网络装置
US11757763B2 (en) System and method for facilitating efficient host memory access from a network interface controller (NIC)
US9553820B2 (en) Maintaining packet order in a parallel processing network device
US9083655B2 (en) Internal cut-through for distributed switches
JP2021536196A (ja) 輻輳制御方法及びネットワークデバイス
US10374959B2 (en) Method for transmitting data in a packet-oriented communications network and correspondingly configured user terminal in said communications network
US9106593B2 (en) Multicast flow reordering scheme
WO2018121535A1 (zh) 一种负载均衡处理方法及装置
WO2018036173A1 (zh) 一种网络负载均衡方法、设备及系统
WO2020078448A1 (zh) 一种报文处理方法和装置
WO2021244450A1 (zh) 一种通信方法及装置
JP2023511889A (ja) サービスレベル構成方法および装置
WO2019080866A1 (zh) 数据传输方法、设备及计算机存储介质
WO2021120764A1 (zh) 一种收发数据的方法及装置
CN109995608B (zh) 网络速率计算方法和装置
US11646978B2 (en) Data communication method and apparatus
WO2023108479A1 (zh) 确定性流传输方法及装置
US9621487B2 (en) Method and apparatus for protection switching based on memory control in packet transport system
US20210135999A1 (en) Packet Control Method, Flow Table Update Method, and Node Device
US20170373982A1 (en) System and method for mtu size reduction in a packet network
CN108924066B (zh) 报文转发方法和装置
WO2024061042A1 (zh) 数据传输方法和数据传输系统
WO2022246710A1 (zh) 一种控制数据流传输的方法及通信装置
US20230403229A1 (en) System and method for facilitating efficient host memory access from a network interface controller (nic)
US11729099B2 (en) Scalable E2E network architecture and components to support low latency and high throughput

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20903187

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20903187

Country of ref document: EP

Kind code of ref document: A1