WO2020211728A1 - 一种数据流的虚拟通道的设置方法及装置 - Google Patents
一种数据流的虚拟通道的设置方法及装置 Download PDFInfo
- Publication number
- WO2020211728A1 WO2020211728A1 PCT/CN2020/084548 CN2020084548W WO2020211728A1 WO 2020211728 A1 WO2020211728 A1 WO 2020211728A1 CN 2020084548 W CN2020084548 W CN 2020084548W WO 2020211728 A1 WO2020211728 A1 WO 2020211728A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- virtual channel
- data stream
- data
- virtual
- receiving device
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/64322—IP
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/122—Avoiding congestion; Recovering from congestion by diverting traffic away from congested entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
- H04L47/2425—Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
- H04L47/2425—Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
- H04L47/2433—Allocation of priorities to traffic types
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/26—Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
- H04L47/267—Flow control; Congestion control using explicit feedback to the source, e.g. choke packets sent by the destination endpoint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/621—Individual queue per connection or flow, e.g. per VC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/6215—Individual queue per QOS, rate or priority
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/647—Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
- H04N21/64723—Monitoring of network processes or resources, e.g. monitoring of network load
- H04N21/64738—Monitoring network characteristics, e.g. bandwidth, congestion level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
- H04L45/7453—Address table lookup; Address filtering using hashing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/70—Virtual switches
Definitions
- This application relates to the field of mobile communication technology, and in particular to a method and device for setting up a virtual channel of a data stream.
- the Ethernet Pause mechanism is a mechanism to prevent packet loss.
- the basic principle is: when the receiving capacity of the receiving device is less than the sending capacity of the sending device, It will actively send a traffic pause signal (Pause frame) to the sending device to notify the sending device to pause sending and wait for a certain period of time before continuing to send. But the Pause mechanism is for the entire port, and the Pause frame will cause the entire link to suspend traffic. When multiple services share the link, any type of service causes link traffic to suspend and all services will be interrupted.
- a current solution is to create multiple virtual channels on an Ethernet link, and one virtual channel corresponds to one service type, that is, data streams of one service type are sent through one virtual channel. Therefore, when a virtual channel is congested (that is, the buffer queue corresponding to the virtual channel on the receiving device is congested), it is only necessary to suspend the traffic of this virtual channel separately, so that the traffic of other virtual channels is not affected, thereby achieving multiple Sharing and isolation of a physical link by various types of services.
- FIG. 1 it is a schematic diagram of flow control based on virtual channels.
- a physical link between the sending device and the receiving device is divided into 8 virtual channels, one service type corresponds to one virtual channel, and one buffer queue on the receiving device corresponds to one virtual channel.
- the virtual channel 7 of the receiving device will send a traffic suspension signal to the virtual channel 7 of the sending device, and the virtual channel 7 of the sending device will suspend sending traffic after receiving the traffic suspension signal.
- the service flow of the channel is not affected.
- the problem with the above method is that when the number of data streams of a business type is large, the traffic of the virtual channel corresponding to the business type will be very large, and the virtual channel will continue to be congested, causing the data flow to fail. It is sent quickly, or even cannot be sent.
- the present application provides a method and device for setting a virtual channel of a data stream, so as to solve the problem that the data stream cannot be quickly sent due to congestion of the virtual channel.
- this application provides a method for setting a virtual channel of a data stream, including: a receiving device receives a first data packet of a first data stream from a sending device, the first data packet including the first data The identifier of the first virtual channel corresponding to the flow; the receiving device selects a second virtual channel for the first data flow from the first virtual channel group corresponding to the first data flow, and the second virtual channel is The first virtual channel is different; the receiving device sends a response message to the sending device, the response message includes the identifier of the second virtual channel, and the identifier of the second virtual channel is used for the sending The device updates the virtual channel corresponding to the first data stream.
- the receiving device dynamically allocates a virtual channel with a relatively low current congestion to the first data stream. Therefore, when the sending device sends the first data stream, the possibility of congestion in the virtual channel can be reduced, so that the first data stream Can be quickly sent to the receiving device.
- the receiving device selects a second virtual channel for the first data stream from the first virtual channel group corresponding to the first data stream, including: In the second virtual channel group, the second virtual channel is selected for the first data flow; wherein, the second virtual channel group includes one or more congestion levels in the first virtual channel group that meet a preset condition Virtual channels.
- a second virtual channel group is first set up.
- the virtual channels in the second virtual channel group are all virtual channels with a relatively low degree of congestion. Therefore, the second virtual channel can be directly selected from the second virtual channel group later. Can improve the efficiency of selection and help improve performance.
- the second virtual channel group includes at least one virtual channel, and the second virtual channel is any virtual channel in the second virtual channel group.
- the receiving device updates the second virtual channel group according to the current congestion degree of the virtual channels in the first virtual channel group.
- This solution can dynamically update the second virtual channel group, thereby helping to keep the virtual channels in the second virtual channel group always being some virtual channels with lower congestion, and helping the receiving device to select a virtual channel with lower congestion. Channel, which in turn can increase the likelihood of congestion.
- the second virtual channel is a virtual channel with the lowest degree of congestion in the first virtual channel group.
- the receiving device selects a virtual channel with the lowest degree of congestion, thereby increasing the possibility of congestion.
- the first data stream is a data stream of a first service type
- the virtual channel in the first virtual channel group is a virtual channel group corresponding to the data stream of the first service type
- At least one virtual channel in the first virtual channel group is different from at least one virtual channel in the virtual channel group corresponding to the data stream of the second service type, and the first service type is different from the second service type.
- Different types of business are different.
- the receiving device maintains a flow virtual channel table, the flow virtual channel table includes at least one entry, one entry corresponds to one data stream, and one entry includes at least the following three fields : The identifier of the data stream, the virtual channel of the data stream, and whether the entry is valid; the stream virtual channel table includes the first entry corresponding to the first data stream, and the virtual channel of the data stream corresponding to the first entry Is the second virtual channel; before the receiving device sends a response message to the sending device, the receiving device determines that the first entry corresponding to the first data stream is valid, and obtains information from the first The entry acquires the second virtual channel; the receiving device determines that the virtual channel of the data stream corresponding to the first entry is different from the first virtual channel.
- the receiving device by maintaining a stream virtual channel table, it is convenient for the receiving device to record the virtual channel selected for each data stream and record whether the virtual channel corresponding to the data stream needs to be updated currently.
- the initial state of the first table entry is invalid; the receiving device determines that the first table entry corresponding to the first data stream is valid, and obtains information from the first table entry Before acquiring the second virtual channel, the method further includes: the receiving device determines that the first data message satisfies a preset condition; the receiving device updates the second virtual channel to the first entry, and Set the first entry as valid.
- the receiving device receives a second data packet of the first data stream from the sending device, and the second data packet includes the identifier of the second virtual channel.
- the receiving device determines that the current congestion level of the second virtual channel satisfies a preset condition, and then selects a third virtual channel for the first data stream from the first virtual channel group. Channel; the receiving device updates the third virtual channel to the first entry, and the third virtual channel is different from the second virtual channel; if the first entry is invalid, the receiving The device sets the first entry as valid. Based on this solution, the virtual channel corresponding to the data flow in the flow virtual channel table can be dynamically updated, which helps to select a virtual channel with low congestion for the data flow.
- the receiving device determining that the current congestion level of the second virtual channel meets a preset condition includes: the receiving device determines that the congestion level of the second virtual channel is higher than the first congestion Degree threshold; or, the receiving device determines that the number of back pressure messages sent to the sending device is greater than the back pressure number threshold, and the back pressure messages are used to indicate that the congestion degree of the second virtual channel is higher than the first 2. Congestion degree threshold.
- the present application provides a method for setting a virtual channel of a data stream, including: a sending device sends a first data packet of a first data stream to a receiving device, the first data packet including the first data The identifier of the first virtual channel corresponding to the flow; the sending device receives a response message from the receiving device, the response message includes a second virtual channel, and the second virtual channel is corresponding to the first data flow One virtual channel in the first virtual channel group, the second virtual channel is different from the first virtual channel; the sending device updates the virtual channel corresponding to the first data stream to the second virtual channel .
- the receiving device dynamically allocates a virtual channel with a relatively low current congestion to the first data stream. Therefore, when the sending device sends the first data stream, the possibility of congestion in the virtual channel can be reduced, so that the first data stream Can be quickly sent to the receiving device.
- the second virtual channel is a virtual channel in a second virtual channel group
- the second virtual channel group includes a congestion degree in the first virtual channel group that satisfies a preset condition One or more virtual channels.
- the second virtual channel group includes at least one virtual channel, and the second virtual channel is any virtual channel in the second virtual channel group.
- the second virtual channel is a virtual channel with the lowest degree of congestion in the first virtual channel group.
- the first data stream is a data stream of a first service type
- the virtual channel in the first virtual channel group is a virtual channel group corresponding to the data stream of the first service type
- At least one virtual channel in the first virtual channel group is different from at least one virtual channel in the virtual channel group corresponding to the data stream of the second service type, and the first service type is different from the second service type.
- Different types of business are different.
- the first data message is a data message meeting a preset condition.
- the sending device after the sending device updates the virtual channel of the first data stream to the second virtual channel, the sending device sends the first data stream to the receiving device
- the second data message of the second data message includes the identifier of the second virtual channel.
- the present application provides a device for setting a virtual channel of a data stream.
- the device may be a receiving device or a chip for the receiving device.
- the device has the function of realizing each embodiment of the first aspect described above. This 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 device for setting a virtual channel of a data stream.
- the device may be a sending device or a chip for the sending device.
- the device has the function of realizing each embodiment of the second aspect described above. This 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 device for setting a virtual channel of a data stream, including: a processor and a memory; the memory is used to store computer execution instructions, and when the device is running, the processor executes the computer stored in the memory The instructions are executed to cause the device to perform the methods described in the above aspects.
- the present application provides a device for setting a virtual channel of a data stream, including: including units or means for performing each step of the foregoing aspects.
- the present application provides a device for setting a virtual channel of a data stream, including a processor and an interface circuit, where the processor is used to communicate with other devices through the interface circuit and execute the methods described in the foregoing aspects.
- the processor includes one or more.
- the present application provides a device for setting a virtual channel of a data stream, including a processor, configured to be connected to a memory, and configured to call a program stored in the memory to execute the methods described in the foregoing aspects.
- the memory can be located inside the device or outside the device.
- the processor includes one or more.
- the present application also provides a computer-readable storage medium having instructions stored in the computer-readable storage medium, which when run on a computer, cause a processor to execute the methods described in the foregoing aspects.
- the present application also provides a computer program product including instructions, which when run on a computer, cause the computer to execute the methods described in the above aspects.
- this application also provides a chip system, including a processor, configured to execute the methods described in the foregoing aspects.
- this application also provides a communication system, including: a receiving device for executing any of the methods described in the first aspect and a sending device for executing any of the methods described in the second aspect.
- Figure 1 is a schematic diagram of flow control based on virtual channels in the prior art
- FIG. 2 is a schematic diagram of the network architecture applicable to this application.
- FIG. 3 is a schematic flowchart of a method for setting a virtual channel of a data stream provided by this application;
- FIG. 4 is a schematic flowchart of another method for setting a virtual channel of a data stream provided by this application;
- FIG. 5 is a schematic diagram of a device for setting a virtual channel of a data stream provided by this application
- FIG. 6 is a schematic diagram of another device for setting a virtual channel of a data stream provided by this application.
- FIG. 7 is a schematic diagram of another device for setting a virtual channel of a data stream provided by this application.
- the network architecture includes sending equipment and receiving equipment.
- the sending equipment and receiving equipment in this application can be servers or network cards in a data center network (such as high-performance computing, high-performance distributed storage, big data, artificial intelligence, etc.), or can be switches or other device forms.
- the device 1->device 2->device 3->device 4 that is, device 1 sends a data stream to device 4, where device 1 is the initiator of the data stream or the data stream
- the device 1 can be a server, for example, and the device 4 here is the recipient of the data stream or the destination of the data stream.
- the device 4 can be a server, for example, and the device 2 and device 3 here are the data stream.
- the device 2 and device 3 can be switches or network cards.
- the channel between two adjacent devices on the link may be a virtual channel or a physical channel.
- the sending device shown in Figure 2 of the present application may be device 1, and the receiving device may be device 2, or device 3, or device 4, that is, the sending device is always the source and the receiving device It can be the device of any node in the link except the source.
- the sending device shown in FIG. 2 of the present application may be the device 1, and the receiving device may be the device 4, that is, the sending device is always the source end and the receiving device is always the destination end.
- the sending device shown in FIG. 2 of the present application may be the device 1 and the receiving device may be the device 2; or the sending device may be the device 2 and the receiving device may be the device 3; Alternatively, the sending device may be the device 3, and the receiving device may be the device 4. That is, the sending device and the receiving device are always two adjacent devices on the link.
- N there are N virtual channels between the sending device and the receiving device, N is greater than 1, there are N buffer queues on the sending device, each buffer on the sending device corresponds to a virtual channel, and there are also N buffers on the receiving device Queue, each buffer on the receiving device corresponds to a virtual channel. That is, there is a one-to-one correspondence between the N buffer queues on the sending device, the N buffer queues on the receiving device, and the N virtual channels.
- the virtual channel can be virtualized by a physical channel, and one physical channel can be virtualized into multiple virtual channels.
- buffer queue 1 on the sending device is sent to buffer queue 1 of the receiving device through virtual channel 1;
- the data stream of buffer queue 2 on the sending device is sent to buffer queue 2 of the receiving device through virtual channel 2;
- the data stream of the buffer queue 3 on the sending device is sent to the buffer queue 3 of the receiving device through the virtual channel 3;
- the data stream of the buffer queue 4 on the sending device is sent to the buffer queue 4 of the receiving device through the virtual channel 4;
- the data flow of the buffer queue 5 on the sending device is sent to the buffer queue 5 of the receiving device through the virtual channel 5;
- the data stream of the buffer queue 6 on the sending device is sent to the buffer queue 6 of the receiving device through the virtual channel 6;
- the data flow of the buffer queue 7 on the sending device is sent to the buffer queue 7 of the receiving device through the virtual channel 7;
- the data stream of the buffer queue 8 on the sending device is sent to the buffer queue 8 of the receiving device through the virtual channel 8.
- a virtual channel congestion refers to a situation where the data flow sent by the sending device is too fast or too much, which causes the corresponding buffer queue on the receiving device to be full or about to be full. Therefore, congestion of a virtual channel can also be understood as congestion of the corresponding buffer queue on reception. For example, taking Fig. 1 as an example, the virtual channel 7 is congested, which can also be understood as congestion in the buffer queue 7 on the receiving device.
- the congestion degree of the virtual channel can be expressed by the congestion degree of the buffer queue on the receiving device corresponding to the virtual channel.
- the congestion degree of a buffer queue can be represented by the ratio of the number of data packets buffered in the buffer queue to the storage capacity of the buffer queue (that is, the total number of buffered data packets).
- One data stream corresponds to one or more virtual channels.
- the data stream 1 corresponds to 4 virtual channels (virtual channel 1-virtual channel 4), so the sending device can pass any data packet of the data stream 1 through the Any one of the 4 virtual channels is sent to the receiving device.
- the data stream 2 corresponds to three virtual channels (virtual channel 1-virtual channel 3), so the sending device can pass any data packet of the data stream 2 through the three virtual channels Send any one of them to the receiving device.
- this data stream 3 corresponds to 3 virtual channels (virtual channel 3-virtual channel 5 respectively), so the sending device can pass any data packet of data stream 3 through the 3 virtual channels Send any one of them to the receiving device.
- data streams may be data streams of the same service type, or data streams of different service types.
- data stream 1 and data stream 2 are video-type data streams
- data stream 3 is a voice-type data stream.
- data streams of different service types can share virtual channels.
- data stream 2 of video type and data stream 3 of voice type share virtual channel 3.
- the virtual channels that can be used by data streams of the same service type may not be exactly the same.
- the video type data stream 1 cannot use the virtual channel 4, but the video type data stream 2 can use the virtual channel 4.
- One service type corresponds to multiple virtual channels
- one service type data stream corresponds to some or all of the multiple virtual channels
- the data streams of different service types correspond to different virtual channels.
- the first data stream For any data stream (referred to as the first data stream), if the first data stream is a data stream of the first service type, the virtual channel corresponding to the first data stream is the virtual channel corresponding to the data stream of the first service type Part or all of the virtual channels in the group, and at least one virtual channel in the virtual channel corresponding to the first data stream is different from at least one virtual channel in the virtual channel group corresponding to the data stream of the second service type, the first service The type is different from the second business type.
- any one of the virtual channels in the virtual channel corresponding to the first data stream is different from the virtual channel in the virtual channel group corresponding to the data stream of the second service type.
- the video service type corresponds to virtual channel 1 to virtual channel 4
- the voice service type corresponds to virtual channel 5 to virtual channel 7. That is, between the virtual channel corresponding to the video service type and the virtual channel corresponding to the voice service type. There is no intersection.
- the virtual channel corresponding to the data stream is a part or all of virtual channels 1-virtual channel 4.
- the corresponding virtual channel is virtual channel 1-virtual channel 3, indicating that the sending device can send any data packet of data stream 1 to any of these three virtual channels Receiving equipment.
- the corresponding virtual channel is virtual channel 1-virtual channel 4, indicating that the sending device can send any data packet of data stream 2 through any of these 4 virtual channels To the receiving device.
- the virtual channel corresponding to the data stream is part or all of the virtual channel 5-virtual channel 7.
- the corresponding virtual channel is virtual channel 5-virtual channel 6, indicating that the sending device can send any data packet of data stream 3 to any of these two virtual channels Receiving equipment.
- the corresponding virtual channel is virtual channel 5-virtual channel 7, indicating that the sending device can send any data packet of data stream 4 through any of these three virtual channels.
- all virtual channels corresponding to the same service type are set to the same priority, and the priorities between virtual channels corresponding to different service types are set to different. For example, if all virtual channels corresponding to the video service type are set to priority 1, then the priority between the data streams of the video service type is the same, that is, they are all 1. For another example, all virtual channels corresponding to the voice service type are set to priority 1. Set to priority 2, then the priority between the data streams of the voice service type is the same, that is, both are 2.
- one data stream can correspond to one or more virtual channels.
- the set of all virtual channels corresponding to any one data stream (referred to as the first data stream in this application) is called the first virtual channel group.
- the first virtual channel group corresponding to data stream 1 includes: ⁇ virtual channel 1, virtual channel 2, virtual channel 3, Virtual channel 4 ⁇ .
- the first virtual channel group corresponding to a data stream refers to the set of all available virtual channels corresponding to the data stream.
- a set of one or more virtual channels whose congestion degree in the first virtual channel group corresponding to any one data stream meets a preset condition is referred to as a second virtual channel group.
- the preset condition here may be the lowest congestion level, that is, the set of one or more virtual channels with the lowest congestion level in the first virtual channel group is called the second virtual channel group.
- the second virtual channel group For example, for data stream 1, if the corresponding first virtual channel group includes: ⁇ virtual channel 1, virtual channel 2, virtual channel 3, virtual channel 4 ⁇ , and the number of virtual channels included in the second virtual channel group is preset Equal to 2. If virtual channel 3 and virtual channel 4 are the two virtual channels with the lowest congestion in the first virtual channel group, then the second virtual channel group includes: ⁇ virtual channel 3, virtual channel 4 ⁇ .
- the preset condition here may also be that the congestion level is less than the preset threshold, that is, the set of one or more virtual channels in the first virtual channel group whose congestion level is less than the preset threshold is called the second virtual channel group.
- the preset condition here may also be that the congestion level is less than the preset threshold and the congestion level is not the smallest, that is, the congestion level in the first virtual channel group is less than the preset threshold and the congestion level is not the smallest one or more virtual channels.
- the set is called the second virtual channel group. This method excludes the virtual channel with the least congestion degree from the second virtual channel group, considering that the virtual channel with the least congestion degree can be reserved for other purposes, such as sending a specific data stream.
- the second virtual channel group can be dynamically updated, for example, can be updated periodically.
- the receiving device may update the second virtual channel group according to the current congestion degree of the virtual channels in the first virtual channel group. That is, the congestion level of the virtual channels in the first virtual channel group changes in real time, so the receiving device can update the second virtual channel group based on the current congestion level of the virtual channels in the first virtual channel group when the period arrives.
- the first data stream corresponds to a first virtual channel group.
- the first virtual channel group includes at least two virtual channels, which are the first A virtual channel and a second virtual channel, and the second virtual channel is different from the first virtual channel.
- the second virtual channel group corresponding to the first data stream is a subset or a true subset of the first virtual channel group.
- the method includes the following steps:
- Step 301 The sending device sends the first data packet of the first data stream to the receiving device.
- the receiving device can receive the first data packet of the first data stream.
- the first data message is any data message of the first data stream. Specifically, it may be the first data message of the first data stream, or it may be a subsequent data message.
- the first data packet includes the identifier of the first virtual channel corresponding to the first data flow.
- the first virtual channel refers to the virtual channel currently used by the first data stream.
- Step 303 The receiving device selects a second virtual channel for the first data stream from the first virtual channel group corresponding to the first data stream.
- Method 1 Use the virtual channel with the lowest congestion in the first virtual channel group as the selected second virtual channel.
- Method 2 Use the virtual channel with the lowest congestion in the second virtual channel group as the selected second virtual channel.
- Method 3 Use any virtual channel in the second virtual channel group as the selected second virtual channel.
- the virtual channels in the second virtual channel group are all virtual channels with relatively light congestion, directly selecting any virtual channel from the second virtual channel group as the second virtual channel can make the implementation easier.
- Method 4 According to the identifier of the first data stream (for example, it may be quintuple information) and the second virtual channel group, the above-mentioned second virtual channel is selected for the first data stream.
- This method is aimed at selecting a second virtual channel for multiple data streams at the same time.
- the receiving device needs to select the second virtual channel for multiple different data streams at the same time (the data streams can be data streams of the same service type, or data streams of different service types), and the receiving device can select the second virtual channel according to the data The identification of the flow and the second virtual channel group.
- These data flows are allocated to different virtual channels in the second virtual channel group to achieve uniform distribution and avoid simultaneous allocation of the second virtual channels corresponding to multiple data streams to a certain Or some virtual channels, causing some or some virtual channels to be congested.
- the first virtual channel group corresponding to the first data stream includes: ⁇ virtual channel 1, virtual channel 2, virtual channel 3, virtual channel 4 ⁇ , where the congestion degree of virtual channel 1>virtual channel
- the second virtual channel group includes: ⁇ virtual channel 3, virtual channel 4 ⁇ .
- the receiving device selects the second virtual channel from the first virtual channel group, that is, selects the least congested channel from virtual channel 1, virtual channel 2, virtual channel 3, and virtual channel 4.
- the virtual channel 4 is the second virtual channel, that is, the second virtual channel is virtual channel 4.
- step 303 if based on the above method 2, the receiving device selects the second virtual channel from the second virtual channel group, that is, selects the virtual channel 4 with the least congestion from virtual channel 3 and virtual channel 4 as the second virtual channel.
- the virtual channel, that is, the second virtual channel is virtual channel 4.
- the receiving device selects any virtual channel from the second virtual channel group, that is, selects any virtual channel from virtual channel 3 and virtual channel 4 as the second virtual channel, Therefore, the second virtual channel is virtual channel 3 or virtual channel 4.
- the receiving device will use the identifier of the first data stream and The first virtual channel group selects a second virtual channel for the first data stream, and selects a second virtual channel for the second data stream according to the identifier of the second data stream and the first virtual channel group.
- the selection can be made through a hash function method, so that the virtual channels selected for different data streams are as dispersed as possible.
- the virtual channel selected by the receiving device for the first data stream is virtual channel 3
- the virtual channel selected for the second data stream is virtual channel 4.
- Step 305 The receiving device sends a response message to the sending device.
- the sending device can receive the response message.
- the response message includes the identifier of the second virtual channel, and the second virtual channel is used to update the virtual channel corresponding to the first data stream on the sending device.
- Step 306 The sending device updates the virtual channel of the first data stream to the second virtual channel.
- the sending device updates the virtual channel of the first data stream from the first virtual channel to the second virtual channel.
- the receiving device dynamically allocates a virtual channel with a relatively low current congestion to the first data stream. Therefore, when the sending device sends the first data stream, the possibility of congestion in the virtual channel can be reduced, so that the first data stream The stream can be quickly sent to the receiving device.
- step 306 the following step 307 is further included.
- Step 307 The sending device sends the second data packet of the first data stream to the receiving device.
- the receiving device can receive the second data packet of the first data stream.
- the second data message includes the identifier of the second virtual channel. Therefore, the receiving device buffers the subsequent data packets of the first data stream to the buffer queue corresponding to the second virtual channel.
- the second data message may be the first data message after the first data message, or it may be a data message with multiple data messages after the first data message.
- the sending device may continuously send multiple data packets (including the first data packet) of the first data stream at one time.
- Each data packet includes an identifier of the first virtual channel, and the sending device is updating the virtual channel.
- the identifiers of the virtual channels included in these data packets are also the identifiers of the first virtual channel.
- step 302 is further included.
- Step 302 The receiving device determines that the first data packet meets a preset condition.
- meeting the preset condition here may be that the first data packet is the first data packet of the first data flow. That is, when the receiving device receives the first data packet of the first data stream, it executes the above-mentioned solution of reselecting a virtual channel for the first data stream.
- meeting the preset condition here may also be that the first data packet is the Kth packet of the first data stream, and K is a preset integer greater than 1.
- K is preset to 100
- the receiving device receives the 100th data packet of the first data stream, it triggers the execution of the above solution of reselecting a virtual channel for the first data stream.
- the receiving device considers that it is necessary to select a virtual channel with a lower degree of congestion for the first data stream, and thus triggers the execution of the aforementioned virtual channel Selection process.
- step 304 may also be included.
- Step 304 The receiving device determines that the second virtual channel is different from the first virtual channel.
- the receiving device determines that the second virtual channel is different from the first virtual channel, it will carry the identifier of the second virtual channel in the response message; otherwise, the response message in step 305 is a normal response message, which is not The identifier of the second virtual channel is carried, so the sending device does not need to perform step 306. Accordingly, the second data packet in step 307 still carries the identifier of the first virtual channel.
- FIG. 4 it is a schematic flowchart of another method for setting a virtual channel of a data stream provided by this application.
- a flow virtual channel table is maintained in the receiving device, the flow virtual channel table includes one or more table entries, one table entry corresponds to one data flow, and different table entries correspond to different data flows.
- An entry includes at least three fields: the identifier of the data stream, the virtual channel of the data stream, and whether the entry is valid.
- each entry in the virtual channel table is set to be invalid, that is, the field "Is the entry valid” in each entry is set to "Invalid", and the " The "Virtual Channel of Data Stream” field is set to empty or other invalid information.
- the stream virtual channel table includes the identifier of the first data stream, and the virtual channel corresponding to the first data stream is set to empty or For other invalid information, the entry corresponding to the first data stream is invalid, that is, the virtual channel corresponding to the first data stream cannot be used to update the virtual channel of the first data stream.
- Table 1 The initial state of the flow virtual channel table
- the method includes the following steps:
- Step 401 The receiving device receives the first data packet of the first data stream, and determines whether the received first data packet of the first data stream is the first data packet of the first data stream. If yes, go to step 402, if not, go to step 403.
- the first data packet of the first data flow here includes the identifier of the first virtual channel, and the first virtual channel is the virtual channel currently used by the data flow.
- the first data packet of the first data stream satisfies the preset condition: the first data packet is the first data packet of the first data stream.
- Step 402 The receiving device selects a new virtual channel (referred to as a second virtual channel) for the first data stream, and sets it in the stream virtual channel table.
- a new virtual channel referred to as a second virtual channel
- the first virtual channel carried in the first data message is the initial virtual channel corresponding to the first data flow.
- the receiving device After the receiving device determines that the first data message is the first data message of the first data flow, it reselects a new virtual channel (that is, the second virtual channel) for the first data flow.
- the specific method for selecting the new virtual channel can refer to the description of the embodiment in FIG. 3 (ie, the specific method for selecting the second virtual channel in FIG. 3).
- the receiving device updates the virtual channel A (also referred to as the second virtual channel) to the entry corresponding to the data stream 1 in the stream virtual channel table, and sets the entry as valid.
- Table 1 is updated to obtain Table 2, which is the flow virtual channel table after updating the entry corresponding to data flow 1.
- the receiving device can also update the entries of other data streams in the stream virtual channel table accordingly.
- Table 3 Stream virtual channel table after updating the entries corresponding to data stream 1 and data stream 2 respectively
- Step 403 The receiving device determines whether the entry corresponding to the first data stream in the stream virtual channel table is valid. If it is valid, go to step 404; if it is invalid, go to step 408.
- the receiving device determines that the entry corresponding to the first data stream in the stream virtual channel table is valid, it acquires the virtual channel corresponding to the first data stream (ie, the second virtual channel) from the stream virtual channel table, And go to step 404. If the receiving device determines that the entry corresponding to the first data stream in the stream virtual channel table is invalid, go to step 408.
- step 402 When it is determined in step 403 that the received first data packet is the first data packet of the first data stream, step 402 is executed. Therefore, the entry corresponding to the first data stream in the stream virtual channel must be If it is valid, it will go to step 404.
- step 403 When it is determined in step 403 that the received first data packet is not the first data packet of the first data flow, step 402 will not be executed, but step 402 will be skipped and step 403 will be executed. At this time, the flow is virtual
- the entry corresponding to the first data stream in the channel table may be valid or invalid.
- Step 404 The receiving device determines whether the first virtual channel in the first data message is the same as the virtual channel of the entry corresponding to the first data flow in the flow virtual channel table. If they are not the same, go to step 405; if they are the same, go to step 407.
- the receiving device obtains the identifier of the virtual channel corresponding to the entry corresponding to the first data stream (ie, the first entry) from the stream virtual channel table, that is, the identifier of the second virtual channel, and then compares the second virtual channel with the first virtual channel. Virtual channels are compared.
- the entry corresponding to data flow 1 in the flow virtual channel table is valid (see Table 2 or Table 2). 3) And, if the virtual channel in the first received data message is different from the virtual channel in the table entry corresponding to the data flow 1 in the flow virtual channel table, go to step 405.
- the virtual channel reselected for the first data stream in step 402 is exactly the same as the initial virtual channel of the first data stream (that is, the selected second virtual channel is The first virtual channel is the same), then after step 404, go to step 407.
- Step 405 The receiving device sends a response message to the sending device, where the response message carries the identifier of the second virtual channel.
- the receiving device sends a response message for the first data message carrying the identifier of the second virtual channel.
- the response message also carries the identifier of the second virtual channel.
- Step 406 The sending device updates the virtual channel corresponding to the first data stream to the second virtual channel.
- Step 407 The receiving device sets the entry corresponding to the first data stream in the stream virtual channel table as invalid.
- step 407 The following is divided into different situations, under what circumstances will be executed step 407, and the effect after step 407 is executed.
- Case 1 The receiving device receives the first data packet of the first data stream, and the selected second virtual channel is the same as the first virtual channel.
- the virtual channel equivalent to the first data stream is already a better virtual channel, so there is no need to update, or it is understood that the virtual channel of the first data stream remains unchanged, that is, the first data stream is completed Confirmation of the virtual channel used by the flow, therefore, the entry corresponding to the first data flow in the flow virtual channel table is set to be invalid, that is, there is no need to select a virtual channel for the first data flow subsequently.
- Case 2 The receiving device receives the first data packet of the first data stream, and the selected second virtual channel is different from the first virtual channel.
- step 405 will be executed, that is, the receiving device notifies the sending device to update the virtual channel through a response message. Specifically, it is divided into the following two situations.
- the sending device receives the response message and obtains the identifier of the new virtual channel in the response message (that is, the identifier of the second virtual channel), and completes the update of the virtual channel (that is, the update from the first virtual channel) Is the second virtual channel).
- the sending device is sending a subsequent data packet of the first data stream (referred to as a second data packet).
- the second data packet will carry the identifier of the second virtual channel.
- the flow virtual channel table is The entry corresponding to the first data stream is still valid. Therefore, for the second data packet, step 401, step 403, and step 404 will be executed, and step 407 will be executed after step 404.
- the sending device does not receive the response message or fails to parse the response message correctly, and therefore fails to complete the update of the virtual channel (that is, keep the virtual channel as the first virtual channel).
- the sending device sends a subsequent data packet of the first data stream (referred to as the second data packet)
- the second data packet will still carry the identifier of the virtual channel before the update (that is, the first virtual channel).
- the entry corresponding to the first data flow in the flow virtual channel table is still valid. Therefore, for the second data packet, step 401, step 403, and step 404 will be executed, and after step 404 Step 405 is executed.
- the receiving device will perform the above step 407. Therefore, the virtual channel of each data stream can only be updated once, and the virtual channel is a better virtual channel considered by the receiving device, thus realizing the allocation of a suitable virtual channel for the data stream.
- the virtual channel of the first data stream in the stream virtual channel table may also be dynamically updated.
- the virtual channel currently corresponding to the first data stream is the second virtual channel, and when the receiving device determines that the current congestion degree of the second virtual channel meets the preset condition, it will start from the first data stream corresponding to the first data stream.
- select a new virtual channel (referred to as the third virtual channel) for the first data flow, and update the third virtual channel to the table corresponding to the first data flow in the flow virtual channel table Item, the third virtual channel is different from the second virtual channel, and the congestion degree of the third virtual channel is lower than or equal to the congestion degree of the second virtual channel.
- the receiving device determines that the current congestion degree of the first data stream satisfies a preset condition, including:
- Method 1 The receiving device determines that the congestion degree of the second virtual channel is higher than the first congestion degree threshold.
- the virtual channel is considered to be relatively congested, and a virtual channel can be reselected for the first data stream.
- the congestion degree of a virtual channel can be expressed by the congestion degree of the buffer queue corresponding to the virtual channel on the receiving device.
- Method 2 The receiving device determines that the number of back pressure messages sent to the sending device is greater than the back pressure number threshold, and the back pressure messages are used to indicate that the congestion degree of the second virtual channel is higher than the second congestion degree threshold.
- the receiving device whenever the receiving device determines that the congestion degree of the corresponding virtual channel of the first data stream is higher than the preset second congestion degree threshold, it will send a back pressure message (such as a back pressure frame) to the sending device Or pause frame), used to notify the sending device that the second virtual channel is currently congested.
- a back pressure message such as a back pressure frame
- the receiving device is triggered to reselect a new virtual channel (that is, the third virtual channel) for the first data stream, and update it to the stream virtual In the channel.
- the number of back pressure messages here refers to the number of back pressure messages counted within a preset period of time, that is, method 2 can be understood as: the receiving device determines the back pressure message sent to the sending device The number of messages is greater than the threshold of the number of back pressures, and the back pressure message is used to indicate that the congestion degree of the second virtual channel is higher than the second congestion degree threshold.
- the receiving device when receiving the first data message of a data stream, can set the entry corresponding to the data stream in the stream virtual channel table, or it can be in the virtual channel update period of the data stream. When it arrives, reselect a new virtual channel for the data stream, and then update the new virtual channel to the entry corresponding to the data stream in the stream virtual channel table.
- the data stream is in the stream virtual channel table
- the virtual channel of is the same as the selected new virtual channel, so there is no need to update.
- the stream virtual channel table is updated and it is found that the field "virtual channel of data stream" is currently set to "invalid", the field needs to be set to "valid".
- the virtual channel can be updated multiple times for one data stream, which helps to ensure that the virtual channel of the data stream is always in a better state (that is, the congestion degree of the virtual channel is low).
- Step 408 The receiving device sends a normal response message to the sending device.
- the sending device can receive the response message.
- the ordinary response message is a message that does not include the new virtual channel.
- the receiving device may set virtual channels for one data stream at a time according to the embodiment of FIG. 4, or set virtual channels for multiple data streams at a time according to the embodiment of FIG. 4.
- the receiving device can update the virtual channel of the data stream when it receives the first data packet of the data stream, or it can complete the update of the data stream when it receives subsequent data packets of the data stream. Update of the virtual channel of the data stream.
- the virtual channel is allocated based on the data flow when the receiving device first receives the data message of the data flow, which can well solve the congestion problem caused by the large flow of the virtual channel.
- the receiving device can also dynamically update the flow virtual channel table according to the back pressure of the data flow and the current virtual channel status, which can still prevent and relieve well when the traffic model changes. Congestion caused by heavy virtual channel traffic. Therefore, the method of the present application can allocate virtual channels based on data streams and dynamically modify virtual channels of data streams. Compared with the background technical solutions, it can make full use of network resources, and can prevent and alleviate the large virtual channel traffic. Congestion problem.
- each network element described above includes hardware structures and/or software modules corresponding to each function.
- the present invention 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 and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the present invention.
- the device 500 may exist in the form of software or hardware.
- the apparatus 500 may include: a processing unit 502 and a communication unit 503.
- the communication unit 503 may include a receiving unit and a sending unit.
- the processing unit 502 is used to control and manage the actions of the device 500.
- the communication unit 503 is used to support communication between the device 500 and other network entities.
- the device 500 may further include a storage unit 501 for storing program codes and data of the device 500.
- the processing unit 502 may be a processor or a controller, for example, a general-purpose central processing unit (central processing unit, CPU), a general-purpose processor, a digital signal processing (digital signal processing, DSP), and an application specific integrated circuit (application specific integrated circuit). circuits, ASIC), field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure of this application.
- the processor may also be a combination for realizing computing functions, for example, including a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
- the storage unit 501 may be a memory.
- the communication unit 503 is an interface circuit of the device for receiving signals from other devices.
- the communication unit 503 is an interface circuit for the chip to receive signals from other chips or devices, or an interface circuit for the chip to send signals to other chips or devices.
- the apparatus 500 may be the receiving device in any of the foregoing embodiments, and may also be a chip for the receiving device.
- the processing unit 502 may be a processor, for example, and the communication unit 503 may be a transceiver, for example.
- the transceiver may include a radio frequency circuit
- the storage unit may be, for example, a memory.
- the processing unit 502 may be, for example, a processor, and the communication unit 503 may be, for example, an input/output interface, a pin, or a circuit.
- the processing unit 502 can execute computer-executable instructions stored in the storage unit.
- the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit located outside the chip in the receiving device.
- the storage unit such as read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), etc.
- the apparatus 500 is a receiving device, where the communication unit 503 includes a sending unit and a receiving unit.
- a receiving unit configured to receive a first data packet of a first data stream from a sending device, where the first data packet includes an identifier of a first virtual channel corresponding to the first data stream;
- a processing unit 502 configured to receive In the first virtual channel group corresponding to the first data stream, a second virtual channel is selected for the first data stream, and the second virtual channel is different from the first virtual channel;
- the sending unit is configured to send the The sending device sends a response message, where the response message includes an identifier of the second virtual channel, and the identifier of the second virtual channel is used by the sending device to update the virtual channel corresponding to the first data stream.
- the first data packet includes the identifier of the first data stream; the processing unit 502 is specifically configured to perform according to the identifier of the first data stream and the first virtual Channel group, select the second virtual channel for the first data stream.
- the processing unit 502 is specifically configured to: select the second virtual channel for the first data stream from the second virtual channel group; wherein, the second virtual channel The group includes one or more virtual channels whose congestion degree meets a preset condition in the first virtual channel group.
- the second virtual channel group includes at least one virtual channel, and the second virtual channel is any virtual channel in the second virtual channel group.
- the processing unit 502 is further configured to update the second virtual channel group according to the current congestion degree of the virtual channels in the first virtual channel group.
- the second virtual channel is a virtual channel with the lowest degree of congestion in the first virtual channel group.
- the first data stream is a data stream of a first service type
- the virtual channel in the first virtual channel group is a virtual channel group corresponding to the data stream of the first service type
- At least one virtual channel in the first virtual channel group is different from at least one virtual channel in the virtual channel group corresponding to the data stream of the second service type, and the first service type is different from the second service type.
- Different types of business are different.
- the device maintains a flow virtual channel table
- the flow virtual channel table includes at least one table entry, one table entry corresponds to one data flow, and one table entry includes at least the following three fields: The identification of the data stream, the virtual channel of the data stream, and whether the entry is valid; the stream virtual channel table includes a first entry corresponding to the first data stream, and the virtual channel of the data stream corresponding to the first entry is The second virtual channel;
- the processing unit 502 is further configured to determine that the first entry corresponding to the first data stream is valid before the sending unit sends a response message to the sending device; and determine that the first entry corresponds to The virtual channel of the data stream is different from the first virtual channel.
- the initial state of the first entry is invalid; the processing unit 502 is further configured to: after determining that the first entry corresponding to the first data stream is valid, and from Before the first entry acquires the second virtual channel, it is determined that the first data packet meets a preset condition; the second virtual channel is updated to the first entry, and the first The entry is set to be valid.
- the receiving unit is further configured to receive a second data packet of the first data stream from the sending device, where the second data packet includes the second virtual channel Logo.
- the processing unit 502 is further configured to: determine that the current congestion level of the second virtual channel satisfies a preset condition, and then select the first virtual channel group from the first virtual channel group.
- the data stream selects the third virtual channel; the third virtual channel is updated to the first entry, and the third virtual channel is different from the second virtual channel; if the first entry is invalid, the The first entry is set to be valid.
- the processing unit 502 is specifically configured to: determine that the congestion degree of the second virtual channel is higher than the first congestion degree threshold; or, determine the backpressure report sent to the sending device The number of messages is greater than a threshold of the number of back pressures, and the back pressure message is used to indicate that the congestion degree of the second virtual channel is higher than the second congestion degree threshold.
- the device 600 may exist in the form of software or hardware.
- the apparatus 600 may include: a processing unit 602 and a communication unit 603.
- the communication unit 603 may include a receiving unit and a sending unit.
- the processing unit 602 is used to control and manage the actions of the device 600.
- the communication unit 603 is used to support communication between the device 600 and other network entities.
- the device 600 may further include a storage unit 601 for storing program codes and data of the device 600.
- the processing unit 602 may be a processor or a controller, for example, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure of this application.
- the processor may also be a combination for realizing computing functions, for example, including a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
- the storage unit 601 may be a memory.
- the communication unit 603 is an interface circuit of the device for receiving signals from other devices. For example, when the device is implemented as a chip, the communication unit 603 is an interface circuit for the chip to receive signals from other chips or devices, or an interface circuit for the chip to send signals to other chips or devices.
- the apparatus 600 may be the sending device in any of the foregoing embodiments, and may also be a chip for the sending device.
- the processing unit 602 may be a processor, for example, and the communication unit 603 may be a transceiver, for example.
- the transceiver may include a radio frequency circuit
- the storage unit may be, for example, a memory.
- the processing unit 602 may be, for example, a processor, and the communication unit 603 may be, for example, an input/output interface, a pin, or a circuit.
- the processing unit 602 can execute computer-executable instructions stored in the storage unit.
- the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit located outside the chip in the sending device.
- the storage unit such as ROM or other types of static storage devices that can store static information and instructions, RAM, etc.
- the apparatus 600 is a sending device, and the communication unit 603 includes a sending unit and a receiving unit.
- the sending unit is configured to send a first data packet of a first data stream to a receiving device, where the first data packet includes the identifier of the first virtual channel corresponding to the first data stream;
- the receiving device receives a response message, where the response message includes an identifier of a second virtual channel, and the second virtual channel is a virtual channel in a first virtual channel group corresponding to the first data stream.
- the second virtual channel is different from the first virtual channel;
- the processing unit 602 is configured to update the virtual channel corresponding to the first data stream to the second virtual channel.
- the second virtual channel is a virtual channel in a second virtual channel group
- the second virtual channel group includes a congestion degree in the first virtual channel group that satisfies a preset condition One or more virtual channels.
- the second virtual channel group includes at least one virtual channel, and the second virtual channel is any virtual channel in the second virtual channel group.
- the first data stream is a data stream of a first service type
- the virtual channel in the first virtual channel group is a virtual channel group corresponding to the data stream of the first service type
- At least one virtual channel in the first virtual channel group is different from at least one virtual channel in the virtual channel group corresponding to the data stream of the second service type, and the first service type is different from the second service type.
- Different types of business are different.
- the first data packet is a data packet of the first data flow that meets a preset condition.
- the sending unit is further configured to send to the receiving device after the processing unit 602 updates the virtual channel of the first data stream to the second virtual channel The second data packet of the first data stream, where the second data packet includes the identifier of the second virtual channel.
- the second virtual channel is a virtual channel with the lowest degree of congestion in the first virtual channel group.
- FIG. 7 a schematic diagram of a device for setting a virtual channel of a data stream provided by this application.
- the device may be the receiving device or the sending device in the above-mentioned embodiment.
- the device 700 includes a processor 702, a communication interface 703, and a memory 701.
- the apparatus 700 may further include a communication line 704.
- the communication interface 703, the processor 702, and the memory 701 may be connected to each other through a communication line 704;
- the communication line 704 may be a peripheral component interconnection standard (peripheral component interconnect, PCI for short) bus or an extended industry standard architecture (extended industry standard architecture) , Referred to as EISA) bus and so on.
- the communication line 704 can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.
- the processor 702 may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.
- the communication interface 703 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), Wired access network, etc.
- RAN radio access network
- WLAN wireless local area networks
- Wired access network etc.
- the memory 701 can be ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, or can be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory).
- read-only memory EEPROM
- compact disc read-only memory, CD-ROM
- optical disc storage including compact discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.
- magnetic disks A storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
- the memory may exist independently and is connected to the processor through the communication line 704. The memory can also be integrated with the processor.
- the memory 701 is used to store computer-executed instructions for executing the solution of the present application, and the processor 702 controls the execution.
- the processor 702 is configured to execute computer-executable instructions stored in the memory 701, so as to implement the method for setting a virtual channel of a data stream provided in the foregoing embodiment of the present application.
- the computer-executable instructions in the embodiments of the present application may also be referred to as application program codes, which are not specifically limited in the embodiments of the present application.
- At least one (piece, species) of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or Multiple.
- Multiple refers to two or more, and other measure words are similar.
- "a device” means to one or more such devices.
- the computer program product includes one or more computer instructions.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- the computer instructions 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 instructions may be transmitted from a website, computer, server, or data center.
- 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 integrated with one or more available media.
- the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
- the various illustrative logic units and circuits described in the embodiments of this application can be implemented by general-purpose processors, digital signal processors, application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, Discrete gates or transistor logic, discrete hardware components, or any combination of the above are designed to implement or operate the described functions.
- the general-purpose processor may be a microprocessor, and optionally, the general-purpose processor may also be any traditional processor, controller, microcontroller, or state machine.
- the processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration achieve.
- the steps of the method or algorithm described in the embodiments of the present application can be directly embedded in hardware, a software unit executed by a processor, or a combination of the two.
- the software unit can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM or any other storage medium in the field.
- the storage medium may be connected to the processor, so that the processor can read information from the storage medium, and can store and write information to the storage medium.
- the storage medium may also be integrated into the processor.
- the processor and the storage medium can be arranged in the ASIC.
- These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
- the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请提供一种数据流的虚拟通道的设置方法及装置。该方法包括:接收设备从发送设备接收第一数据流的第一数据报文,第一数据报文包括第一数据流对应的第一虚拟通道的标识;接收设备从第一数据流对应的第一虚拟通道组中,为第一数据流选择第二虚拟通道,第二虚拟通道与第一虚拟通道不同;接收设备向发送设备发送应答报文,应答报文包括第二虚拟通道的标识,第二虚拟通道的标识用于发送设备更新第一数据流对应的虚拟通道。基于该方案,接收设备动态地为第一数据流分配当前拥塞程度较低的虚拟通道,因而发送设备在发送该第一数据流时,可以降低虚拟通道发生拥塞的可能性,使得第一数据流可以快速被发送至接收设备。
Description
相关申请的交叉引用
本申请要求在2019年04月17日提交中国专利局、申请号为201910309167.9、申请名称为“一种数据流的虚拟通道的设置方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及移动通信技术领域,尤其涉及一种数据流的虚拟通道的设置方法及装置。
在网络中有些高性能的业务要求无丢包地传输,以太网暂停(Pause)机制是一种防止丢包的机制,其基本原理是:当接收设备的接收能力小于发送设备的发送能力时,会主动发送流量暂停信号(Pause帧)给发送设备,以通知发送设备暂停发送,等待一定时间后再继续发送。但是Pause机制是针对整个端口的,Pause帧会导致整个链路暂停流量。当多种业务共享链路时任意一种业务导致链路流量暂停都会中断所有业务。
为解决上述问题,目前的一种解决方案是:在一条以太网链路上创建多个虚拟通道,一个虚拟通道对应一种业务类型,即一种业务类型的数据流通过一个虚拟通道发送。因此,当某个虚拟通道发生拥塞(即接收设备上的该虚拟通道对应的缓存队列发生拥塞)时,只需要单独暂停这一个虚拟通道的流量,因而不影响其它虚拟通道的流量,从而实现多种类型的业务对一个物理链路的共享和隔离。
如图1所示,为基于虚拟通道的流量控制示意图。作为示例,发送设备和接收设备之间的一个物理链路分成了8个虚拟通道,一种业务类型对应一个虚拟通道,接收设备上的一个缓存队列对应一个虚拟通道。例如,当第7个虚拟通道流量发生拥塞时,接收设备的虚拟通道7会给发送设备的虚拟通道7发送流量暂停信号,发送设备的虚拟通道7收到流量暂停信号后暂停发送流量,其他虚拟通道的业务流量不受影响。
上述方法存在的问题是:当一个业务类型的数据流的数量较多时,将导致该业务类型对应的虚拟通道的流量非常大,则该虚拟通道将会持续出现拥塞的情况,从而造成数据流不能被快速发送,甚至是不能发送。
发明内容
本申请提供一种数据流的虚拟通道的设置方法及装置,用以解决虚拟通道拥塞造成的数据流不能被快速发送的问题。
第一方面,本申请提供一种数据流的虚拟通道的设置方法,包括:接收设备从发送设备接收第一数据流的第一数据报文,所述第一数据报文包括所述第一数据流对应的第一虚拟通道的标识;所述接收设备从所述第一数据流对应的第一虚拟通道组中,为所述第一数据流选择第二虚拟通道,所述第二虚拟通道与所述第一虚拟通道不同;所述接收设备向所述发送设备发送应答报文,所述应答报文包括所述第二虚拟通道的标识,所述第二虚拟通 道的标识用于所述发送设备更新所述第一数据流对应的虚拟通道。基于该方案,接收设备动态地为第一数据流分配当前拥塞程度较低的虚拟通道,因而发送设备在发送该第一数据流时,可以降低虚拟通道发生拥塞的可能性,使得第一数据流可以快速被发送至接收设备。
在一种可能的实现方法中,所述第一数据报文包括所述第一数据流的标识;所述接收设备从所述第一数据流对应的第一虚拟通道组中,为所述第一数据流选择第二虚拟通道,包括:所述接收设备根据所述第一数据流的标识和所述第一虚拟通道组,为所述第一数据流选择所述第二虚拟通道。
在一种可能的实现方法中,所述接收设备从所述第一数据流对应的第一虚拟通道组中,为所述第一数据流选择第二虚拟通道,包括:所述接收设备从第二虚拟通道组中,为所述第一数据流选择所述第二虚拟通道;其中,所述第二虚拟通道组包括所述第一虚拟通道组中的拥塞程度满足预设条件的一个或多个虚拟通道。该方案,先设置一个第二虚拟通道组,该第二虚拟通道组内的虚拟通道均为拥塞程度较低的虚拟通道,因而后续可以直接从该第二虚拟通道组内选择第二虚拟通道,可以提升选择的效率,有助于提升性能。
在一种可能的实现方法中,所述第二虚拟通道组中包括至少一个虚拟通道,所述第二虚拟通道为所述第二虚拟通道组中的任一虚拟通道。
在一种可能的实现方法中,所述接收设备根据所述第一虚拟通道组中的虚拟通道的当前拥塞程度,更新所述第二虚拟通道组。该方案,可以动态更新第二虚拟通道组,因而有助于保持第二虚拟通道组内的虚拟通道始终是拥塞程度较低的一些虚拟通道,有助于接收设备选择出一个拥塞程度低的虚拟通道,进而可以提升发生拥塞的可能性。
在一种可能的实现方法中,所述第二虚拟通道为所述第一虚拟通道组中的拥塞程度最低的一个虚拟通道。该方案,接收设备选择出一个拥塞程度最低的虚拟通道,进而可以提升发生拥塞的可能性。
在一种可能的实现方法中,所述第一数据流为第一业务类型的数据流,所述第一虚拟通道组中的虚拟通道为所述第一业务类型的数据流对应的虚拟通道组中的虚拟通道,所述第一虚拟通道组中的至少一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的至少一个虚拟通道不同,所述第一业务类型与所述第二业务类型不同。
在一种可能的实现方法中,所述接收设备内维护一个流虚拟通道表,所述流虚拟通道表包括至少一个表项,一个表项对应一条数据流,一个表项至少包括以下三个字段:数据流的标识、数据流的虚拟通道、表项是否有效;所述流虚拟通道表包括所述第一数据流对应的第一表项,所述第一表项对应的数据流的虚拟通道为所述第二虚拟通道;所述接收设备向所述发送设备发送应答报文之前,所述接收设备确定所述第一数据流对应的所述第一表项有效,并从所述第一表项获取所述第二虚拟通道;所述接收设备确定所述第一表项对应的数据流的虚拟通道与所述第一虚拟通道不同。该方案,通过维护一个流虚拟通道表,便于接收设备记录为每个数据流选择的虚拟通道,以及记录当前是否需要更新该数据流对应的虚拟通道。
在一种可能的实现方法中,所述第一表项的初始状态为无效;所述接收设备确定所述第一数据流对应的所述第一表项有效,并从所述第一表项获取所述第二虚拟通道之前,还包括:所述接收设备确定所述第一数据报文满足预设条件;所述接收设备将所述第二虚拟通道更新至所述第一表项,以及将所述第一表项设置为有效。
在一种可能的实现方法中,所述接收设备从所述发送设备接收所述第一数据流的第二 数据报文,所述第二数据报文包括所述第二虚拟通道的标识。
在一种可能的实现方法中,所述接收设备确定所述第二虚拟通道的当前拥塞程度满足预设条件,则从所述第一虚拟通道组中为所述第一数据流选择第三虚拟通道;所述接收设备将所述第三虚拟通道更新至所述第一表项,所述第三虚拟通道与所述第二虚拟通道不同;若所述第一表项无效,则所述接收设备将所述第一表项设置为有效。基于该方案,可以动态更新流虚拟通道表中的数据流对应的虚拟通道,有助于为该数据流选择出拥塞程度低的虚拟通道。
在一种可能的实现方法中,所述接收设备确定所述第二虚拟通道的当前拥塞程度满足预设条件,包括:所述接收设备确定所述第二虚拟通道的拥塞程度高于第一拥塞程度阈值;或者,所述接收设备确定向所述发送设备发送的反压报文的次数大于反压次数阈值,所述反压报文用于指示所述第二虚拟通道的拥塞程度高于第二拥塞程度阈值。
第二方面,本申请提供一种数据流的虚拟通道的设置方法,包括:发送设备向接收设备发送第一数据流的第一数据报文,所述第一数据报文包括所述第一数据流对应的第一虚拟通道的标识;所述发送设备从所述接收设备接收应答报文,所述应答报文包括第二虚拟通道,所述第二虚拟通道为所述第一数据流对应的第一虚拟通道组中的一个虚拟通道,所述第二虚拟通道与所述第一虚拟通道不同;所述发送设备将所述第一数据流对应的虚拟通道,更新为所述第二虚拟通道。基于该方案,接收设备动态地为第一数据流分配当前拥塞程度较低的虚拟通道,因而发送设备在发送该第一数据流时,可以降低虚拟通道发生拥塞的可能性,使得第一数据流可以快速被发送至接收设备。
在一种可能的实现方法中,所述第二虚拟通道为第二虚拟通道组中的一个虚拟通道,所述第二虚拟通道组包括所述第一虚拟通道组中的拥塞程度满足预设条件的一个或多个虚拟通道。
在一种可能的实现方法中,所述第二虚拟通道组中包括至少一个虚拟通道,所述第二虚拟通道为所述第二虚拟通道组中的任一虚拟通道。
在一种可能的实现方法中,所述第二虚拟通道为所述第一虚拟通道组中的拥塞程度最低的一个虚拟通道。
在一种可能的实现方法中,所述第一数据流为第一业务类型的数据流,所述第一虚拟通道组中的虚拟通道为所述第一业务类型的数据流对应的虚拟通道组中的虚拟通道,所述第一虚拟通道组中的至少一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的至少一个虚拟通道不同,所述第一业务类型与所述第二业务类型不同。
在一种可能的实现方法中,所述第一数据报文为满足预设条件的数据报文。
在一种可能的实现方法中,所述发送设备将所述第一数据流的虚拟通道,更新为所述第二虚拟通道之后,所述发送设备向所述接收设备发送所述第一数据流的第二数据报文,所述第二数据报文包括所述第二虚拟通道的标识。
第三方面,本申请提供一种数据流的虚拟通道的设置装置,该装置可以是接收设备,还可以是用于接收设备的芯片。该装置具有实现上述第一方面的各实施例的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第四方面,本申请提供一种数据流的虚拟通道的设置装置,该装置可以是发送设备,还可以是用于发送设备的芯片。该装置具有实现上述第二方面的各实施例的功能。该功能 可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第五方面,本申请提供一种数据流的虚拟通道的设置装置,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该装置执行如上述各方面所述的方法。
第六方面,本申请提供一种数据流的虚拟通道的设置装置,包括:包括用于执行上述各方面的各个步骤的单元或手段(means)。
第七方面,本申请提供一种数据流的虚拟通道的设置装置,包括处理器和接口电路,所述处理器用于通过接口电路与其它装置通信,并执行上述各方面所述的方法。该处理器包括一个或多个。
第八方面,本申请提供一种数据流的虚拟通道的设置装置,包括处理器,用于与存储器相连,用于调用所述存储器中存储的程序,以执行上述各方面所述的方法。该存储器可以位于该装置之内,也可以位于该装置之外。且该处理器包括一个或多个。
第九方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得处理器执行上述各方面所述的方法。
第十方面,本申请还提供一种包括指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
第十一方面,本申请还提供一种芯片系统,包括:处理器,用于执行上述各方面所述的方法。
第十二方面,本申请还提供一种通信系统,包括:用于执行上述第一方面任意所述的方法的接收设备和用于执行上述第二方面任意所述的方法的发送设备。
图1为现有技术基于虚拟通道的流量控制示意图;
图2为本申请适用的网络架构示意图;
图3为本申请提供的一种数据流的虚拟通道的设置方法流程示意图;
图4为本申请提供的又一种数据流的虚拟通道的设置方法流程示意图;
图5为本申请提供的一种数据流的虚拟通道的设置装置示意图;
图6为本申请提供的又一种数据流的虚拟通道的设置装置示意图;
图7为本申请提供的又一种数据流的虚拟通道的设置装置示意图。
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述。方法实施例中的具体操作方法也可以应用于装置实施例或系统实施例中。其中,在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。
如图2所示,为本申请适用的网络架构示意图。该网络架构包括发送设备和接收设备。本申请中的发送设备和接收设备可以数据中心网络(如高性能计算、高性能分布式存储、大数据、人工智能等)里的服务器或网卡,也可以是交换机或其他设备形态。
作为一个示例,比如存在一条链路:设备1->设备2->设备3->设备4,即设备1发送 数据流至设备4,这里的设备1即为数据流的发起者或数据流的源端,该设备1比如可以是服务器等,这里的设备4即为数据流的接受者或数据流的目的端,该设备4比如可以是服务器等,这里的设备2和设备3即为数据流的转发者,该设备2和设备3比如可以是交换机或网卡等。其中,该链路上相邻两个设备之间的通道可以是虚拟通道或物理通道。
基于该示例,在一个实施例中,本申请图2所示的发送设备可以是该设备1,接收设备可以是设备2、或设备3、或设备4,即发送设备始终是源端,接收设备可以是链路中除源端之外的任意节点的设备。
基于该示例,在又一个实施例中,本申请图2所示的发送设备可以是该设备1,接收设备可以是设备4,即发送设备始终是源端,接收设备始终是目的端。
基于该示例,在又一个实施例中,本申请图2所示的发送设备可以是该设备1,接收设备可以是设备2;或者,发送设备可以是该设备2,接收设备可以是设备3;或者,发送设备可以是该设备3,接收设备可以是设备4。即发送设备和接收设备始终是链路上相邻的两个设备。
需要说明的是,上述示例仅仅是作为说明,其并不构成对本申请范围的限定。
为便于理解本申请方案,下面对本申请中涉及到的一些名词或术语进行解释说明。
一、缓存队列、虚拟通道
本申请中,发送设备和接收设备之间存在N个虚拟通道,N大于1,发送设备上存在N个缓存队列,发送设备上的每个缓存对应一个虚拟通道,接收设备上也存在N个缓存队列,接收设备上的每个缓存对应一个虚拟通道。即发送设备的N个缓存队列、接收设备上的N个缓存队列以及N个虚拟通道,三者之间存在一一对应关系。
其中,虚拟通道可以是由物理通道虚拟出来的,一个物理通道可以虚拟成多个虚拟通道。
以图1为例,则发送设备和接收设备之间存在8个虚拟通道,发送设备上存在8个缓存队列,接收设备上存在8个缓存队列。则存在以下对应关系:
发送设备上的缓存队列1的数据流,通过虚拟通道1,发送至接收设备的缓存队列1;
发送设备上的缓存队列2的数据流,通过虚拟通道2,发送至接收设备的缓存队列2;
发送设备上的缓存队列3的数据流,通过虚拟通道3,发送至接收设备的缓存队列3;
发送设备上的缓存队列4的数据流,通过虚拟通道4,发送至接收设备的缓存队列4;
发送设备上的缓存队列5的数据流,通过虚拟通道5,发送至接收设备的缓存队列5;
发送设备上的缓存队列6的数据流,通过虚拟通道6,发送至接收设备的缓存队列6;
发送设备上的缓存队列7的数据流,通过虚拟通道7,发送至接收设备的缓存队列7;
发送设备上的缓存队列8的数据流,通过虚拟通道8,发送至接收设备的缓存队列8。
本申请中,一个虚拟通道拥塞,指的是发送设备发送的数据流过快或过多,导致接收设备上的相应的缓存队列出现队满或即将队满的情形。因此,一个虚拟通道拥塞,也可以理解为接收上的相应的缓存队列拥塞。比如,以图1为例,虚拟通道7发生拥塞,也可以理解为接收设备上的缓存队列7发生拥塞。
作为一种实现方法,虚拟通道的拥塞程度可以使用该虚拟通道对应的接收设备上的缓存队列的拥塞程度来表示。并且,一个缓存队列的拥塞程度可以使用该缓存队列中缓存的数据报文的数量与缓存队列的存储容量(即可缓存的数据报文的总数量)的比值来表示。
二、数据流、数据类型和虚拟通道之间的对应关系
本申请中,数据流、数据类型和虚拟通道之间的对应关系可以通过以下方法1或方法2实现。
方法1、一个数据流对应一个或多个虚拟通道。
以图1为例,比如,针对数据流1,该数据流1对应4个虚拟通道(分别为虚拟通道1-虚拟通道4),因此发送设备可以将该数据流1的任意数据报文通过该4个虚拟通道中的任意一个发送至接收设备。再比如,针对数据流2,该数据流2对应3个虚拟通道(分别为虚拟通道1-虚拟通道3),因此发送设备可以将该数据流2的任意数据报文通过该3个虚拟通道中的任意一个发送至接收设备。再比如,针对数据流3,该数据流3对应3个虚拟通道(分别为虚拟通道3-虚拟通道5),因此发送设备可以将该数据流3的任意数据报文通过该3个虚拟通道中的任意一个发送至接收设备。
需要说明的是,上述数据流可以是相同业务类型的数据流,也可以是不同业务类型的数据流。比如,数据流1和数据流2是视频类型的数据流,数据流3是语音类型的数据流。可以看出,不同业务类型的数据流可以共享虚拟通道,比如视频类型的数据流2和语音类型的数据流3共享虚拟通道3。
并且,同样业务类型的数据流可以使用的虚拟通道也可以不完全相同,比如视频类型的数据流1不可以使用虚拟通道4,但视频类型的数据流2则可以使用虚拟通道4。
方法2、一个业务类型对应多个虚拟通道,一个业务类型的数据流对应该多个虚拟通道中的部分或全部虚拟通道,且不同业务类型的数据流分别对应的虚拟通道不同。
针对任意一个数据流(称为第一数据流),若该第一数据流为第一业务类型的数据流,则第一数据流对应的虚拟通道为第一业务类型的数据流对应的虚拟通道组中的部分或全部虚拟通道,并且,第一数据流对应的虚拟通道中的至少一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的至少一个虚拟通道不同,该第一业务类型与第二业务类型不同。可选的,第一数据流对应的虚拟通道中的任意一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的虚拟通道均不同。
下面以第一数据流对应的虚拟通道中的任意一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的虚拟通道均不同为例进行举例说明。
以图1为例,比如,视频业务类型对应虚拟通道1-虚拟通道4,语音业务类型对应虚拟通道5-虚拟通道7,即视频业务类型对应的虚拟通道与语音业务类型对应的虚拟通道之间没有交集。
针对视频业务类型的数据流,则该数据流对应的虚拟通道为虚拟通道1-虚拟通道4中的部分或全部虚拟通道。比如,针对视频业务类型的数据流1,对应的虚拟通道为虚拟通道1-虚拟通道3,表明发送设备可以将数据流1的任意数据报文可以通过这3个虚拟通道中的任意一个发送至接收设备。再比如,针对视频业务类型的数据流2,对应的虚拟通道为虚拟通道1-虚拟通道4,表明发送设备可以将数据流2的任意数据报文可以通过这4个虚拟通道中的任意一个发送至接收设备。
针对语音业务类型的数据流,则该数据流对应的虚拟通道为虚拟通道5-虚拟通道7中的部分或全部虚拟通道。比如,针对语音业务类型的数据流3,对应的虚拟通道为虚拟通道5-虚拟通道6,表明发送设备可以将数据流3的任意数据报文可以通过这2个虚拟通道中的任意一个发送至接收设备。再比如,针对语音业务类型的数据流4,对应的虚拟通道为虚拟通道5-虚拟通道7,表明发送设备可以将数据流4的任意数据报文可以通过这3个 虚拟通道中的任意一个发送至接收设备。
作为一种实现方法,同一个业务类型对应的所有虚拟通道均设置为相同的优先级,不同的业务类型对应的虚拟通道之间的优先级设置为不同。比如,针对视频业务类型对应的所有虚拟通道均设置为优先级1,则视频业务类型的数据流之间的优先级相同,即均为1;再比如,针对语音业务类型对应的所有虚拟通道均设置为优先级2,则语音业务类型的数据流之间的优先级相同,即均为2。
需要说明的是,不管是上述方法1还是方法2,本申请中,一个数据流可以对应一个或多个虚拟通道。
三、第一虚拟通道组、第二虚拟通道组
本申请中,将任意一个数据流(本申请称为第一数据流)对应的所有虚拟通道构成的集合称为第一虚拟通道组。比如,针对数据流1,若其对应的所有虚拟通道为虚拟通道1-虚拟通道4时,则数据流1对应的第一虚拟通道组包括:{虚拟通道1、虚拟通道2、虚拟通道3、虚拟通道4}。本申请中,一个数据流对应的第一虚拟通道组,指的是该数据流对应的所有可以使用的虚拟通道的集合。
本申请中,将任意一个数据流对应的第一虚拟通道组中的拥塞程度满足预设条件的一个或多个虚拟通道构成的集合称为第二虚拟通道组。
比如,这里的预设条件可以是拥塞程度最低,即将第一虚拟通道组中的拥塞程度最低的一个或多个虚拟通道构成的集合称为第二虚拟通道组。比如,针对数据流1,若其对应的第一虚拟通道组包括:{虚拟通道1、虚拟通道2、虚拟通道3、虚拟通道4},且预设第二虚拟通道组包括的虚拟通道的数量等于2,若虚拟通道3、虚拟通道4是第一虚拟通道组中拥塞程度最低的两个虚拟通道,则第二虚拟通道组包括:{虚拟通道3、虚拟通道4}。
再比如,这里的预设条件还可以是拥塞程度小于预设阈值,即将第一虚拟通道组中的拥塞程度小于预设阈值的一个或多个虚拟通道构成的集合称为第二虚拟通道组。
再比如,这里的预设条件还可以是拥塞程度小于预设阈值且拥塞程度不是最小,即将第一虚拟通道组中的拥塞程度小于预设阈值且拥塞程度不是最小的一个或多个虚拟通道构成的集合称为第二虚拟通道组。该方法将拥塞程度最小的虚拟通道排除在第二虚拟通道组之外,是考虑到可以将该拥塞程度最小的虚拟通道留作其他用途,比如用作特定数据流的发送。
需要说明的是,该第二虚拟通道组是可以动态更新的,比如可以周期性的更新。具体的,接收设备可以根据第一虚拟通道组中的虚拟通道的当前拥塞程度,更新第二虚拟通道组。即,第一虚拟通道组中的虚拟通道的拥塞程度是实时变化的,因此接收设备可以在周期到达时,基于第一虚拟通道组中的虚拟通道的当前拥塞程度,更新第二虚拟通道组。
下面对本申请提出的数据流的虚拟通道的设置方法进行介绍说明,以用于解决背景技术中提到的现有技术所存在的缺陷。
如图3所示,为本申请提供的一种数据流的虚拟通道的设置方法流程示意图。该实施例是针对任意一个数据流(称为第一数据流)进行说明的,该第一数据流对应第一虚拟通道组,该第一虚拟通道组包括至少两个虚拟通道,分别为第一虚拟通道和第二虚拟通道,第二虚拟通道与所述第一虚拟通道不同。该第一数据流对应的第二虚拟通道组是第一虚拟通道组的子集或真子集。
该方法包括以下步骤:
步骤301,发送设备向接收设备发送第一数据流的第一数据报文。相应地,接收设备可以接收到该第一数据流的第一数据报文。
该第一数据报文为第一数据流的任意一个数据报文,具体的,可以是该第一数据流的第一个数据报文,也可以是后续数据报文。
该第一数据报文包括该第一数据流对应的第一虚拟通道的标识。该第一虚拟通道指的是该第一数据流当前使用的虚拟通道。
步骤303,接收设备从第一数据流对应的第一虚拟通道组中,为第一数据流选择第二虚拟通道。
下面给出为第一数据流选择第二虚拟通道的不同实现方法。
方法1、将第一虚拟通道组中的拥塞程度最低的虚拟通道,作为选择的第二虚拟通道。
方法2、将第二虚拟通道组中的拥塞程度最低的虚拟通道,作为选择的第二虚拟通道。
方法3、将第二虚拟通道组中的任一虚拟通道,作为选择的第二虚拟通道。
由于第二虚拟通道组内的虚拟通道均为拥塞程度相对较轻的虚拟通道,因此直接从该第二虚拟通道组内选择任意一个虚拟通道作为第二虚拟通道,可以使得实现起来更为简便。
方法4、根据第一数据流的标识(比如可以是五元组信息)和第二虚拟通道组,为该第一数据流选择上述第二虚拟通道。
该方法是针对同时为多个数据流选择第二虚拟通道的方法。比如,接收设备同时需要为多个不同的数据流(这些数据流可以是同一个业务类型的数据流,也可以是不同业务类型的数据流)分别选择第二虚拟通道,则接收设备可以根据数据流的标识和第二虚拟通道组,将这些数据流分配至第二虚拟通道组内的不同的虚拟通道,以实现均匀分配,避免将多个数据流对应的第二虚拟通道同时分配到某个或某些虚拟通道,而造成某个或某些虚拟通道拥塞。
下面结合具体示例,对上述方法1-方法4进行说明。
比如,以图1为例,第一数据流对应的第一虚拟通道组包括:{虚拟通道1、虚拟通道2、虚拟通道3、虚拟通道4},其中,虚拟通道1的拥塞程度>虚拟通道2的拥塞程度>虚拟通道3的拥塞程度>虚拟通道4的拥塞程度,第二虚拟通道组包括:{虚拟通道3、虚拟通道4}。
该步骤303中,若基于上述方法1,则接收设备是从第一虚拟通道组中选择第二虚拟通道,即从虚拟通道1、虚拟通道2、虚拟通道3、虚拟通道4中选择拥塞程度最低的虚拟通道4,作为第二虚拟通道,即第二虚拟通道为虚拟通道4。
该步骤303中,若基于上述方法2,则接收设备是从第二虚拟通道组中选择第二虚拟通道,即从虚拟通道3、虚拟通道4中选择拥塞程度最低的虚拟通道4,作为第二虚拟通道,即第二虚拟通道为虚拟通道4。
该步骤303中,若基于上述方法3,则接收设备是从第二虚拟通道组中选择任意一个虚拟通道,即从虚拟通道3、虚拟通道4中选择任意一个虚拟通道,作为第二虚拟通道,因此第二虚拟通道为虚拟通道3或虚拟通道4。
该步骤303中,若基于上述方法4,若同时需要为两个数据流(分别称为第一数据流和第二数据流)选择第二虚拟通道,则接收设备根据第一数据流的标识和第一虚拟通道组,为第一数据流选择一个第二虚拟通道,以及根据第二数据流的标识和第一虚拟通道组,为 第二数据流选择一个第二虚拟通道。比如,可以通过哈希函数的方法进行选择,以使得为不同数据流选择的虚拟通道尽量分散。比如,接收设备为第一数据流选择的虚拟通道为虚拟通道3,为第二数据流选择的虚拟通道为虚拟通道4。
步骤305,接收设备向发送设备发送应答报文。相应地,发送设备可以接收到该应答报文。
该应答报文包括上述第二虚拟通道的标识,该第二虚拟通道用于更新发送设备上的该第一数据流对应的虚拟通道。
步骤306,发送设备将第一数据流的虚拟通道,更新为第二虚拟通道。
具体的,发送设备将该第一数据流的虚拟通道从第一虚拟通道更新为第二虚拟通道。
通过上述实施例,接收设备动态地为第一数据流分配当前拥塞程度较低的虚拟通道,因而发送设备在发送该第一数据流时,可以降低虚拟通道发生拥塞的可能性,使得第一数据流可以快速被发送至接收设备。
可选的,该步骤306之后,还包括以下步骤307。
步骤307,发送设备向接收设备发送该第一数据流的第二数据报文。相应地,接收设备可以接收到该第一数据流的第二数据报文。
该第二数据报文包括第二虚拟通道的标识。因此,接收设备将该第一数据流的后续数据报文缓存至第二虚拟通道对应的缓存队列。
需要说明的是,该第二数据报文可以是第一数据报文之后的第一个数据报文,也可以是该第一数据报文之后间隔多个数据报文的一个数据报文,这是因为发送设备可能一次性连续发送第一数据流的多个数据报文(其中包括第一数据报文),每个数据报文均包括一个第一虚拟通道的标识,并且发送设备在更新虚拟通道之前,可能又发送了该第一数据流的多个数据报文,则这些数据报文包括的虚拟通道的标识也是第一虚拟通道的标识。
在一种可能的实现方法中,在上述步骤301之后步骤303之前,还包括以下步骤302。
步骤302,接收设备确定第一数据报文满足预设条件。
比如,这里的满足预设条件可以是第一数据报文为该第一数据流的第一个数据报文。即接收设备在接收到该第一数据流的第一个数据报文时,才执行上述为该第一数据流重新选择一个虚拟通道的方案。
再比如,这里的满足预设条件还可以是该第一数据报文为该第一数据流的第K个报文,K为预设的大于1的整数。比如,当K预设为100时,表示接收设备在接收到该第一数据流的第100个数据报文时,触发执行上述为该第一数据流重新选择一个虚拟通道的方案。基于该方案,当第一数据流的数据报文的数量较多,即达到K个时,接收设备认为有必要为第一数据流选择一个拥塞程度较低的虚拟通道,因而触发执行上述虚拟通道的选择流程。
在一种可能的实现方法中,在上述步骤303之后步骤305之前(此时可以包括步骤302,也可以不包括步骤302),还可以包括以下步骤304。
步骤304,接收设备确定第二虚拟通道与第一虚拟通道不同。
即接收设备在确定第二虚拟通道与第一虚拟通道不同时,才会在应答报文中携带第二虚拟通道的标识,否则上述步骤305的应答报文为一个普通的应答报文,其不携带第二虚拟通道的标识,因此发送设备也不需要执行步骤306,相应地,步骤307的第二数据报文中仍然携带第一虚拟通道的标识。
下面结合图4,给出一种具体的实现方法。如图4所示,为本申请提供的又一种数据流的虚拟通道的设置方法流程示意图。
其中,在接收设备内维护一个流虚拟通道表,该流虚拟通道表包括一个或多个表项,一个表项对应一个数据流,不同的表项对应不同的数据流。一个表项至少包括三个字段:数据流的标识、数据流的虚拟通道和表项是否有效。初始状态时,将该虚拟通道表中每个表项均设置为无效,即将每个表项中的“表项是否有效”的字段设置为“无效”,以及,将每个表项中的“数据流的虚拟通道”的字段设置为空或其他无效信息。
即,以任意一个数据流(称为第一数据流)为例,则初始状态下,该流虚拟通道表包括该第一数据流的标识、且第一数据流对应的虚拟通道设置为空或其他无效信息,第一数据流对应的表项无效,即第一数据流对应的虚拟通道不能被用于更新第一数据流的虚拟通道。
如表1所示,为流虚拟通道表的初始状态。
表1流虚拟通道表的初始状态
数据流(flow)的标识 | 数据流的虚拟通道 | 表项是否有效 |
flow ID1 | 空 | 无效 |
flow ID2 | 空 | 无效 |
flow ID3 | 空 | 无效 |
…… | …… | …… |
flow IDn | 空 | 无效 |
该方法包括以下步骤:
步骤401,接收设备接收到第一数据流的第一数据报文,并判断接收到的第一数据流的第一数据报文是否为该第一数据流的第一个数据报文。若是,则转到步骤402,若否,则转到步骤403。
其中,这里的第一数据流的第一数据报文中包括第一虚拟通道的标识,该第一虚拟通道即为该数据流的当前使用的虚拟通道。
该实施例中,以第一数据流的第一数据报文满足预设条件为:该第一数据报文为该第一数据流的第一个数据报文为例进行说明的。
步骤402,接收设备为该第一数据流选择一个新的虚拟通道(称为第二虚拟通道),设置到流虚拟通道表中。
由于该第一数据报文是该第一数据流的第一个数据报文,该第一数据报文中携带的第一虚拟通道是该第一数据流对应的初始虚拟通道,例如预配置各个数据流对应的初始虚拟通道均为虚拟通道X(比如X=1等),则该第一个数据报文携带的虚拟通道即为虚拟通道X的标识。
当接收设备确定该第一数据报文是该第一数据流的第一个数据报文后,则为该第一数据流重新选择一个新的虚拟通道(即第二虚拟通道)。其选择新的虚拟通道的具体方法可以参考图3实施例的描述(即图3中选择第二虚拟通道的具体方法)。
比如,针对数据流1(flow ID1指示的数据流),初始虚拟通道是虚拟通道X(该虚拟 通道可以称为第一虚拟通道),步骤402中选择的新的虚拟通道为虚拟通道A(比如A=3),则接收设备将该虚拟通道A(也称为第二虚拟通道)更新至流虚拟通道表中与该数据流1对应的表项,以及将所述表项设置为有效。
基于表1,则对表1进行更新,得到表2,该表2为更新数据流1对应的表项后的流虚拟通道表。
表2更新数据流1对应的表项后的流虚拟通道表
数据流(flow)的标识 | 数据流的虚拟通道 | 表项是否有效 |
flow ID1 | A | 有效 |
flow ID2 | 空 | 无效 |
flow ID3 | 空 | 无效 |
…… | …… | …… |
flow IDn | 空 | 无效 |
同样的,若有其他数据流的第一个数据报文也到达接收设备,则接收设备也可以对流虚拟通道表中的其他数据流的表项进行相应更新。比如,表3为对数据流1和数据流2分别对应的表项进行更新,得到的更新后的流虚拟通道表,其中,数据流2的虚拟通道更新为虚拟通道B(比如B=5)。
表3更新数据流1和数据流2分别对应的表项后的流虚拟通道表
数据流(flow)的标识 | 数据流的虚拟通道 | 表项是否有效 |
flow ID1 | A | 有效 |
flow ID2 | B | 有效 |
flow ID3 | 空 | 无效 |
…… | …… | …… |
flow IDn | 空 | 无效 |
步骤403,接收设备判断流虚拟通道表中与该第一数据流对应的表项是否有效。若有效,则转到步骤404;若无效,则转到步骤408。
具体的,若接收设备确定流虚拟通道表中与该第一数据流对应的表项有效,则从该流虚拟通道表中获取该第一数据流对应的虚拟通道(即第二虚拟通道),并转到步骤404。若接收设备确定流虚拟通道表中与该第一数据流对应的表项无效,则转到步骤408。
当步骤403中确定接收到的第一数据报文是第一数据流的第一个数据报文时,则会执行步骤402,因此该第一数据流在流虚拟通道中对应的表项一定是有效的,因而会转到执行步骤404。
当步骤403中确定接收到的第一数据报文不是第一数据流的第一个数据报文时,则不会执行步骤402,而是跳过步骤402执行步骤403,此时,该流虚拟通道表中与该第一数据流对应的表项可能是有效的,也可能是无效的。
步骤404,接收设备判断第一数据报文中的第一虚拟通道与流虚拟通道表中与第一数据流对应的表项的虚拟通道是否相同。若不相同,则转到步骤405;若相同,则转到步骤407。
接收设备从流虚拟通道表中获取与第一数据流对应的表项(即第一表项)对应的虚拟通道的标识,即第二虚拟通道的标识,然后将该第二虚拟通道与第一虚拟通道进行比较。
针对第一数据流的第一个数据报文,以数据流1的第一个数据报文为例,则流虚拟通道表中与数据流1对应的表项是有效的(参见表2或表3),并且,若接收到的第一个数据报文中的虚拟通道与流虚拟通道表中与该数据流1对应的表项中的虚拟通道不同,则转到执行步骤405。当然,针对第一个数据报文,也有可能在上述步骤402中为该第一数据流重新选择的虚拟通道正好是与该第一数据流的初始虚拟通道相同(即选择的第二虚拟通道与第一虚拟通道相同),则此时在步骤404之后转到步骤407。
步骤405,接收设备向发送设备发送应答报文,该应答报文携带第二虚拟通道的标识。
比如针对上述第一数据流的第一个数据报文,接收设备在发送针对该第一个数据报文的应答报文中携带第二虚拟通道的标识。当然,针对第一数据流的非第一个数据报文,若接收设备也选择了第二虚拟通道,则该应答报文中也携带第二虚拟通道的标识。
步骤406,发送设备将第一数据流对应的虚拟通道更新为第二虚拟通道。
步骤407,接收设备将流虚拟通道表中与该第一数据流对应的表项设置为无效。
下面分不同情形,介绍什么情况下会执行步骤407,以及执行步骤407之后带来的效果。
情形1,接收设备接收到第一数据流的第一个数据报文,且选择的第二虚拟通道与第一虚拟通道相同。
该情形下,相当于该第一数据流的虚拟通道已经是一个较优的虚拟通道,因此不需要更新,或者理解为该第一数据流的虚拟通道保持不变,即完成了该第一数据流所使用的虚拟通道的确认,因此将流虚拟通道表中与该第一数据流对应的表项设置为无效,即后续不再需要为该第一数据流选择虚拟通道。
情形2,接收设备接收到第一数据流的第一个数据报文,且选择的第二虚拟通道与第一虚拟通道不同。
该情形下,将会执行步骤405,即接收设备通过应答报文通知发送设备更新虚拟通道,具体的,又分为以下两种情形。
情形2.1,发送设备接收到该应答报文并获取到该应答报文中的新的虚拟通道的标识(即第二虚拟通道的标识),完成了虚拟通道的更新(即从第一虚拟通道更新为第二虚拟通道)。
该情形下,发送设备在发送该第一数据流的后续数据报文(称为第二数据报文),该第二数据报文将携带第二虚拟通道的标识,此时流虚拟通道表中与该第一数据流对应的表项仍然有效,因此针对该第二数据报文,将会执行步骤401、步骤403以及步骤404,且在步骤404之后执行步骤407。
情形2.2,发送设备未接收到该应答报文或者未能正确解析该应答报文,因而未能完成虚拟通道的更新(即保持虚拟通道为第一虚拟通道)。
该情形下,发送设备在发送该第一数据流的后续数据报文(称为第二数据报文),该第二数据报文将仍然携带更新前的虚拟通道的标识(即第一虚拟通道的标识),此时流虚 拟通道表中与该第一数据流对应的表项仍然有效,因此针对该第二数据报文,将会执行步骤401、步骤403以及步骤404,且在步骤404之后执行步骤405。
从上述分析可以看出,只有当发送设备的初始虚拟通道与接收设备选择的虚拟通道相同,或者是发送设备根据接收设备分配的新的虚拟通道进行更新后,接收设备才会执行上述步骤407,因而每个数据流的虚拟通道只会更新一次,并且该虚拟通道是接收设备所认为的一个较优的虚拟通道,因而实现了为数据流分配合适的虚拟通道。
作为一种实现方法,流虚拟通道表中的第一数据流的虚拟通道也可以是动态更新的。比如,流虚拟通道中,第一数据流当前对应的虚拟通道为第二虚拟通道,则接收设备在确定第二虚拟通道的当前拥塞程度满足预设条件时,则从第一数据流对应的第一虚拟通道组中,为该第一数据流选择一个新的虚拟通道(称为第三虚拟通道),并将该第三虚拟通道更新至流虚拟通道表中与该第一数据流对应的表项,第三虚拟通道与第二虚拟通道不同,该第三虚拟通道的拥塞程度低于或等于该第二虚拟通道的拥塞程度。
其中,接收设备确定第一数据流的当前拥塞程度满足预设条件,包括:
方法1,接收设备确定该第二虚拟通道的拥塞程度高于第一拥塞程度阈值。
即只要第二虚拟通道的拥塞程度高于预设的第一拥塞程度阈值,则认为该虚拟通道已经比较拥塞,则可以该第一数据流重新选择一个虚拟通道。
其中,一个虚拟通道的拥塞程度可以用接收设备上的该虚拟通道对应的缓存队列的拥塞程度表示。
方法2,接收设备确定向发送设备发送的反压报文的次数大于反压次数阈值,该反压报文用于指示第二虚拟通道的拥塞程度高于第二拥塞程度阈值。
该方法中,每当接收设备确定第一数据流的对应的虚拟通道的拥塞程度高于预设的第二拥塞程度阈值时,则会向发送设备发送一个反压报文(比如一个反压帧或pause帧),用于通知发送设备该第二虚拟通道当前较为拥塞。当接收设备发送反压报文的次数大于预设的反压次数阈值时,则触发接收设备为该第一数据流重新选择一个新的虚拟通道(即第三虚拟通道),并更新至流虚拟通道中。作为一种实现方法,这里的反压报文的次数指的是在预设时长内统计到的反压报文的次数,即方法2可以理解为:接收设备确定向发送设备发送的反压报文的次数大于反压次数阈值,该反压报文用于指示第二虚拟通道的拥塞程度高于第二拥塞程度阈值。
基于上述实现方法,接收设备可以在接收到一个数据流的第一个数据报文时,设置流虚拟通道表中与该数据流对应的表项,也可以是在该数据流的虚拟通道更新周期到达时,为该数据流重新选择一个新的虚拟通道,然后将该新的虚拟通道更新至流虚拟通道表中与该数据流对应的表项,当然,若该数据流在流虚拟通道表中的虚拟通道与选择的新的虚拟通道相同,则无需更新。此外,需要说明的是,若在更新流虚拟通道表,发现字段“数据流的虚拟通道”当前设置为“无效”,则还需要将该字段设置为“有效”。
通过该方法,可以实现为一个数据流多次更新虚拟通道,有助于保证该数据流的虚拟通道始终处于较优状态(即虚拟通道的拥塞程度较低)。
步骤408,接收设备向发送设备发送普通的应答报文。相应地,发送设备可以接收到该应答报文。
该普通的应答报文即为不包括新的虚拟通道的报文。
通过上述实施例,通过使用一个流虚拟通道表,实现了为一个或多个数据流分配并更 新虚拟通道,从而实现了为不同的数据流分配相对较优的虚拟通道。
需要说明的是,接收设备可以一次对一个数据流按照图4实施例进行虚拟通道的设置,也可以一次对多个数据流按照图4实施例进行虚拟通道的设置。并且,接收设备可以在接收到一个数据流的第一个数据报文时,实施对该数据流的虚拟通道的更新,也可以是在接收到该数据流的后续数据报文时,完成对该数据流的虚拟通道的更新。
本申请实施例,在接收设备首次收到数据流的数据报文时基于数据流来分配虚拟通道,可以很好地解决虚拟通道流量大造成的拥塞问题。另外,在后续收发数据报文过程中,接收设备还可以根据数据流的反压情况和当前的虚拟通道的状态动态更新流虚拟通道表,在流量模型发生变化时依然可以很好地预防和缓解虚拟通道流量大造成的拥塞问题。因此,本申请方法可以实现基于数据流来分配虚拟通道和动态修改数据流的虚拟通道,相比于背景技术方案,能够更充分利用网络资源,可以很好地预防和缓解虚拟通道流量大造成的拥塞问题。
上述主要从各个网元之间交互的角度对本申请提供的方案进行了介绍。可以理解的是,上述实现各网元为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
如图5所示,为本申请所涉及的数据流的虚拟通道的设置装置的一种可能的示例性框图,该装置500可以以软件或硬件的形式存在。装置500可以包括:处理单元502和通信单元503。作为一种实现方式,该通信单元503可以包括接收单元和发送单元。处理单元502用于对装置500的动作进行控制管理。通信单元503用于支持装置500与其他网络实体的通信。装置500还可以包括存储单元501,用于存储装置500的程序代码和数据。
其中,处理单元502可以是处理器或控制器,例如可以是通用中央处理器(central processing unit,CPU),通用处理器,数字信号处理(digital signal processing,DSP),专用集成电路(application specific integrated circuits,ASIC),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。存储单元501可以是存储器。通信单元503是一种该装置的接口电路,用于从其它装置接收信号。例如,当该装置以芯片的方式实现时,该通信单元503是该芯片用于从其它芯片或装置接收信号的接口电路,或者,是该芯片用于向其它芯片或装置发送信号的接口电路。
该装置500可以为上述任一实施例中的接收设备,还可以为用于接收设备的芯片。例如,当装置500为接收设备时,该处理单元502例如可以是处理器,该通信单元503例如可以是收发器。可选的,该收发器可以包括射频电路,该存储单元例如可以是存储器。例如,当装置500为用于接收设备的芯片时,该处理单元502例如可以是处理器,该通信单元503例如可以是输入/输出接口、管脚或电路等。该处理单元502可执行存储单元存储的计算机执行指令,可选地,该存储单元为该芯片内的存储单元,如寄存器、缓存等,该存 储单元还可以是该接收设备内的位于该芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。
在一个实施例中,该装置500为接收设备,其中通信单元503包括发送单元和接收单元。接收单元,用于从发送设备接收第一数据流的第一数据报文,所述第一数据报文包括所述第一数据流对应的第一虚拟通道的标识;处理单元502,用于从所述第一数据流对应的第一虚拟通道组中,为所述第一数据流选择第二虚拟通道,所述第二虚拟通道与所述第一虚拟通道不同;发送单元,用于向所述发送设备发送应答报文,所述应答报文包括所述第二虚拟通道的标识,所述第二虚拟通道的标识用于所述发送设备更新所述第一数据流对应的虚拟通道。
在一种可能的实现方法中,所述第一数据报文包括所述第一数据流的标识;所述处理单元502,具体用于根据所述第一数据流的标识和所述第一虚拟通道组,为所述第一数据流选择所述第二虚拟通道。
在一种可能的实现方法中,所述处理单元502,具体用于:从第二虚拟通道组中,为所述第一数据流选择所述第二虚拟通道;其中,所述第二虚拟通道组包括所述第一虚拟通道组中的拥塞程度满足预设条件的一个或多个虚拟通道。
在一种可能的实现方法中,所述第二虚拟通道组中包括至少一个虚拟通道,所述第二虚拟通道为所述第二虚拟通道组中的任一虚拟通道。
在一种可能的实现方法中,所述处理单元502,还用于根据所述第一虚拟通道组中的虚拟通道的当前拥塞程度,更新所述第二虚拟通道组。
在一种可能的实现方法中,所述第二虚拟通道为所述第一虚拟通道组中的拥塞程度最低的一个虚拟通道。
在一种可能的实现方法中,所述第一数据流为第一业务类型的数据流,所述第一虚拟通道组中的虚拟通道为所述第一业务类型的数据流对应的虚拟通道组中的虚拟通道,所述第一虚拟通道组中的至少一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的至少一个虚拟通道不同,所述第一业务类型与所述第二业务类型不同。
在一种可能的实现方法中,所述装置内维护一个流虚拟通道表,所述流虚拟通道表包括至少一个表项,一个表项对应一条数据流,一个表项至少包括以下三个字段:数据流的标识、数据流的虚拟通道、表项是否有效;所述流虚拟通道表包括所述第一数据流对应的第一表项,所述第一表项对应的数据流的虚拟通道为所述第二虚拟通道;
所述处理单元502,还用于在所述发送单元向所述发送设备发送应答报文之前,确定所述第一数据流对应的所述第一表项有效;确定所述第一表项对应的数据流的虚拟通道与所述第一虚拟通道不同。
在一种可能的实现方法中,所述第一表项的初始状态为无效;所述处理单元502还用于:在确定所述第一数据流对应的所述第一表项有效,并从所述第一表项获取所述第二虚拟通道之前,确定所述第一数据报文满足预设条件;将所述第二虚拟通道更新至所述第一表项,以及将所述第一表项设置为有效。
在一种可能的实现方法中,所述接收单元,还用于从所述发送设备接收所述第一数据流的第二数据报文,所述第二数据报文包括所述第二虚拟通道的标识。
在一种可能的实现方法中,所述处理单元502,还用于:确定所述第二虚拟通道的当 前拥塞程度满足预设条件,则从所述第一虚拟通道组中为所述第一数据流选择第三虚拟通道;将所述第三虚拟通道更新至所述第一表项,所述第三虚拟通道与所述第二虚拟通道不同;若所述第一表项无效,则将所述第一表项设置为有效。
在一种可能的实现方法中,所述处理单元502,具体用于:确定所述第二虚拟通道的拥塞程度高于第一拥塞程度阈值;或者,确定向所述发送设备发送的反压报文的次数大于反压次数阈值,所述反压报文用于指示所述第二虚拟通道的拥塞程度高于第二拥塞程度阈值。
可以理解的是,该装置用于上述数据流的虚拟通道的设置方法时的具体实现过程以及相应的有益效果,可以参考前述方法实施例中的相关描述,这里不再赘述。
如图6所示,为本申请所涉及的数据流的虚拟通道的设置装置的一种可能的示例性框图,该装置600可以以软件或硬件的形式存在。装置600可以包括:处理单元602和通信单元603。作为一种实现方式,该通信单元603可以包括接收单元和发送单元。处理单元602用于对装置600的动作进行控制管理。通信单元603用于支持装置600与其他网络实体的通信。装置600还可以包括存储单元601,用于存储装置600的程序代码和数据。
其中,处理单元602可以是处理器或控制器,例如可以是CPU,通用处理器,DSP,ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。存储单元601可以是存储器。通信单元603是一种该装置的接口电路,用于从其它装置接收信号。例如,当该装置以芯片的方式实现时,该通信单元603是该芯片用于从其它芯片或装置接收信号的接口电路,或者,是该芯片用于向其它芯片或装置发送信号的接口电路。
该装置600可以为上述任一实施例中的发送设备,还可以为用于发送设备的芯片。例如,当装置600为发送设备时,该处理单元602例如可以是处理器,该通信单元603例如可以是收发器。可选的,该收发器可以包括射频电路,该存储单元例如可以是存储器。例如,当装置600为用于发送设备的芯片时,该处理单元602例如可以是处理器,该通信单元603例如可以是输入/输出接口、管脚或电路等。该处理单元602可执行存储单元存储的计算机执行指令,可选地,该存储单元为该芯片内的存储单元,如寄存器、缓存等,该存储单元还可以是该发送设备内的位于该芯片外部的存储单元,如ROM或可存储静态信息和指令的其他类型的静态存储设备,RAM等。
在一个实施例中,该装置600为发送设备,通信单元603包括发送单元和接收单元。发送单元,用于向接收设备发送第一数据流的第一数据报文,所述第一数据报文包括所述第一数据流对应的第一虚拟通道的标识;接收单元,用于从所述接收设备接收应答报文,所述应答报文包括第二虚拟通道的标识,所述第二虚拟通道为所述第一数据流对应的第一虚拟通道组中的一个虚拟通道,所述第二虚拟通道与所述第一虚拟通道不同;处理单元602,用于将所述第一数据流对应的虚拟通道,更新为所述第二虚拟通道。
在一种可能的实现方法中,所述第二虚拟通道为第二虚拟通道组中的一个虚拟通道,所述第二虚拟通道组包括所述第一虚拟通道组中的拥塞程度满足预设条件的一个或多个虚拟通道。
在一种可能的实现方法中,所述第二虚拟通道组中包括至少一个虚拟通道,所述第二虚拟通道为所述第二虚拟通道组中的任一虚拟通道。
在一种可能的实现方法中,所述第一数据流为第一业务类型的数据流,所述第一虚拟通道组中的虚拟通道为所述第一业务类型的数据流对应的虚拟通道组中的虚拟通道,所述第一虚拟通道组中的至少一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的至少一个虚拟通道不同,所述第一业务类型与所述第二业务类型不同。
在一种可能的实现方法中,所述第一数据报文为所述第一数据流的满足预设条件的数据报文。
在一种可能的实现方法中,所述发送单元,还用于在所述处理单元602将所述第一数据流的虚拟通道,更新为所述第二虚拟通道之后,向所述接收设备发送所述第一数据流的第二数据报文,所述第二数据报文包括所述第二虚拟通道的标识。
在一种可能的实现方法中,所述第二虚拟通道为所述第一虚拟通道组中的拥塞程度最低的一个虚拟通道。可以理解的是,该装置用于上述数据流的虚拟通道的设置方法时的具体实现过程以及相应的有益效果,可以参考前述方法实施例中的相关描述,这里不再赘述。
如图7所示,为本申请提供的一种数据流的虚拟通道的设置装置示意图,该装置可以是上述实施例中的接收设备、或发送设备。该装置700包括:处理器702、通信接口703、存储器701。可选的,装置700还可以包括通信线路704。其中,通信接口703、处理器702以及存储器701可以通过通信线路704相互连接;通信线路704可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。所述通信线路704可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
处理器702可以是一个CPU,微处理器,ASIC,或一个或多个用于控制本申请方案程序执行的集成电路。
通信接口703,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN),有线接入网等。
存储器701可以是ROM或可存储静态信息和指令的其他类型的静态存储设备,RAM或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路704与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器701用于存储执行本申请方案的计算机执行指令,并由处理器702来控制执行。处理器702用于执行存储器701中存储的计算机执行指令,从而实现本申请上述实施例提供的数据流的虚拟通道的设置方法。
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施 例对此不作具体限定。
本领域普通技术人员可以理解:本申请中涉及的第一、第二等各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围,也表示先后顺序。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。“至少一个”是指一个或者多个。至少两个是指两个或者多个。“至少一个”、“任意一个”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个、种),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。“多个”是指两个或两个以上,其它量词与之类似。此外,对于单数形式“a”,“an”和“the”出现的元素(element),除非上下文另有明确规定,否则其不意味着“一个或仅一个”,而是意味着“一个或多于一个”。例如,“a device”意味着对一个或多个这样的device。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。
本申请实施例中所描述的各种说明性的逻辑单元和电路可以通过通用处理器,数字信号处理器,专用集成电路(ASIC),现场可编程门阵列(FPGA)或其它可编程逻辑装置,离散门或晶体管逻辑,离散硬件部件,或上述任何组合的设计来实现或操作所描述的功能。通用处理器可以为微处理器,可选地,该通用处理器也可以为任何传统的处理器、控制器、微控制器或状态机。处理器也可以通过计算装置的组合来实现,例如数字信号处理器和微处理器,多个微处理器,一个或多个微处理器联合一个数字信号处理器核,或任何其它类似的配置来实现。
本申请实施例中所描述的方法或算法的步骤可以直接嵌入硬件、处理器执行的软件单元、或者这两者的结合。软件单元可以存储于RAM存储器、闪存、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、可移动磁盘、CD-ROM或本领域中其它任意形式的存储媒介中。示例性地,存储媒介可以与处理器连接,以使得处理器可以从存储媒介中读取信息,并可以向存储媒介存写信息。可选地,存储媒介还可以集成到处理器中。处理器和存储媒介可以设置于ASIC中。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方 框或多个方框中指定的功能的步骤。
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包括这些改动和变型在内。
Claims (30)
- 一种数据流的虚拟通道的设置方法,其特征在于,包括:接收设备从发送设备接收第一数据流的第一数据报文,所述第一数据报文包括所述第一数据流对应的第一虚拟通道的标识;所述接收设备从所述第一数据流对应的第一虚拟通道组中,为所述第一数据流选择第二虚拟通道,所述第二虚拟通道与所述第一虚拟通道不同;所述接收设备向所述发送设备发送应答报文,所述应答报文包括所述第二虚拟通道的标识,所述第二虚拟通道的标识用于所述发送设备更新所述第一数据流对应的虚拟通道。
- 如权利要求1所述的方法,其特征在于,所述接收设备从所述第一数据流对应的第一虚拟通道组中,为所述第一数据流选择第二虚拟通道,包括:所述接收设备从第二虚拟通道组中,为所述第一数据流选择所述第二虚拟通道;其中,所述第二虚拟通道组包括所述第一虚拟通道组中的拥塞程度满足预设条件的一个或多个虚拟通道。
- 如权利要求2所述的方法,其特征在于,所述第二虚拟通道组中包括至少一个虚拟通道,所述第二虚拟通道为所述第二虚拟通道组中的任一虚拟通道。
- 如权利要求2或3所述的方法,其特征在于,所述方法还包括:所述接收设备根据所述第一虚拟通道组中的虚拟通道的当前拥塞程度,更新所述第二虚拟通道组。
- 如权利要求1-4任一所述的方法,其特征在于,所述第一数据流为第一业务类型的数据流,所述第一虚拟通道组中的虚拟通道为所述第一业务类型的数据流对应的虚拟通道组中的虚拟通道,所述第一虚拟通道组中的至少一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的至少一个虚拟通道不同,所述第一业务类型与所述第二业务类型不同。
- 如权利要求1-5任一所述的方法,其特征在于,所述接收设备内维护一个流虚拟通道表,所述流虚拟通道表包括至少一个表项,一个表项对应一条数据流,一个表项至少包括以下三个字段:数据流的标识、数据流的虚拟通道、表项是否有效;所述流虚拟通道表包括所述第一数据流对应的第一表项,所述第一表项对应的数据流的虚拟通道为所述第二虚拟通道;所述接收设备向所述发送设备发送应答报文之前,还包括:所述接收设备确定所述第一数据流对应的所述第一表项有效;所述接收设备确定所述第一表项对应的数据流的虚拟通道与所述第一虚拟通道不同。
- 如权利要求6所述的方法,其特征在于,所述第一表项的初始状态为无效;所述接收设备确定所述第一数据流对应的所述第一表项有效,并从所述第一表项获取所述第二虚拟通道之前,还包括:所述接收设备确定所述第一数据报文满足预设条件;所述接收设备将所述第二虚拟通道更新至所述第一表项,以及将所述第一表项设置为有效。
- 如权利要求1-7任一所述的方法,其特征在于,所述方法还包括:所述接收设备从所述发送设备接收所述第一数据流的第二数据报文,所述第二数据报文包括所述第二虚拟通道的标识。
- 如权利要求6-8任一所述的方法,其特征在于,所述方法还包括:所述接收设备确定所述第二虚拟通道的当前拥塞程度满足预设条件,则从所述第一虚拟通道组中为所述第一数据流选择第三虚拟通道;所述接收设备将所述第三虚拟通道更新至所述第一表项,所述第三虚拟通道与所述第二虚拟通道不同;若所述第一表项无效,则所述接收设备将所述第一表项设置为有效。
- 一种数据流的虚拟通道的设置方法,其特征在于,包括:发送设备向接收设备发送第一数据流的第一数据报文,所述第一数据报文包括所述第一数据流对应的第一虚拟通道的标识;所述发送设备从所述接收设备接收应答报文,所述应答报文包括第二虚拟通道的标识,所述第二虚拟通道为所述第一数据流对应的第一虚拟通道组中的一个虚拟通道,所述第二虚拟通道与所述第一虚拟通道不同;所述发送设备将所述第一数据流对应的虚拟通道,更新为所述第二虚拟通道。
- 如权利要求10所述的方法,其特征在于,所述第二虚拟通道为第二虚拟通道组中的一个虚拟通道,所述第二虚拟通道组包括所述第一虚拟通道组中的拥塞程度满足预设条件的一个或多个虚拟通道。
- 如权利要求11所述的方法,其特征在于,所述第二虚拟通道组中包括至少一个虚拟通道,所述第二虚拟通道为所述第二虚拟通道组中的任一虚拟通道。
- 如权利要求10-12任一所述的方法,其特征在于,所述第一数据流为第一业务类型的数据流,所述第一虚拟通道组中的虚拟通道为所述第一业务类型的数据流对应的虚拟通道组中的虚拟通道,所述第一虚拟通道组中的至少一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的至少一个虚拟通道不同,所述第一业务类型与所述第二业务类型不同。
- 如权利要求10-13任一所述的方法,其特征在于,所述第一数据报文为所述第一数据流的满足预设条件的数据报文。
- 如权利要求10-14任一所述的方法,其特征在于,所述发送设备将所述第一数据流的虚拟通道,更新为所述第二虚拟通道之后,还包括:所述发送设备向所述接收设备发送所述第一数据流的第二数据报文,所述第二数据报文包括所述第二虚拟通道的标识。
- 一种数据流的虚拟通道的设置装置,其特征在于,包括:接收单元,用于从发送设备接收第一数据流的第一数据报文,所述第一数据报文包括所述第一数据流对应的第一虚拟通道的标识;处理单元,用于从所述第一数据流对应的第一虚拟通道组中,为所述第一数据流选择第二虚拟通道,所述第二虚拟通道与所述第一虚拟通道不同;发送单元,用于向所述发送设备发送应答报文,所述应答报文包括所述第二虚拟通道的标识,所述第二虚拟通道的标识用于所述发送设备更新所述第一数据流对应的虚拟通道。
- 如权利要求16所述的装置,其特征在于,所述处理单元,具体用于:从第二虚拟通道组中,为所述第一数据流选择所述第二虚拟通道;其中,所述第二虚拟通道组包括所述第一虚拟通道组中的拥塞程度满足预设条件的一个或多个虚拟通道。
- 如权利要求17所述的装置,其特征在于,所述第二虚拟通道组中包括至少一个虚拟通道,所述第二虚拟通道为所述第二虚拟通道组中的任一虚拟通道。
- 如权利要求17或18所述的装置,其特征在于,所述处理单元,还用于根据所述第一虚拟通道组中的虚拟通道的当前拥塞程度,更新所述第二虚拟通道组。
- 如权利要求16-19任一所述的装置,其特征在于,所述第一数据流为第一业务类型的数据流,所述第一虚拟通道组中的虚拟通道为所述第一业务类型的数据流对应的虚拟通道组中的虚拟通道,所述第一虚拟通道组中的至少一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的至少一个虚拟通道不同,所述第一业务类型与所述第二业务类型不同。
- 如权利要求16-20任一所述的装置,其特征在于,所述装置内维护一个流虚拟通道表,所述流虚拟通道表包括至少一个表项,一个表项对应一条数据流,一个表项至少包括以下三个字段:数据流的标识、数据流的虚拟通道、表项是否有效;所述流虚拟通道表包括所述第一数据流对应的第一表项,所述第一表项对应的数据流的虚拟通道为所述第二虚拟通道;所述处理单元,还用于在所述发送单元向所述发送设备发送应答报文之前,确定所述第一数据流对应的所述第一表项有效;确定所述第一表项对应的数据流的虚拟通道与所述第一虚拟通道不同。
- 如权利要求21所述的装置,其特征在于,所述第一表项的初始状态为无效;所述处理单元还用于:在确定所述第一数据流对应的所述第一表项有效,并从所述第一表项获取所述第二虚拟通道之前,确定所述第一数据报文满足预设条件;将所述第二虚拟通道更新至所述第一表项,以及将所述第一表项设置为有效。
- 如权利要求16-22任一所述的装置,其特征在于,所述接收单元,还用于从所述发送设备接收所述第一数据流的第二数据报文,所述第二数据报文包括所述第二虚拟通道的标识。
- 如权利要求21-23任一所述的装置,其特征在于,所述处理单元,还用于:确定所述第二虚拟通道的当前拥塞程度满足预设条件,则从所述第一虚拟通道组中为所述第一数据流选择第三虚拟通道;将所述第三虚拟通道更新至所述第一表项,所述第三虚拟通道与所述第二虚拟通道不同;若所述第一表项无效,则将所述第一表项设置为有效。
- 一种数据流的虚拟通道的设置装置,其特征在于,包括:发送单元,用于向接收设备发送第一数据流的第一数据报文,所述第一数据报文包括所述第一数据流对应的第一虚拟通道的标识;接收单元,用于从所述接收设备接收应答报文,所述应答报文包括第二虚拟通道的标识,所述第二虚拟通道为所述第一数据流对应的第一虚拟通道组中的一个虚拟通道,所述第二虚拟通道与所述第一虚拟通道不同;处理单元,用于将所述第一数据流对应的虚拟通道,更新为所述第二虚拟通道。
- 如权利要求25所述的装置,其特征在于,所述第二虚拟通道为第二虚拟通道组中的一个虚拟通道,所述第二虚拟通道组包括所述第一虚拟通道组中的拥塞程度满足预设条件的一个或多个虚拟通道。
- 如权利要求26所述的装置,其特征在于,所述第二虚拟通道组中包括至少一个虚拟通道,所述第二虚拟通道为所述第二虚拟通道组中的任一虚拟通道。
- 如权利要求25-27任一所述的装置,其特征在于,所述第一数据流为第一业务类型的数据流,所述第一虚拟通道组中的虚拟通道为所述第一业务类型的数据流对应的虚拟通道组中的虚拟通道,所述第一虚拟通道组中的至少一个虚拟通道与第二业务类型的数据流对应的虚拟通道组中的至少一个虚拟通道不同,所述第一业务类型与所述第二业务类型不同。
- 如权利要求25-28任一所述的装置,其特征在于,所述第一数据报文为所述第一数据流的满足预设条件的数据报文。
- 如权利要求25-29任一所述的装置,其特征在于,所述发送单元,还用于在所述处理单元将所述第一数据流的虚拟通道,更新为所述第二虚拟通道之后,向所述接收设备发送所述第一数据流的第二数据报文,所述第二数据报文包括所述第二虚拟通道的标识。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP20791875.6A EP3952234A4 (en) | 2019-04-17 | 2020-04-13 | METHOD AND DEVICE FOR ADJUSTING A VIRTUAL CHANNEL OF A DATA STREAM |
US17/498,756 US12028255B2 (en) | 2019-04-17 | 2021-10-12 | Virtual channel setting method and apparatus for data flow |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910309167.9A CN111835652B (zh) | 2019-04-17 | 2019-04-17 | 一种数据流的虚拟通道的设置方法及装置 |
CN201910309167.9 | 2019-04-17 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/498,756 Continuation US12028255B2 (en) | 2019-04-17 | 2021-10-12 | Virtual channel setting method and apparatus for data flow |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020211728A1 true WO2020211728A1 (zh) | 2020-10-22 |
Family
ID=72838037
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/084548 WO2020211728A1 (zh) | 2019-04-17 | 2020-04-13 | 一种数据流的虚拟通道的设置方法及装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US12028255B2 (zh) |
EP (1) | EP3952234A4 (zh) |
CN (1) | CN111835652B (zh) |
WO (1) | WO2020211728A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113992470A (zh) * | 2021-10-14 | 2022-01-28 | 上海艾为电子技术股份有限公司 | 数据发送方法和接收方法、主设备、从设备及电子设备 |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11750175B2 (en) * | 2020-09-18 | 2023-09-05 | International Business Machines Corporation | Multiplexing resonator induced phase gate drive signals |
CN115473851A (zh) * | 2021-05-25 | 2022-12-13 | 华为技术有限公司 | 数据流的处理方法、网络节点和系统 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103701710A (zh) * | 2013-12-20 | 2014-04-02 | 杭州华为数字技术有限公司 | 一种数据传输方法、核心转发设备以及端点转发设备 |
CN103746927A (zh) * | 2013-12-27 | 2014-04-23 | 杭州华为数字技术有限公司 | 基于优先级的流控pfc方法及发送设备、接收设备 |
CN103907321A (zh) * | 2011-11-15 | 2014-07-02 | 甲骨文国际公司 | 在胖树拓扑中利用虚拟通道的动态分配减轻拥挤的系统和方法 |
US20150304691A1 (en) * | 2014-04-18 | 2015-10-22 | Samsung Electronics Co., Ltd. | Method and apparatus for providing information related to content supporting broadcast service |
CN109314666A (zh) * | 2016-04-12 | 2019-02-05 | Nicira股份有限公司 | 用于拥塞感知负载均衡的虚拟隧道端点 |
Family Cites Families (43)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4905231A (en) * | 1988-05-03 | 1990-02-27 | American Telephone And Telegraph Company, At&T Bell Laboratories | Multi-media virtual circuit |
US5852601A (en) * | 1991-09-09 | 1998-12-22 | Network Equipment Technologies, Inc. | Method and apparatus for reactive congestion control in an asynchronous transfer mode (ATM) network |
US5583990A (en) * | 1993-12-10 | 1996-12-10 | Cray Research, Inc. | System for allocating messages between virtual channels to avoid deadlock and to optimize the amount of message traffic on each type of virtual channel |
BR9707253A (pt) * | 1996-01-31 | 1999-06-01 | Ipsilon Networks Inc | Processos de transmitir pacetes entre um nó a montante e um nó a jusante em uma rede e de comutar um fluxo em um primeiro nó produto de programa de computador unídade de comutação básica em um sistema para transmitir pacotes em uma rede unidade de porta de comutador e agente de comutação |
US6788691B1 (en) * | 1998-08-27 | 2004-09-07 | Nortel Networks Limited | AAL2 negotiation procedure |
US6954424B2 (en) * | 2000-02-24 | 2005-10-11 | Zarlink Semiconductor V.N., Inc. | Credit-based pacing scheme for heterogeneous speed frame forwarding |
US7027418B2 (en) * | 2001-01-25 | 2006-04-11 | Bandspeed, Inc. | Approach for selecting communications channels based on performance |
US7656898B2 (en) * | 2003-09-18 | 2010-02-02 | Brocade Communications Systems, Inc. | Virtual channel remapping |
US7650379B2 (en) * | 2003-12-09 | 2010-01-19 | Viasat, Inc. | Method for channel congestion management |
US8923328B2 (en) * | 2007-11-07 | 2014-12-30 | Brocade Communications Systems, Inc. | Method and system for facilitating application-oriented quality of service in a fibre channel network |
US7974278B1 (en) * | 2007-12-12 | 2011-07-05 | Integrated Device Technology, Inc. | Packet switch with configurable virtual channels |
FR2925808A1 (fr) * | 2007-12-21 | 2009-06-26 | Thomson Licensing Sas | Procede de communication dans un reseau comprenant un reseau primaire et un reseau secondaire |
US7913024B2 (en) * | 2008-12-09 | 2011-03-22 | International Business Machines Corporation | Differentiating traffic types in a multi-root PCI express environment |
US8144582B2 (en) * | 2008-12-30 | 2012-03-27 | International Business Machines Corporation | Differentiating blade destination and traffic types in a multi-root PCIe environment |
US10798252B2 (en) * | 2009-01-28 | 2020-10-06 | Headwater Research Llc | System and method for providing user notifications |
US8755269B2 (en) * | 2009-12-23 | 2014-06-17 | Medtronic Minimed, Inc. | Ranking and switching of wireless channels in a body area network of medical devices |
US20110271002A1 (en) * | 2010-05-03 | 2011-11-03 | Canon Kabushiki Kaisha | Initializing network streaming over multiple physical interfaces |
US9065773B2 (en) * | 2010-06-22 | 2015-06-23 | Juniper Networks, Inc. | Methods and apparatus for virtual channel flow control associated with a switch fabric |
US11700211B2 (en) * | 2012-04-10 | 2023-07-11 | Comcast Cable Communications, Llc | Data network traffic management |
US9503397B2 (en) * | 2013-01-15 | 2016-11-22 | International Business Machines Corporation | Applying a client policy to a group of channels |
US9697161B2 (en) * | 2013-03-22 | 2017-07-04 | Stmicroelectronics (Grenoble) Sas | Method of handling transactions, corresponding system and computer program product |
US10015720B2 (en) * | 2014-03-14 | 2018-07-03 | GoTenna, Inc. | System and method for digital communication between computing devices |
WO2015191937A1 (en) * | 2014-06-13 | 2015-12-17 | Unifythings, Inc. | Virtual gateway for a connected device |
CN104917694A (zh) * | 2015-06-15 | 2015-09-16 | 上海斐讯数据通信技术有限公司 | 一种基于优先级的流量控制方法 |
CN106330742B (zh) * | 2015-06-23 | 2019-12-06 | 华为技术有限公司 | 一种流量控制的方法及网络控制器 |
US10470138B2 (en) * | 2015-10-12 | 2019-11-05 | Newracom, Inc. | Apparatus and methods for virtual channel sensing |
WO2017112820A1 (en) * | 2015-12-22 | 2017-06-29 | Rapidsos, Inc. | Systems and methods for robust and persistent emergency communications |
US10708200B2 (en) * | 2016-05-18 | 2020-07-07 | Marvell Israel (M.I.S.L) Ltd. | Traffic management in a network switching system with remote physical ports |
CN106792831B (zh) * | 2017-01-25 | 2019-08-30 | 合肥工业大学 | 无线节点级和无线链路级的拥塞避免模块及其方法 |
US10628547B1 (en) * | 2017-06-30 | 2020-04-21 | Xilinx, Inc. | Routing circuit designs for implementation using a programmable network on chip |
US10498631B2 (en) * | 2017-08-15 | 2019-12-03 | Hewlett Packard Enterprise Development Lp | Routing packets using distance classes |
US10511987B2 (en) * | 2017-09-20 | 2019-12-17 | Qualcomm Incorporated | Methods and apparatus related to enhanced machine type communication |
US10560940B2 (en) * | 2017-11-10 | 2020-02-11 | Nokia Solutions And Networks Oy | Intelligent traffic steering over optimal paths using multiple access technologies |
US11153211B2 (en) * | 2017-12-09 | 2021-10-19 | Intel Corporation | Fast data center congestion response |
US10367565B2 (en) * | 2017-12-12 | 2019-07-30 | Charter Communications Operating, Llc | Communications methods and apparatus using multiple beams |
US10673745B2 (en) * | 2018-02-01 | 2020-06-02 | Xilinx, Inc. | End-to-end quality-of-service in a network-on-chip |
US12028741B2 (en) * | 2018-05-10 | 2024-07-02 | Qualcomm Incorporated | Dynamic control channel management |
WO2020004688A1 (ko) * | 2018-06-28 | 2020-01-02 | 엘지전자(주) | V2x 통신 장치 및 그의 데이터 전송 방법 |
CN110752905B (zh) * | 2018-07-24 | 2021-02-12 | 华为技术有限公司 | 通信方法及装置 |
US20200076742A1 (en) * | 2018-08-28 | 2020-03-05 | Hewlett Packard Enterprise Development Lp | Sending data using a plurality of credit pools at the receivers |
US10848440B2 (en) * | 2019-03-20 | 2020-11-24 | Alibaba Group Holding Limited | Systems and methods for allocating bandwidth across a cluster of accelerators |
US11489779B2 (en) * | 2019-05-20 | 2022-11-01 | Citrix Systems, Inc. | Systems and methods for managing streams of packets via intermediary devices |
CN116458201A (zh) * | 2020-10-30 | 2023-07-18 | 瑞典爱立信有限公司 | 基于拥塞控制的gNB间载波聚合 |
-
2019
- 2019-04-17 CN CN201910309167.9A patent/CN111835652B/zh active Active
-
2020
- 2020-04-13 EP EP20791875.6A patent/EP3952234A4/en active Pending
- 2020-04-13 WO PCT/CN2020/084548 patent/WO2020211728A1/zh unknown
-
2021
- 2021-10-12 US US17/498,756 patent/US12028255B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103907321A (zh) * | 2011-11-15 | 2014-07-02 | 甲骨文国际公司 | 在胖树拓扑中利用虚拟通道的动态分配减轻拥挤的系统和方法 |
CN103701710A (zh) * | 2013-12-20 | 2014-04-02 | 杭州华为数字技术有限公司 | 一种数据传输方法、核心转发设备以及端点转发设备 |
CN103746927A (zh) * | 2013-12-27 | 2014-04-23 | 杭州华为数字技术有限公司 | 基于优先级的流控pfc方法及发送设备、接收设备 |
US20150304691A1 (en) * | 2014-04-18 | 2015-10-22 | Samsung Electronics Co., Ltd. | Method and apparatus for providing information related to content supporting broadcast service |
CN109314666A (zh) * | 2016-04-12 | 2019-02-05 | Nicira股份有限公司 | 用于拥塞感知负载均衡的虚拟隧道端点 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3952234A4 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113992470A (zh) * | 2021-10-14 | 2022-01-28 | 上海艾为电子技术股份有限公司 | 数据发送方法和接收方法、主设备、从设备及电子设备 |
Also Published As
Publication number | Publication date |
---|---|
EP3952234A4 (en) | 2022-05-18 |
CN111835652B (zh) | 2024-04-16 |
US12028255B2 (en) | 2024-07-02 |
US20220029919A1 (en) | 2022-01-27 |
EP3952234A1 (en) | 2022-02-09 |
CN111835652A (zh) | 2020-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020211728A1 (zh) | 一种数据流的虚拟通道的设置方法及装置 | |
US11190449B2 (en) | Packet control method and network apparatus | |
US10243865B2 (en) | Combined hardware/software forwarding mechanism and method | |
EP3723413B1 (en) | Policy control method, apparatus, and system | |
JP2015149577A (ja) | 帯域制御装置 | |
WO2020134425A1 (zh) | 一种数据处理方法、装置、设备及存储介质 | |
TWI487349B (zh) | 頻寬虛擬化 | |
JP5304813B2 (ja) | 通信ノード装置 | |
WO2020147440A1 (zh) | 数据用量上报的方法、装置及系统 | |
WO2021017578A1 (zh) | 报文发送方法、装置及存储介质 | |
WO2019223702A1 (zh) | 管理pdu会话的方法、装置和系统 | |
US20220086243A1 (en) | Method, device, and system | |
WO2020034697A1 (zh) | 通信方法和装置 | |
WO2018086412A1 (zh) | 一种时延控制方法、装置及系统 | |
WO2019165855A1 (zh) | 一种报文传输的方法及装置 | |
WO2022247257A1 (zh) | 一种pfc风暴的检测和处理方法 | |
US11552905B2 (en) | Managing virtual output queues | |
CN108141866A (zh) | 一种处理业务数据包的方法及装置 | |
US10616116B1 (en) | Network traffic load balancing using rotating hash | |
WO2019232694A1 (zh) | 队列控制方法、装置及存储介质 | |
US20230262001A1 (en) | Enhanced virtual channel switching | |
JP2016046669A (ja) | パケット処理装置、プログラム及び方法 | |
WO2021209016A1 (zh) | 网络设备中处理报文的方法和相关设备 | |
CN108712346A (zh) | 一种负载均衡自路由数据交换结构及方法 | |
WO2021008263A1 (zh) | 数据传输方法、装置及系统 |
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: 20791875 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2020791875 Country of ref document: EP Effective date: 20211027 |