Method and device for transmitting and receiving data
By receiving notification messages from the sending end at the receiving end of the data center and sending credit marks, the storage pressure and fairness problems caused by the increase in the number of data streams are solved, and fair transmission of data streams and stable operation of the network are achieved.
Patent Information
- Application Number
- CN201911319930.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-19
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2039-12-19
AI Technical Summary
In a data center, as the number of data streams increases, the receiver may not be able to maintain information about all data streams, resulting in network congestion and data stream fairness issues.
The receiving end receives a notification message from the sending end, knows the number of data streams to be sent, and sends a credit mark to the sending end within each cycle, so that the sending end can send data according to the specified data amount, thereby ensuring that the data amount sent by each data stream is the same.
It effectively reduces the storage overhead of the receiver, ensures fairness between data flows, and avoids network congestion.
Smart Images

Figure CN113014498B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a method and device for sending and receiving data. Background Art
[0002] A data center is a network that contains multiple devices (such as servers, routers, switches) for transmitting, accelerating, computing, and storing data. The device that sends data can be called a sender, and the device that receives data can be called a receiver. In the case where a receiver receives messages from multiple senders, if the amount of data received per second is greater than the bandwidth of the receiver, it may cause network congestion at the receiver. Bandwidth can refer to the number of bits that can be transmitted per second, measured in bit rate (bps). The higher the bit rate, the more data is transmitted per second.
[0003] Usually, 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, ensuring fairness between different data streams, and making the sum of the rates at which the receiving end receives data less than or equal to the bandwidth of the receiving end, avoiding network congestion at the receiving end. However, as the scale of data centers increases, the number of data streams also increases, which may cause the information of the data streams to be stored at the receiving end to exceed the storage capacity of the receiving end, so that the receiving end cannot maintain the information of some data streams.
[0004] In order to avoid the receiving end being unable to maintain the information of the data stream, 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 data volume to avoid network congestion at the receiving end. However, the sending end may send data of multiple data streams to the receiving end. For each data stream, the sending end can adjust the data volume of the sent data according to the preset data volume, so that the sum of the data volume sent by all data streams at one time is equal to the preset data volume. In this case, due to the difference in the number of data streams of different sending ends, the data volume sent by the data streams between different sending ends may be different. In this case, the fairness of the data streams between different sending ends cannot be guaranteed.
[0005] Therefore, how to make each data stream send the same amount of data at a time while reducing the storage overhead at the receiving end and ensure fairness among data streams is an urgent problem to be solved. Summary of the invention
[0006] The present application provides a method and device for sending and receiving data, which solves the problem of how to make the amount of data sent by each data stream the same while reducing the storage overhead of the receiving end, thereby ensuring fairness among data streams.
[0007] In a first aspect, the present application provides a method for receiving data, which can be applied to a receiving device, or the method can be applied to a communication device that can support the receiving device to implement the method, for example, the communication device includes a chip system.
[0008] After receiving the notification message from the first sending end, the receiving end sends an indication message to the sending end in each of the M cycles, each indication message includes a credit tag, and the credit tag indicates that the sending end sends data according to the first data amount, so that the sending end sends data of M data streams to the receiving end according to the M credit tags, and the receiving end receives data of the M data streams from the sending end, and the data amount of each data stream in the M data streams is the first data amount. The notification message includes the number M of data streams of data to be sent by the first sending end, where M is an integer greater than or equal to 1.
[0009] In the method for receiving data provided by the present application, the receiving end learns the number of data streams of the data 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 of the sending end, it only needs to store the number of data streams of each sending end, thereby effectively reducing the storage overhead of the receiving end. In addition, the receiving end sends a credit mark to the sending end according to the number of data streams of the data to be sent, controls the sending rate of the sending end, and makes the sending end send the data of each data stream according to the amount of data indicated by the credit mark, thereby making the amount of data sent by each data stream the same, and ensuring fairness between data streams.
[0010] In a possible implementation, after the receiving end receives the notification message from the first sending end, the receiving end updates the first value according to M; or stores M as the first value; wherein the first value indicates the number of data streams sent by the first sending end to the receiving end stored by the receiving end. Thus, the receiving end reduces the storage overhead of the receiving end by storing the number of data streams of the sending end.
[0011] In another possible implementation, the notification message also includes the remaining data amount of the first sending end, and the receiving end updates the second value according to the remaining data amount of the first sending end, and the second value indicates the remaining data amount of the first sending end stored by the receiving end; or, the remaining data amount is stored as the 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 remaining data amount of the data to be sent from the first sending end to the receiving end. 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.
[0012] In another possible implementation, when the amount of remaining data received from the first transmitter is 0, the receiving end deletes the stored information of the first transmitter. Since the amount of remaining data of the first transmitter is 0, the receiving end does not need to send a credit tag to the first transmitter. If the receiving end still schedules the first transmitter, the delay for the receiving end to schedule other transmitters and send credit tags to other transmitters will increase. Therefore, the receiving end deletes the stored information of the first transmitter, which can reduce the delay for the receiving end to schedule other transmitters.
[0013] In another possible implementation, the receiving end receives data from the second transmitting end, determines the data volume of the data received from the second transmitting end; when the difference between the second data volume and the third data volume is greater than the preset data volume, sends a stop message to the second transmitting end, wherein the stop message instructs the second transmitting end to stop sending data, and the third data volume is determined based on the bandwidth of the receiving end and the number of data streams of multiple transmitting ends, and the multiple transmitting ends include the first transmitting end and the second transmitting end. In the case where the second transmitting end cannot recognize the credit mark, the receiving end can count the data volume of the data from the second transmitting end. If the data volume of the data from the second transmitting end and the data volume of the data from the first transmitting end are greater than the receiving end's ability to process data, the receiving end can send a stop message to the second transmitting end, instructing the second transmitting end to stop sending data, so as to avoid the receiving end receiving too much data volume from the second transmitting end, which may cause network congestion.
[0014] In a second aspect, the present application provides a method for sending data, which can be applied to a transmitting device, or the method can be applied to a communication device that can support the transmitting device to implement the method, for example, the communication device includes a chip system.
[0015] The sending end sends a notification message to the receiving end, informing the receiving end of the number M of data streams of data to be sent by the sending end, and then the sending end receives M indication messages from the receiving end, and sends the data of the M data streams to the receiving end according to the M credit marks, and the data volume of each data stream in the M data streams is the first data volume. Each indication message in the M indication messages includes a credit mark, and the credit mark indicates that the sending end sends data according to the first data volume, and M is an integer greater than or equal to 1.
[0016] In the method for sending data provided by the present application, the sending end sends a notification message to the receiving end, so that the receiving end learns the number of data streams of the data to be sent by the sending end. Since the receiving end does not need to store the information of each data stream of the sending end, it only needs to store the number of data streams of each sending end, thereby effectively reducing the storage overhead of the receiving end. In addition, the receiving end sends a credit mark to the sending end according to the number of data streams of the data 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, thereby making the amount of data sent by each data stream the same, ensuring fairness between data streams.
[0017] In a possible implementation, the notification message also includes the remaining data amount of the sender, which is the remaining data amount of the data to be sent from the sender to the receiver. Thus, the receiver can further determine whether to send a credit mark to the sender by storing the remaining data amount of the data to be sent from the sender to the receiver.
[0018] In another possible implementation, the method further includes: the sending end determines whether the number of credit tags of the receiving end is greater than 0; if the number of credit tags is greater than 0, the sending end sends a notification message to the receiving end. Thus, the sending end sends the data of each data stream according to the data amount indicated by the credit tag, so that the data amount of each data stream sent once is the same, thereby ensuring fairness between data streams.
[0019] In another possible implementation, after the sending end receives M indication messages from the receiving end, the sending end updates the number of credit tags of the receiving end stored by the sending end. Thus, the sending end sends data according to the credit tags by timely updating the number of credit tags.
[0020] In a third aspect, the present application further provides a communication device, and its beneficial effects can be found in the description of the first aspect. The communication device has the function of implementing the behavior in the method example of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0021] In a fourth aspect, the present application further provides a communication device, and its beneficial effects can be found in the description of the second aspect. The communication device has the function of implementing the behavior in the method example of the second aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0022] In a fifth aspect, the present application provides a communication device, which may be a receiving device in the above method, or a chip set in the receiving device. The communication device includes a communication interface / interface circuit and a processor, and optionally, a memory. The memory is used to store computer programs or instructions, and the processor is coupled to the memory and the communication interface / interface circuit. When the processor executes the computer program or instruction, the communication device executes the method executed by the receiving device in the above method.
[0023] In a sixth aspect, the present application provides a communication device, which may be a transmitting device in the above method, or a chip set in the transmitting device. The communication device includes a communication interface / interface circuit and a processor, and optionally, a memory. The memory is used to store computer programs or instructions, and the processor is coupled to the memory and the communication interface / interface circuit. When the processor executes the computer program or instruction, the communication device executes the method executed by the transmitting device in the above method.
[0024] In a seventh aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is executed, the method performed by the receiving end device in the above aspects can be implemented.
[0025] In an eighth aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is executed, the method performed by the sending end device in the above aspects can be implemented.
[0026] In a ninth aspect, the present application provides a chip system, which includes a processor for implementing the functions of the receiving device in the above-mentioned methods. In a possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of a chip, or it can include a chip and other discrete devices.
[0027] In a tenth aspect, the present application provides a chip system, which includes a processor for implementing the functions of the sending end device in the above-mentioned methods. In a possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of a chip, or it can include a chip and other discrete devices.
[0028] In an eleventh aspect, the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed, the method performed by the receiving device in the above aspects can be implemented.
[0029] In a twelfth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, the methods performed by the sending end device in the above aspects can be implemented.
[0030] In this application, the names of the receiving device, the transmitting device and the communication device do not limit the devices themselves. In actual implementation, these devices may appear with other names. As long as the functions of each device are similar to those of this application, they fall within the scope of the claims of this application and their equivalent technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic diagram of the architecture of a data center network provided in one embodiment of the present application;
[0032] Figure 2 A flowchart of a method for receiving and sending data provided in one embodiment of the present application;
[0033] Figure 3 A schematic diagram of a scenario for receiving data provided in an embodiment of the present application;
[0034] Figure 4 A flowchart of a method for receiving data provided by an embodiment of the present application;
[0035] Figure 5 A flowchart of a method for sending data provided by an embodiment of the present application;
[0036] Figure 6 A schematic diagram of a scheduling switch provided in an embodiment of the present application;
[0037] Figure 7 A schematic diagram of a scheduling switch provided in an embodiment of the present application;
[0038] Figure 8 A schematic diagram of a scheduling switch provided in an embodiment of the present application;
[0039] Fig. 9 A flowchart of a method for receiving and sending data provided in one embodiment of the present application;
[0040] Fig.10 A schematic diagram of a scenario for sending data provided in an embodiment of the present application;
[0041] Fig.11 A flowchart of a method for sending data provided by an embodiment of the present application;
[0042] Fig.12 A schematic diagram of a scheduling switch provided in an embodiment of the present application;
[0043] Fig.13 A schematic diagram of a scheduling switch provided in an embodiment of the present application;
[0044] Fig.14 A schematic diagram of a scheduling switch provided in an embodiment of the present application;
[0045] Fig.15 A flowchart of a method for receiving and sending data provided in one embodiment of the present application;
[0046] Fig.16 A schematic diagram of the structure of a communication device provided in one embodiment of the present application;
[0047] Fig.17 A schematic diagram of the structure of a communication device provided in one embodiment of the present application;
[0048] Fig.18 A schematic diagram of the structure of a communication device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0049] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects rather than to limit a specific order.
[0050] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0051] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given:
[0052] 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 the core layer, the aggregation layer, and the access layer. The two-layer network topology can be divided into the core layer (also known as the spine layer) and the access layer (also known as the leaf layer).
[0053] The core layer is the high-speed switching backbone layer of the data center network, which is used to connect the data center with devices outside the data center (such as external operator equipment). The core layer can include switches and routers with high bandwidth (such as bandwidth above 1000M). The core layer has at least one of the following characteristics: reliability, efficiency, redundancy, fault tolerance, manageability, adaptability, low latency, etc. The routing connection of the core layer plays a very critical role in the data center network. Generally, the reliability of the data center network can be achieved through redundant connections of multiple devices.
[0054] The aggregation layer is the "intermediary" between the access layer and the core layer. It is used to aggregate data sent by workstations (such as terminal devices or servers) before entering the core layer to reduce the load on the core layer. The aggregation layer can include switches and routers that support Layer 3 switching technology and virtual local area networks (VLANs).
[0055] The access layer is connected to the 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, or switches and routers that support VLAN and Layer 3 switching technology.
[0056] For example, Figure 1 Schematic diagram of the architecture of the data center network used in the embodiment of the present application. The data center network is composed of access devices at the access layer, convergence devices at the convergence layer, and core devices at the core layer. The access devices are connected to workstations, which include servers and terminal devices. Figure 1 As shown, the data center network 100 includes a core layer 110, a convergence 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.
[0057] Among them, 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 connected to the switch 131 respectively. The workstation 143 and the workstation 144 are connected to the switch 132 respectively. The workstation 145 and the workstation 146 are connected to the switch 133 respectively. The workstation 147 and the workstation 148 are connected to the switch 134 respectively. The workstation can be a server or a terminal device, which is not limited.
[0058] Figure 1 This is just a schematic diagram. The data center network may also include other devices, such as device management servers. These servers are used to manage all switches and routers to ensure that they work properly. Figure 1 The embodiments of the present application do not limit the number of switches, routers, and workstations included in the data center network. Figure 1 The connection method between the switch, router and workstation shown in is only a schematic illustration. In actual applications, the switch, router and workstation may also be connected in other ways, which is not limited in this application.
[0059] Each device in the data center network can act as a transmitter to send data or as a receiver to receive data. A transmitter can send data to multiple receivers. A receiver can also receive data sent by multiple transmitters. For example, when data is stored in multiple servers, a server can send data query requests to multiple servers to obtain the data from multiple servers. After multiple servers query the data, they feedback the relevant data to the server that issued the data query request. In order to avoid network congestion at the receiving end, the sending rate of the transmitter can be controlled according to the bandwidth of the receiving end, so that the sum of the rates at which the receiving end receives data is less than or equal to the bandwidth of the receiving end. However, the number of data streams at each transmitter is different. How to ensure that the sending rate of each data stream is the same and how to ensure the fairness of data streams between different transmitters is an urgent problem to be solved.
[0060] In order to solve the problem of making the amount of data sent by each data stream the same while reducing the storage overhead of the receiving end and ensuring fairness between data streams, an embodiment of the present application provides a method for sending and receiving data. The sending end sends a notification message to the receiving end, notifying the receiving end of the number M of data streams of data to be sent by the sending end, where M is an integer greater than or equal to 1. After the receiving end receives the notification message from the sending end, an indication message is sent to the sending end in each cycle of M cycles, each indication message includes a credit mark, and the credit mark indicates that the sending end sends data according to the first data amount, so that the sending end sends data of M data streams to the receiving end according to the M credit marks, and the receiving end receives data of M data streams from the sending end, and the data amount of each data stream in the M data streams is the first data amount.
[0061] In the method for sending and receiving data provided by the embodiment of the present application, the receiving end learns the number of data streams of the data 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 of the sending end, it only stores the number of data streams of the sending end, which effectively reduces the storage overhead of the receiving end. In addition, the receiving end sends a credit mark to the sending end according to the number of data streams of the data 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, thereby making the amount of data sent by each data stream the same, ensuring fairness between data streams, and also making the sum of the rates at which the receiving end receives data less than or equal to the bandwidth of the receiving end, avoiding network congestion at the receiving end.
[0062] The method and strategy for sending and receiving data provided in the embodiment of the present application can 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. The strategy can be used to receive and send data between devices in the same layer, and devices in different layers can use traditional technologies 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. In some embodiments, the method and strategy for sending and receiving data provided in the embodiment of the present application is mainly deployed on the devices in the access layer 130.
[0063] For example, Figure 1 As shown, switch 131 can be used as a sending end, switch 132 can be used as a receiving end, and this strategy can be used to receive and send data between switch 131 and switch 132, wherein switch 131 and switch 132 are connected through switch 121, that is, data can be transmitted between switch 131 and switch 132 through switch 121.
[0064] For example, Figure 1As shown, switch 132 can be used as a sending end, switch 133 can be used as a receiving end, and the strategy can be used to receive and send data between switches 132 and 133. Among them, switches 132 and 133 are connected through devices in the core layer 110 and devices in the aggregation layer 120, that is, data is transmitted between switches 132 and 133 through devices in the core layer 110 and devices in the aggregation layer 120. For example, data is transmitted between switches 132 and 133 through switches 122, switches 111, and routers 123.
[0065] For another example, the switch 131 can be used as both a sending end and a receiving end, and the switch 131 itself can adopt the strategy to receive and send data.
[0066] Optionally, a device in the data center network can receive data sent by other devices in the same layer. For example, switch 131 can receive data sent by switch 132, switch 133, and switch 134. A device in the data center network can send data to other devices in the same layer. For example, switch 131 can send data to switch 132, switch 133, and switch 134.
[0067] It should be understood that 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 data and the device that receives data are workstations. The destination IP address and the destination port number refer to the IP address and port number of the workstation that receives the data. For example, the workstation 141 may be a source device that sends data, and the workstation 145 may be a destination device that receives data.
[0068] Next, the implementation of the embodiment of the present application is described in detail with reference to the accompanying drawings.
[0069] Figure 2 A flowchart of a method for receiving and sending data provided in an embodiment of the present application. It is assumed here that workstation 141 sends data to workstation 145, workstation 141 may be a source device that sends data, and workstation 145 may be a destination device that receives data. The example of the sending end being switch 131 and the receiving end being switch 133 is used for explanation. Figure 2 As shown, the method may include:
[0070] S201 . Switch 131 sends a notification message to switch 133 .
[0071] The notification message includes the number M of data flows to be sent from the switch 131 to the switch 133 , where M is an integer greater than or equal to 1.
[0072] It is understandable that the number of data streams to be sent from the switch 131 to the switch 133 may be 1, 2 or more. For example, when M=1, it indicates that the number of data streams to be sent from the switch 131 to the switch 133 is 1; when M=2, it indicates that the number of data streams to be sent from the switch 131 to the switch 133 is 2.
[0073] In some embodiments, the notification message may be a control message. For example, the control message may be a connection establishment notification message sent when the switch 131 and the switch 133 initially establish a connection. For example, the control message may be a synchronization message (SYN). For another example, the control message may be an acknowledgement message (ACK), etc.
[0074] In other embodiments, the notification message may be a data message. The data message includes service-related data sent by the switch 131 to the switch 133. The data message may be a modified data message. Optionally, the control message may be a message including control instruction data, and the control message does not include service-related data. The notification message may also be other messages, which are not limited.
[0075] Optionally, the notification message also includes the remaining data amount of the switch 131 , where the remaining data amount of the switch 131 is the remaining data amount of data to be sent by the switch 131 to the switch 133 , so that the switch 133 can know whether the switch 131 has data to send to the switch 133 .
[0076] 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 (e.g., 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.
[0077] Optionally, the devices in the data center network can distinguish different data flows by port numbers. For example, the switch 133 can distinguish different data flows by source port numbers.
[0078] Optionally, 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.
[0079] For example, the switch 131 may query the forwarding table stored in 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 .
[0080] The switch 121 may query the forwarding table stored in 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 .
[0081] The switch 111 may 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 .
[0082] The router 123 may query the forwarding table stored in 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 .
[0083] The above-mentioned path for the switch 131 to send the notification message to the switch 133 is only an example, and other paths may be used in actual applications and are not limited.
[0084] S202 , the switch 133 receives the notification message from the switch 131 .
[0085] The notification message includes the number M of data flows to be sent by the switch 131 and the amount of remaining data, where M is an integer greater than or equal to 1.
[0086] In some embodiments, the switch 133 may receive notification messages from multiple senders, and the switch 133 may store the number of data streams and the remaining data volume of each sender, so that the switch 133 can feed back a credit tag to the sender according to the number of data streams of the sender.
[0087] In a possible design, the switch 133 can configure a virtual output queue (VOQ) for each sender to distinguish information from different senders. The sender VOQ is used by the receiving end (such as the switch 133) to distinguish information from different senders. For example, Figure 3 As shown, switch 133 receives notification messages from switch 131, switch 132, and switch 134. Switch 133 can be configured with a sender VOQ1, a sender VOQ2, and a sender VOQ3. The sender VOQ1 is used to store information of switch 131. The sender VOQ2 is used to store information of switch 132. The sender VOQ3 is used to store information of switch 134.
[0088] Optionally, after receiving the notification message, the switch 133 may determine the identifier of the sender VOQ according to the address of the sender, and store the information of the sender in the sender VOQ indicated by the identifier of the sender VOQ. For example, the switch 133 may determine the identifier of the sender VOQ1 according to the address of the switch 131, and store the information of the switch 131 in the sender VOQ1. The switch 133 may determine the identifier of the sender VOQ2 according to the address of the switch 132, and store the information of the switch 132 in the sender VOQ2. The switch 133 may determine the identifier of the sender VOQ3 according to the address of the switch 134, and store the information of the switch 134 in the sender VOQ3.
[0089] The information of the sender may include the address of the sender, the identifier of the sender VOQ, a first value, and a second value. The first value indicates the number of data streams sent by the sender to the switch 133 and stored by the switch 133. The second value indicates the remaining amount of data to be sent by the sender to the switch 133 and stored by the switch 133. It can be understood that the remaining amount of data to be sent by the sender to the switch 133 is the total remaining amount of data streams sent by the sender to the switch 133. For example, the number of data streams sent by the sender to the switch 133 is 3, and the remaining amount of data to be sent by the sender to the switch 133 is the total remaining amount of data of the 3 data streams. The unit of the remaining amount of data may be byte.
[0090] Optionally, the correspondence of the information of the sender may be presented in a table, each row in the table may be referred to as a table entry, and each table entry is used to store information of a sender. The information of the sender may also include a sequence number and a sender name. Optionally, the table may not include the first value and the second value. The first value and the second value of the sender may be stored in the corresponding sender VOQ.
[0091] For example, Table 1 presents the corresponding relationship of the information of the sending end.
[0092] Table 1
[0093] Serial number Sender Name The sender's address The sender VOQ flag First value Second value 1 Switch 131 192.168.0.4 VOQ1_1 2 1000 2 Switch 132 192.168.0.5 VOQ1_2 5 5000 3 Switch 134 192.168.0.6 VOQ1_3 4 3000 … … … … … …
[0094] As can be seen from Table 1, VOQ1 represents the VOQ of the sending end. VOQ1_1 can represent the identifier of the VOQ of the switch 131. The address of the switch 131 can be 192.168.0.4. The address 192.168.0.4 of the switch 131 corresponds to 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 amount of data to be sent by the switch 131 to the switch 133 is 1000 bytes.
[0095] 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 corresponds to 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 amount of data to be sent by the switch 132 to the switch 133 is 5000 bytes.
[0096] 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 corresponds to 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 amount of data to be sent by the switch 134 to the switch 133 is 3000 bytes.
[0097] It should be noted that Table 1 only illustrates in a tabular form the storage form of the corresponding relationship of the information of the sender in the storage device, and does not limit the storage form of the corresponding relationship of the information of the sender in the storage device. Of course, the storage form of the corresponding relationship of the information of the sender in the storage device can also be stored in other forms, and the embodiments of the present application do not limit this.
[0098] Optionally, after the switch 133 receives the notification message from the sender, the corresponding relationship table of the information of the sender can be updated according to the content contained in the notification message. Figure 4 As shown, after the switch 133 receives the notification message from the switch 131, it can also execute S401 to S405.
[0099] S401 : The switch 133 determines whether information of the switch 131 is stored.
[0100] If switch 133 determines that the information of switch 131 is stored, execute S402; if switch 133 determines that the information of switch 131 is not stored, it means that switch 133 receives the data sent by switch 131 for the first time, and the remaining data amount of switch 131 is not 0, execute S405.
[0101] S402 : The switch 133 determines whether the amount of remaining data received from the switch 131 is zero.
[0102] If the switch 133 determines that the amount of remaining data received from the switch 131 is not 0, S403 is executed; if the switch 133 determines that the amount of remaining data received from the switch 131 is 0, it means that the switch 131 has no data to be sent to the switch 133, and S404 is executed.
[0103] It can be understood that 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 .
[0104] S403 : The switch 133 updates the first value according to the number M of data flows of data to be sent by the switch 131 , and updates the second value according to the remaining data amount of the data flows of data to be sent by the switch 131 .
[0105] Optionally, the switch 133 updates the first value of the switch 131 entry according to the number M of data flows of data to be sent by the switch 131. Assume that the first value of the switch 131 stored by the switch 133 is 2, and the number of data flows of data to be sent by the switch 131 received is 3, the first value of the switch 131 is updated to 3.
[0106] Optionally, the switch 133 updates the second value of the switch 131 entry according to the remaining data amount of the data flow 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, and the remaining data amount of the data flow of the data to be sent by the switch 131 received is 2000 bytes, the second value of the switch 131 is updated to 2000 bytes.
[0107] S404 : The switch 133 deletes the stored information of the switch 131 .
[0108] The switch 133 deletes the information of the stored entry of the switch 131, that is, the name, address, VOQ identifier, number of data flows to be sent, and remaining data volume of the stored switch 131 can be deleted. For example, as shown in Table 2, the table is a table in which the information of the entry of the switch 131 in Table 1 is deleted.
[0109] Table 2
[0110] Serial number Sender Name The sender's address The sender VOQ flag First value Second value 1 Switch 132 192.168.0.5 VOQ1_2 5 5000 2 Switch 134 192.168.0.6 VOQ1_3 4 3000 … … … … … …
[0111] S405 . The switch 133 stores the number M of data flows of the data to be sent by the switch 131 as a first value, and stores the remaining data volume of the data flows of the data to be sent by the switch 131 as a second value.
[0112] Optionally, the switch 133 stores the number M of data flows of the data 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 flows of the 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.
[0113] Optionally, the switch 133 stores the remaining data volume of the data flow 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 flow 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.
[0114] When the switch 133 receives data sent by the sender for the first time, a new table entry may be added to Table 1, and the information of the sender may be added. For example, when the switch 133 receives data sent by the switch 131 for the first time, the switch 133 may configure the table entry of the switch 131. As shown in Table 3, the corresponding relationship of the information of the switch 131 is added in 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 amount of remaining data.
[0115] Table 3
[0116] Serial number Sender Name The sender's address The sender VOQ flag First value Second value 1 Switch 132 192.168.0.5 VOQ1_2 5 5000 2 Switch 134 192.168.0.6 VOQ1_3 4 3000 3 Switch 131 192.168.0.4 VOQ1_1 2 1000 … … … … … …
[0117] In some other embodiments, if the switch 133 determines that the information of the switch 131 is not stored and the remaining data amount of the switch 131 is 0, the switch 133 does not need to add a new entry of the switch 131 .
[0118] In a possible design, the switch 133 may schedule the sender in a round-robin manner and feed back credit tags to the sender according to the number of data streams of the sender. The more data streams of the sender, the more credit tags are fed back to the sender.
[0119] For example, the number of data streams of the sender is recorded in the table entries of the correspondence table of the sender's information. The switch 133 can schedule the table entries recorded in the correspondence table of the sender's information in a cyclic manner and feed back credit tags to the sender according to the number of data streams of the sender.
[0120] For another example, the number of data flows of the sender is recorded in the sender VOQ, and the switch 133 can schedule the sender VOQ in a cyclic manner and feed back a credit tag to the sender according to the number of data flows of the sender. Optionally, the switch 133 can schedule the sender VOQ cyclically according to the table items recorded in the corresponding relationship table of the sender information.
[0121] like Figure 5 As shown, after the switch 133 dispatches to a transmitting end, S501 to S502 may be executed. Here, the i-th transmitting end is taken as an example for description, and the i-th transmitting end may be any transmitting end in the corresponding relationship table of the transmitting end information.
[0122] S501, switch 133 in X iSend X to the i-th transmitter within a cycle i An instruction message.
[0123] X i It can represent the number of data flows to be sent by the i-th sending end. i An indication message is sent in each cycle of the data center network. Each indication message includes a credit tag, and the credit tag indicates that the i-th sending end sends data according to the first data amount. The first data amount can be pre-configured. Each device in the data center network is pre-configured with the first data amount so that the device sends data according to the first data amount indicated by the credit tag.
[0124] In some embodiments, the period, the first data volume, and the bandwidth of the switch 133 satisfy formula (1).
[0125] C=D / BW (1)
[0126] Wherein, C represents the cycle, D represents the first data volume, and BW represents the bandwidth of the switch 133 .
[0127] S502. The switch 133 schedules the (i+1)th sending end.
[0128] Switch 133 in X i+1 Send X to the i+1th transmitter within a cycle i+1 Indication message. i+1 It can represent the number of data streams to be sent by the (i+1)th sending end.
[0129] It is understandable that the switch 133 schedules the interval between the i-th sending end and the i+1-th sending end to be X. i cycle.
[0130] For example, Figure 6 As shown, 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 the cycle repeats. When the switch 133 schedules to the switch 131, S203 is executed.
[0131] Optionally, if a new entry is added to the corresponding relationship table of the information of the sender, the switch 133 increases the number of VOQs scheduled for the sender. Figure 7 As shown, assuming that the access layer 130 of the data center network also includes a switch 135, and the switch 135 is connected to the devices and workstations in the aggregation layer 120 respectively. The corresponding relationship of the information of the switch 135 is newly added to the corresponding relationship table of the information of the sending end, and the switch 133 sequentially 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, and the cycle continues.
[0132] Optionally, if the corresponding table of the information of the sender deletes the entry, the switch 133 reduces the number of VOQs scheduled for the sender. Figure 8 As shown, the corresponding relationship of the information of switch 134 is reduced, and switch 133 schedules the VOQ of switch 131 and the VOQ of switch 132 in turn, and the cycle continues.
[0133] S203. The switch 133 sends M indication messages to the switch 131 within M cycles, each indication message including a credit tag.
[0134] The switch 133 sends an indication message to the switch 131 in each of the M periods. The credit mark indicates that the switch 131 sends data according to the first data amount.
[0135] S204 . The switch 131 receives M indication messages from the switch 133 .
[0136] In some embodiments, the switch 131 may receive the indication message at the 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.
[0137] In other embodiments, due to certain quality problems in the data center network, the switch 131 may not periodically receive the indication message sent by the switch 133, and the time intervals at which the switch 131 receives the M indication messages from the switch 133 may be different.
[0138] Optional, such as Fig. 9 As shown, after the switch 131 receives M indication messages from the switch 133, the method further includes S901.
[0139] S901 . The switch 131 updates the number of credit tags of the switch 133 stored in the switch 131 .
[0140] In some embodiments, when switch 131 receives a credit token from switch 133, it increases the number of credit tokens of switch 133 by one.
[0141] S205. Switch 131 sends data of M data flows to switch 133 according to the M credit tags.
[0142] The switch 131 can send data of each of the M data flows to the switch 133 according to the M credit tags, or send data of some of the M data flows to the switch 133, without limitation. The reduction amount of the remaining data amount of the data flow to be sent by the switch 131 to the switch 133 satisfies formula (2).
[0143] E=A1*D (2)
[0144] Wherein, E represents the reduction amount, A1 represents the number of credit tags of data sent by the switch 131 to the switch 133, and D represents the first data amount.
[0145] In some embodiments, the switch 131 may poll the M data streams of the switch 133 , and each time a data stream is polled, data is sent once according to a credit tag, and the amount of the sent data is the first amount of data.
[0146] S206 , the switch 133 receives data of the M data flows from the switch 131 .
[0147] The switch 133 can receive data of the M data streams according to the cycle in which the switch 131 sends data of the M data streams, that is, receive data of one data stream from the switch 131 in each cycle of the M cycles, and the data volume of each data stream in the M data streams is the first data volume.
[0148] In other embodiments, due to certain quality issues in the data center network, the switch 133 may not receive the data sent by the switch 131 periodically, and the time intervals at which the switch 133 receives the data of the M data streams from the switch 131 may be different.
[0149] Thus, the switch 133 learns the number of data streams of the data to be sent by the switch 131 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 tag to the switch 131 according to the number of data streams of the data to be sent, so that the switch 131 sends the data of each data stream according to the data amount indicated by the credit tag, thereby making the data amount of each data stream sent once the same, ensuring fairness between data streams, and also making the sum of the rates at which the switch 133 receives data less than or equal to the bandwidth of the switch 133, avoiding network congestion of the switch 133.
[0150] In other embodiments, since the switch 131 can send data to multiple receiving ends, if the data streams sent to different receiving ends are all placed in one queue, the phenomenon of "head of line blocking" may occur. For example, the data volume of the first data stream is particularly large, and the data volume of the second data stream is particularly small. After the data of the first data stream is sent, the data of the second data stream is sent, so the data of the second data stream is blocked. For example, the first data stream can be the data stream corresponding to the data sent by the switch 131 to the switch 133. The second data stream can be the data stream corresponding to the data sent by the switch 131 to the switch 134.
[0151] In a possible design, the switch 131 can configure a VOQ for each receiving end to distinguish data of data streams sent to different receiving ends. The receiving end VOQ is used by the sending end (such as the switch 131) to distinguish data of data streams of different receiving ends. For example, Fig.10 As shown, switch 131 sends data to switch 132, switch 133 and switch 134. Switch 131 can be configured with receiving end VOQ1, receiving end VOQ2 and receiving end VOQ3. Receiving end VOQ1 is used to cache data sent to switch 132. Receiving end VOQ2 is used to cache data sent to switch 133. Receiving end VOQ3 is used to cache data sent to switch 134.
[0152] Therefore, the switch 131 divides the data sent to different receiving ends according to the receiving end VOQ, caches the data sent to different receiving ends in the VOQ corresponding to the receiving end, and queues the data sent to different receiving ends in different receiving end VOQs to avoid the phenomenon of "head of line blocking".
[0153] Optionally, after generating data, the switch 131 may determine the identifier of the receiving end VOQ according to the address of the receiving end, and cache the data sent to the receiving end in the receiving end VOQ indicated by the identifier of the receiving end VOQ. For example, the switch 131 may determine the identifier of the receiving end VOQ1 according to the address of the switch 132, and cache the data sent to the switch 132 in 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 cache the data sent to the switch 133 in 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 cache the data sent to the switch 134 in the receiving end VOQ3.
[0154] The correspondence between the address of the receiving end and the identifier of the VOQ of the receiving end may be presented in a table form, that is, Table 4 presents the correspondence between the address of the receiving end and the identifier of the VOQ of the receiving end.
[0155] Table 4
[0156] Serial number Receiver The address of the receiving end Receiver VOQ flag 1 Switch 132 192.168.0.1 VOQ2_1 2 Switch 133 192.168.0.2 VOQ2_2 3 Switch 134 192.168.0.3 VOQ2_3 … … … …
[0157] As can be seen from Table 4, 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 corresponds to the identifier VOQ2_1 of the VOQ of the switch 132.
[0158] 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 and the identifier VOQ2_2 of the VOQ of the switch 133 have a corresponding relationship.
[0159] VOQ2_3 may represent the identifier 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 and the identifier VOQ2_3 of the VOQ of the switch 134 have a corresponding relationship.
[0160] It should be noted that Table 4 only illustrates in a tabular form the storage format of the correspondence between the address of the receiving end and the identifier of the VOQ of the receiving end in the storage device, and does not limit the storage format of the correspondence between the address of the receiving end and the identifier of the VOQ of the receiving end in the storage device. Of course, the storage format of the correspondence between the address of the receiving end and the identifier of the VOQ of the receiving end in the storage device can also be stored in other forms, and the embodiments of the present application do not limit this.
[0161] Optionally, each row in Table 4 may be referred to as a table entry. When the switch 131 generates a data stream sent to the receiving end for the first time, a new table entry may be added to Table 4, adding a correspondence between the address of the receiving end and the identifier of the receiving end VOQ. For example, assuming that the access layer 130 of the data center network also includes a switch 135, and the switch 131 generates data of a data stream sent to the switch 135, the switch 131 may configure the receiving end VOQ4, and the receiving end VOQ4 is used to cache the data sent to the switch 135. As shown in Table 5, a correspondence between the address of the switch 135 and the identifier of the VOQ4 of the switch 135 is added to 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 cache the data sent to the switch 135 to the receiving end VOQ4.
[0162] Table 5
[0163] Serial number Receiver The address of the receiving end Receiver VOQ flag 1 Switch 132 192.168.0.1 VOQ2_1 2 Switch 133 192.168.0.2 VOQ2_2 3 Switch 134 192.168.0.3 VOQ2_3 4 Switch 135 192.168.0.4 VOQ2_4 … … … …
[0164] As can be seen from Table 5, VOQ2_4 may 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 and the identifier VOQ_4 of the VOQ of the switch 135 have a corresponding relationship.
[0165] Optionally, after the switch 131 completes sending the data of the receiving end in Table 4, the switch 131 may delete the table entry corresponding to the receiving end. For example, after the switch 131 completes sending the data to the switch 134, the switch 131 deletes the table entry of the switch 134, as shown in Table 6, which is a table for deleting the table entry of the switch 134.
[0166] Table 6
[0167] Serial number Receiver The address of the receiving end Receiver VOQ flag 1 Switch 132 192.168.0.1 VOQ2_1 2 Switch 133 192.168.0.2 VOQ2_2 … … … …
[0168] In a possible design, the switch 131 may schedule the receiving end VOQ in a cyclic manner to send the data cached by the receiving end VOQ. Optionally, the switch 131 may schedule the receiving end VOQ in a cyclic manner according to the entries recorded in the corresponding relationship table between the receiving end address and the receiving end VOQ identifier.
[0169] In some embodiments, Fig.11 As shown, the switch 131 dispatches to a receiving end VOQ and can execute S1101 to S1103, that is, send the data of the receiving end VOQ according to the credit tag. Here, the i-th receiving end VOQ is used as an example for explanation. The i-th receiving end VOQ can be any receiving end VOQ in the corresponding relationship table between the receiving end address and the receiving end VOQ identifier.
[0170] S1101. The switch 131 determines whether the number of credit tags of the i-th receiving end is greater than 0.
[0171] If the switch 131 determines that the number of credit tags of the i-th receiving end is greater than 0, execute S1102; if the switch 131 determines that the number of credit tags of the i-th receiving end is equal to 0, the data in the VOQ of the i-th receiving end is not allowed to be sent, and execute S1103.
[0172] S1102, switch 131 according to X i credit token to send data to the i-th receiving end.
[0173] In some embodiments, the switch 131 sends a data message to the i-th receiving end according to the first data amount indicated by the credit tag, and the data amount of the data message is the first data amount. The data message includes the number of data flows of the data to be sent by the switch 131.
[0174] Optionally, each time the switch 131 sends data, the number of credit tags is reduced by one, so that the switch 131 sends data according to the remaining credit tags.
[0175] S1103. The switch 131 schedules the (i+1)th receiving end.
[0176] The switch 131 determines whether the number of credits of the i+1th receiving end is greater than 0, thereby determining whether to send the data in the VOQ of the i+1th receiving end.
[0177] It is understandable that the switch 131 schedules the interval between the i-th receiving end and the i+1-th receiving end to be X. i cycle.
[0178] For example, before switch 131 sends a notification message to switch 133, switch 131 may determine whether the number of credit tags of switch 133 is greater than 0. If switch 131 determines that the number of credit tags of switch 133 is greater than 0, switch 131 sends a notification message to switch 133; if switch 131 determines that the number of credit tags of switch 133 is equal to 0, other receiving ends are scheduled.
[0179] For example, Fig.12 As shown, switch 131 schedules the VOQ of switch 132, the VOQ of switch 133 and the VOQ of switch 134 in turn, and the cycle continues.
[0180] Optionally, if a new entry is added to the correspondence table between the address of the receiving end and the identifier of the receiving end VOQ, the switch 131 increases the number of scheduled receiving end VOQs. Fig.13 As shown, assuming that the access layer 130 of the data center network also includes a switch 135, a correspondence between the address of the receiving end and the identifier of the receiving end VOQ is added to the correspondence table between the address of the receiving end and the identifier of the VOQ of the receiving end, and 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.
[0181] Optionally, if the table of correspondence between the address of the receiving end and the identifier of the receiving end VOQ is deleted, the switch 131 reduces the number of scheduled receiving end VOQs. Fig.14 As shown, the correspondence between the address of switch 134 and the identifier of VOQ3 of switch 134 is reduced, and switch 131 sequentially schedules VOQ of switch 132 and VOQ of switch 133, and the cycle continues.
[0182] In other embodiments, some devices in the data center network may not be able to recognize the credit mark. For such devices, the receiving end can instruct the sending end to stop sending data based on the amount of data received. Fig.15 As shown, the method also includes the following steps.
[0183] S1501 , switch 134 sends data to switch 133 .
[0184] S1502 , switch 133 receives data from switch 134 .
[0185] S1503: The switch 133 determines the second data amount.
[0186] The switch 133 counts the data received from the switch 134, and the second data amount is the data amount of the data received from the switch 134. When the difference between the second data amount and the third data amount is greater than the preset data amount, or the absolute value of the difference between the second data amount and the third data amount is greater than the preset data amount, S1504 is executed.
[0187] The third data volume is determined according to the bandwidth of the switch 133 and the number of data flows of the multiple sending ends. In some embodiments, the third data volume may satisfy formula (3).
[0188] F=BW*(K / L) (3)
[0189] Among them, F represents the third data volume, BW represents the bandwidth of switch 133, K represents the number of data flows of switch 134, and L represents the number of data flows of all senders that send data to switch 133, which may include the number of data flows of switch 134 and the number of data flows of switch 131.
[0190] S1504 . Switch 133 sends a stop message to switch 134 .
[0191] The stop message instructs the switch 134 to stop sending data.
[0192] S1505 . Switch 134 receives the stop message from switch 133 , and stops sending data to switch 133 .
[0193] Thus, when switch 134 cannot recognize the credit tag, switch 133 can count the amount of data from switch 134. If the amount of data from switch 134 and the amount of data from switch 131 are greater than the data processing capacity of switch 133, switch 133 can send a stop message to switch 134, instructing switch 134 to stop sending data, so as to avoid switch 133 receiving too much data from switch 134 and causing network congestion.
[0194] It is understandable that in order to implement the functions in the above embodiments, the switch includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0195] Fig.16 , Fig.17 and Fig.18 The schematic diagram of the structure of possible communication devices provided by the embodiments of the present application. These communication devices can be used to implement the functions of the switch in the above method embodiments, and thus can also achieve the beneficial effects possessed by the above method embodiments.
[0196] like Fig.16 As shown, the embodiment of the present application provides a communication device 1600, which can be as follows Figure 1 The switch 131 shown may also be 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 used to implement the above Figure 2 , Fig. 9 , Fig.11 or Fig.15 The function of the switch 131 in the method embodiment shown in FIG.
[0197] When the communication device 1600 is used to implement Figure 2 In the method embodiment shown, the functions of the switch 131 are: the receiving unit 1610 is used to execute S204; the sending unit 1620 is used to execute S201 and S205.
[0198] When the communication device 1600 is used to implement Fig. 9 In the method embodiment shown, the functions of the switch 131 are: the receiving unit 1610 is used to execute S204; the sending unit 1620 is used to execute S201 and S205, and the processing unit 1630 is used to execute S901.
[0199] When the communication device 1600 is used to implement Fig.11 In the method embodiment shown, the functions of the switch 131 are: the sending unit 1620 is used to execute S1102, and the processing unit 1630 is used to execute S1101 and S1103.
[0200] When the communication device 1600 is used to implement Fig.15In the method embodiment shown, the functions of the switch 131 are: the receiving unit 1610 is used to execute S204; the sending unit 1620 is used to execute S201 and S205, and the processing unit 1630 is used to execute S901.
[0201] For more detailed description of the receiving unit 1610, the sending unit 1620, and the processing unit 1630, please refer to Figure 2 , Fig. 9 , Fig.11 or Fig.15 The relevant description follows directly from the method embodiment shown.
[0202] like Fig.17 As shown, the embodiment of the present application provides a communication device 1700, which can be as follows Figure 1 The switch 133 shown in the figure may also be 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 used to implement the above Figure 2 , Figure 4 , Figure 5 , Fig. 9 or Fig.15 The function of the switch 133 in the method embodiment shown in FIG.
[0203] When the communication device 1700 is used to implement Figure 2 In the method embodiment shown, the functions of the switch 133 are: the first receiving unit 1710 is used to execute S202 and S206, and the first sending unit 1720 is used to execute S203.
[0204] When the communication device 1700 is used to implement Figure 4 In the method embodiment shown, the functions of the switch 133 are: the first receiving unit 1710 is used to execute S202; the first processing unit 1730 is used to execute S401 to S405.
[0205] When the communication device 1700 is used to implement Figure 5 In the method embodiment shown, the functions of the switch 133 are: the first sending unit 1720 is used to execute S501; the first processing unit 1730 is used to execute S502.
[0206] When the communication device 1700 is used to implement Fig. 9 In the method embodiment shown, the functions of the switch 133 are: the first receiving unit 1710 is used to execute S202 and S206, and the first sending unit 1720 is used to execute S203.
[0207] When the communication device 1700 is used to implement Fig.15 In the method embodiment shown, the functions of the switch 133 are: the first receiving unit 1710 is used to execute S202 and S206, and the first sending unit 1720 is used to execute S203.
[0208] When the communication device 1700 is used to implement Fig.15 In the method embodiment shown, the functions of the switch 133 are: the second receiving unit 1740 is used to execute S1502, the second processing unit 1760 is used to execute S1503, and the second sending unit 1750 is used to execute S1504.
[0209] For more detailed description of the processing unit 1710 and the transceiver unit 1720, please refer to Figure 2 , Figure 4 , Figure 5 , Fig. 9 or Fig.15 The relevant description follows directly from the method embodiment shown.
[0210] like Fig.18 As shown, 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. It is understood that the interface circuit 1820 can be a transceiver or an input-output interface. Optionally, the communication device 1800 may also include a memory 1830 for storing instructions executed by the processor 1810 or storing input data required by the processor 1810 to execute instructions or storing data generated after the processor 1810 executes instructions.
[0211] When the communication device 1800 is used to implement Figure 2 , Figure 4 , Figure 5 , Fig. 9 , Fig.11 or Fig.15 When the method is shown, the processor 1810 is used to execute the functions of the above-mentioned processing unit 1630, the first processing unit 1730 or the second processing unit 1760, and the interface circuit 1820 is used to execute the functions of the above-mentioned 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.
[0212] It is understandable that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (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.
[0213] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. 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. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a network device or a terminal device. Of course, the processor and the storage medium can also be present in a network device or a terminal device as discrete components.
[0214] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. 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, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).
[0215] In the various embodiments of the present application, unless otherwise specified or provided for in any logical conflict, the terms and / or descriptions between the different embodiments are consistent and may be referenced to each other, and the technical features in the different embodiments may be combined to form new embodiments according to their inherent logical relationships.
[0216] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of this application, the character " / " indicates that the previous and next associated objects are in a "division" relationship.
[0217] It is understood that the various numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic.
Claims
1. A method for receiving data, characterized in that: include: The receiving end receives a notification message from the first sending end, where the notification message includes the number M of data streams of data to be sent by the first sending end, where M is an integer greater than or equal to 1; The receiving end sends M indication messages to the first sending end within M cycles, and sends one indication message within one cycle, each indication message includes a credit mark, and the credit mark indicates that the first sending end sends data according to the first data amount; The receiving end receives data of M data streams from the first sending end, and the data volume of each data stream in the M data streams is the first data volume.
2. The method according to claim 1, characterized in that: After the receiving end receives the notification message from the first sending end, the method further includes: The receiving end updates a first value according to the M, where the first value indicates the number of data streams sent by the first sending end to the receiving end and stored by the receiving end; or, The M is stored as a first value, where the first value indicates the number of data streams sent by the first sending end to the receiving end and stored by the receiving end.
3. The method according to claim 2, characterized in that The notification message also includes the remaining data amount of the first sending end, and the method further includes: The receiving end updates a second value according to the remaining data amount of the first sending end, wherein the second value indicates the remaining data amount of the first sending end stored by the receiving end; or, storing the remaining data amount as a second value, wherein 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 remaining data amount of data to be sent by the first sending end to the receiving end.
4. The method according to claim 3, characterized in that The method further comprises: When the amount of remaining data received from the first sending end is 0, the receiving end deletes the stored information of the first sending end.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The receiving end receives data from the second sending end; The receiving end determines a second data amount, where the second data amount is a data amount of data received from the second sending end; When the difference between the second data amount and the third data amount is greater than the preset data amount, a stop message is sent to the second sending end, and the stop message instructs the second sending end to stop sending data. The third data amount is determined based on the bandwidth of the receiving end and the number of data streams of multiple sending ends, and the multiple sending ends include the first sending end and the second sending end.
6. A method for sending data, characterized in that: include: The sending end sends a notification message to the receiving end, wherein the notification message includes the number M of data streams of data to be sent by the sending end, where M is an integer greater than or equal to 1; The sending end receives M indication messages from the receiving end, each of the M indication messages includes a credit mark, and the credit mark indicates that the sending end sends data according to the first data amount; The sending end sends data of M data streams to the receiving end according to the M credit tags, and the data volume of each data stream in the M data streams is the first data volume.
7. The method according to claim 6, characterized in that The notification message also includes the remaining data amount of the sending end, where the remaining data amount of the sending end is the remaining data amount of data to be sent by the sending end to the receiving end.
8. The method according to claim 6 or 7, characterized in that: The method further comprises: The sending end determines whether the number of the credit markers of the receiving end is greater than 0; If the number of the credit tags is greater than 0, the sending end sends the notification message to the receiving end.
9. The method according to claim 6 or 7, characterized in that: After the transmitting end receives M indication messages from the receiving end, the method further includes: The sending end updates the number of credit tags of the receiving end stored by the sending end.
10. A communication device, characterized in that: The communication device is a receiving end, comprising: A first receiving unit, configured to receive a notification message from a first sending end, wherein the notification message includes the number M of data streams of data to be sent by the first sending end, where M is an integer greater than or equal to 1; The first sending unit is further configured to send M indication messages to the first sending end within M cycles, wherein one indication message is sent within one cycle, each indication message includes a credit mark, and the credit mark indicates that the first sending end sends data according to a first data amount; The first receiving unit is further used to receive data of M data streams from the first sending end, and the data volume of each data stream in the M data streams is the first data volume.
11. The communication device according to claim 10, characterized in that: The device further comprises a first processing unit, wherein: The first processing unit is configured to update a first value according to the M, where the first value indicates the number of data streams sent by the first sending end to the receiving end and stored by the receiving end; or, The M is stored as a first value, where the first value indicates the number of data streams sent by the first sending end to the receiving end and stored by the receiving end.
12. The communication device according to claim 11, characterized in that: The notification message also includes the remaining data amount of the first sending end, and the first processing unit is further used for: Update a second value according to the remaining data amount of the first sending end, the second value indicating the remaining data amount of the first sending end stored by the receiving end; or, storing the remaining data amount as a second value, wherein 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 remaining data amount of data to be sent by the first sending end to the receiving end.
13. The communication device according to claim 12, characterized in that: When the amount of remaining data received from the first sending end is 0, the first processing unit is further used to delete the stored information of the first sending end.
14. The communication device according to any one of claims 10 to 13, characterized in that: The communication device further includes a second receiving unit, a second sending unit and a second processing unit. The second receiving unit is used to receive data from the second sending end; The second processing unit is used to determine a second data amount, where the second data amount is the amount of data received from the second sending end; The second sending unit is used to send a stop message to the second sending end when the difference between the second data amount and the third data amount is greater than a preset data amount, and the stop message instructs the second sending end to stop sending data. The third data amount is determined based on the bandwidth of the receiving end and the number of data streams of multiple sending ends, and the multiple sending ends include the first sending end and the second sending end.
15. A communication device, characterized in that: The communication device is a transmitting end, comprising: A sending unit, configured to send a notification message to a receiving end, wherein the notification message includes the number M of data streams of data to be sent by the sending end, where M is an integer greater than or equal to 1; a receiving unit, configured to receive M indication messages from the receiving end, each of the M indication messages comprising a credit mark, the credit mark indicating that the sending end sends data according to a first data amount; The sending unit is further used to send data of M data streams to the receiving end according to the M credit tags, and the data volume of each data stream in the M data streams is the first data volume.
16. The communication device according to claim 15, characterized in that: The notification message also includes the remaining data amount of the sending end, where the remaining data amount of the sending end is the remaining data amount of data to be sent by the sending end to the receiving end.
17. The communication device according to claim 15 or 16, characterized in that: The sending unit is used to send the notification message to the receiving end when the number of the credit tags at the receiving end is greater than 0.
18. The communication device according to claim 15 or 16, characterized in that: The device further comprises a processing unit, wherein The processing unit is used to update the number of credit tags of the receiving end stored by the sending end.
19. A communication device, characterized in that: It includes a processor, a memory and an interface circuit, wherein the interface circuit is used to receive messages from other communication devices outside the communication device and transmit them to the processor, and the memory is used to store code instructions so that when the code instructions are executed by the processor, the method as described in any one of claims 1 to 5 is implemented.
20. A communication device, characterized in that: It includes a processor, a memory and an interface circuit, wherein the interface circuit is used to send a message from the processor to other communication devices outside the communication device, and the memory is used to store code instructions so that when the code instructions are executed by the processor, the method as described in any one of claims 6 to 9 is implemented.
Citation Information
Patent Citations
Congestion control method and network device
CN109067665A
Method, device and system for sending data stream
CN109995664A