Patent ID: 12231295

DESCRIPTION OF EMBODIMENTS

The following describes the embodiments of this application with reference to the accompanying drawings.

For a data stream of an Internet Protocol (IP) network, a bandwidth is often used to collect statistics on a size of the data stream, and a value of the bandwidth is related to a feature and an observation period of the data stream. For example, an average bandwidth is used to describe a data stream that is stable in a long time, and a relatively long observation period is required. A peak bandwidth is used to describe a transient maximum value of a data stream, and a relatively short observation period is required. A millisecond-level or microsecond-level time unit may be selected based on a feature of the data stream, to collect statistics on the data stream.

However, the foregoing network deployed based on the average bandwidth or the peak bandwidth can hardly meet a requirement of uRLLC for a low latency. First, when a data stream has a burst feature, the average bandwidth differs greatly from the peak bandwidth, and the peak bandwidth also differs greatly with different values of the observation period. Consequently, it is difficult to use a single bandwidth value to reflect the feature of the data stream. In addition, a bandwidth refers to statistics on data streams per unit of time, and a value of the bandwidth is not directly related to a network transmission latency requirement.

In view of this, this application provides a method, a device, and a system for determining a bandwidth for data stream transmission, so that bandwidth values for different data streams can be more accurately determined when a latency requirement is met. In the solutions, a latency requirement for transmitting a data stream, a network device transmission latency, and a link transmission latency are used as parameters, to determine a required bandwidth for transmitting the data stream by a network device. In other words, under a constraint condition that the latency requirement of the data stream is met, the required bandwidth for transmitting the data stream by the network device is determined, and the determined required bandwidth is delivered to the network device as a delay reliable bandwidth (DRB) for transmitting the data stream, to deploy a network. The method may be used to guide network resource deployment for a data stream that has a latency requirement, and determine, based on the latency requirement of the data stream, a bandwidth for transmitting the data stream, to implement a low latency and high reliability for a service, and provide technical support for development of a 5G service.

Before the specific solutions of this application are described, the following first describes and explains terms in this application.

A required bandwidth for a data stream in this application is used to describe a reliable bandwidth required for transmitting the data stream when a latency requirement of the data stream is met. The required bandwidth of the data stream may also be referred to as a DRB. The DRB may be used to guide network resource configuration, to provide a deterministic and reliable latency guarantee for a data stream of a uRLLC service. For example, in industrial automation network application, if a latency requirement for end-to-end transmission of a data stream is that a 2-millisecond (ms) reliability (a probability of successful data transmission within the latency requirement of the data stream) requirement is 100%, a maximum latency of transmitting the data stream by a network device by using the DRB cannot exceed 2 ms. In this application, the DRB or the required bandwidth may be indicated by Bd.

A service requirement latency of the data stream in this application is an acceptable maximum latency of end-to-end transmission of the data stream, and may also be referred to as a bounded latency of the data stream or a latency requirement for transmitting the data stream. For example, a value of the acceptable maximum latency of end-to-end transmission of the data stream is 2 ms, and the bounded latency of the data stream or the latency requirement of the data stream is 2 ms. In this application, the bounded latency or the service requirement latency of the data stream may be indicated by dobj. The term “end-to-end” is used to describe two ends of a path for transmitting the data stream. For example, the transmission path of the data stream is a path from a first network device to a second network device, and end-to-end transmission of the data stream means that the data stream is transmitted from one end, that is, the first network device to the other end, that is, the second network device.

YANG in this application is a data modeling language, used to model configuration data, status data, a remote procedure call, and a network management protocol notification. For specific descriptions of YANG, refer to related chapters in Requirement For Comments (RFC) 6020 and RFC 7950. For example, the network device may configure and send data by using a NETCONF YANG model and a RESTCONF YANG model. The YANG model can describe data in an Extensible Markup Language (XML) format or a JAVASCRIPT object notation (JSON) format. For example, the YANG model may be used to carry a parameter corresponding to a forwarding latency or a DRB of the network device.

The following describes a possible application scenario of this application with reference toFIG.1. A network100inFIG.1includes a control device101and network devices102to105. In a possible design, the network devices102to105may be respectively a sending device102, forwarding devices104and105, and a receiving device103of a data stream. For example, the sending device102may be a source end device for sending the data stream, and the data stream is forwarded by the forwarding devices104and105, and is received by a destination end device103. The control device101may exchange information with one or more of the sending device102, the forwarding device104, the forwarding device105, or the receiving device103by using a user-network interface (UNI), a NETCONF, or a RESTCONF.

The control device101has a data processing capability or a computing capability. As shown inFIG.1, the control device101may be an independent network device, that is, physically independent of the network devices102to105in the network100, and centrally manages one or more of the network devices102to105. Alternatively, the control device101and another network device may be integrated on a same network device. For example, the control device101and the sending device102are integrated on a same network device. Alternatively, a function of the control device101may be split into a plurality of sub-functional units, and the plurality of sub-functional units may be distributed on the network devices102to105. A physical form and a deployment manner of the control device101are not limited in this application, provided that a function of interacting with one or more of the network devices102to105in this application can be implemented.

Each of the sending device102, the receiving device103, or the forwarding devices104and105may be an independent network device, or may be integrated with the control device101on one device, and may be selected and designed based on a specific scenario requirement. This is not limited in this application.

In an example, if the data stream needs to traverse a plurality of subnets in a transmission process from the source end device to the destination end device, the sending device102may be a network device that has a forwarding function and that is located at an edge of one of the subnets. For example, when a path for transmitting the data stream is divided into different subnets based on network segments, the sending device102is an edge forwarding device of one of the subnets. Alternatively, when a path for transmitting the data stream is distributed in a plurality of subdomains in Time-Sensitive Networking (TSN), the sending device102is an edge forwarding device in one of the subdomains. The forwarding devices104and105may be network devices that have a data stream forwarding function, such as switches or routers. The receiving device103may be a receive-end network device of traffic, and has a traffic receiving function.

In an example, the network100may further include a CUC device. The CUC device separately establishes connections to the network devices102to105, and may be configured to manage or configure the network devices102to105. The CUC device serves as a proxy for the network devices102to105to exchange information with the control device101.

The network scenario provided inFIG.1may be a 5G uRLLC service scenario, which is further, for example, a scenario in which a bounded latency guarantee is provided for a smart grid differential protection service, an industrial automation scenario, a vehicle network scenario, or a scenario in which in a smart factory, a bounded latency is provided for a sensor collection data stream, an industrial control data stream, video surveillance traffic, and the like based on a wired Ethernet or a wireless network. In these scenarios, for different data stream types, there may be different service-level agreements (SLAs) in a network. Therefore, the control device needs to properly coordinate an available resource and a service requirement based on a latency requirement of the data stream, and properly allocate and reserve a network resource. According to the solution for determining a bandwidth for data stream transmission that is provided in this application, a network resource is configured, to provide a differentiated SLA guarantee.

FIG.2is a schematic flowchart of a method for determining a required bandwidth for data stream transmission according to this application. The method includes obtaining a service requirement latency of a data stream, obtaining a network device transmission latency and a link transmission latency on a forwarding path, and determining a required bandwidth for the data stream. A control device inFIG.2may be the control device101inFIG.1, and a network device on the forwarding path inFIG.2may be one or more of the network devices101to105inFIG.1. The following separately explains and describes the foregoing three steps.

Step210: The control device obtains the service requirement latency of the data stream.

On the one hand, the control device may obtain the service requirement latency of the data stream from the control device. For example, the control device may obtain, by using a correspondence between a data stream and a service requirement latency that is stored by the control device, the service requirement latency corresponding to the data stream. On the other hand, the control device may alternatively receive the service requirement latency that is of the data stream and that is sent by another network device. For example, the control device may first determine, based on obtained network topology information, the path for forwarding the data stream and the one or more network devices on the forwarding path. Then, the control device obtains the service requirement latency of the data stream from the network device on the forwarding path. For example, with reference toFIG.1, the sending device101may directly send the service requirement latency of the data stream to the control device.

For example, when the network device on the transmission path sends the service requirement latency of the data stream to the control device, the control device may send, to the control device by using a UNI, a packet that carries the service requirement latency of the data stream, for example, include the service requirement latency of the data stream in a MRP packet, a LRP packet, a NETCONF packet, a RESTCONF packet, or a MIB packet.

In an example, the network device on the transmission path may alternatively send the service requirement latency of the data stream to the control device by using a CUC device.

The network device may alternatively send, to the control device by using a CUC device, a packet that carries the service requirement latency of the data stream.

The service requirement latency of the data stream may be understood as a maximum latency allowed for end-to-end transmission of the data stream. For example, if end-to-end devices are respectively a first network device and a second network device, the service requirement latency of the data stream is a maximum required latency allowed for the data stream to arrive at the second network device from the first network device. When the first network device and the second network device are respectively a source end device and a destination end device of the data stream, the control device may obtain the service requirement latency of the data stream from the first network device. For example, in TSN, a transmit end (talker) directly sends the service requirement latency of the data stream to the control device, or sends the service requirement latency of the data stream to the control device by using the CUC device. When the first network device is an edge forwarding device in a subnet for transmitting the data stream, any network device on the path for forwarding the data stream may send the service requirement latency of the data stream to the control device.

The control device may receive a service requirement latency of one or more different data streams. Different data streams may be distinguished based on 4-tuple, 5-tuple, or 7-tuple information of the data streams. For example, different data streams are distinguished based on source IP addresses, destination IP addresses, source ports, and destination ports of the data streams, or different data streams are distinguished based on source IP addresses, destination IP addresses, protocol numbers, source ports, and destination ports of the data streams, or different data streams are distinguished based on source IP addresses, destination IP addresses, protocol numbers, service types, interface indexes, source ports, and destination ports of the data streams. Data streams may alternatively be distinguished based on other features. For example, whether data streams are a same data stream is distinguished depending on whether transmission paths of the data streams are the same, and data streams on a same transmission path are a same data stream. Data streams may alternatively be distinguished depending on whether the data streams have a same quality of service (QoS) parameter, for example, depending on whether the data streams have a same latency, jitter, or throughput, and data streams having a same QoS parameter are a same data stream. The foregoing distinguishing features may be further combined to distinguish whether data streams are a same data stream.

Step220: The control device obtains the network device transmission latency and the link transmission latency on the forwarding path of the data stream.

For ease of description below, the forwarding path for end-to-end transmission of the data stream may be referred to as a first path. The network device transmission latency on the first path may include one or more of a processing latency, an output latency, a preemption latency, or a scheduling latency of the one or more network devices on the first path. The link transmission latency on the first path is a latency of end-to-end transmission of the data stream on the first path, and may also be referred to as an optical fiber latency on the first path.

The control device obtains a sum of an accumulated value of a network device transmission latency of the one or more network devices on the forwarding path and an accumulated value of the link transmission latency on the forwarding path. With reference toFIG.1, for example, the forwarding devices104and105are included on the forwarding path for transmitting the data stream, and the network device transmission latency on the forwarding path is a sum of network device transmission latencies of the forwarding device104and the forwarding device105. The link transmission latency on the forwarding path is a sum of transmission latencies of all links on the forwarding path. InFIG.1, the link transmission latency on the forwarding path is a sum of transmission latencies of all links, between the sending device102and the receiving device103, for transmitting the data stream along the forwarding path.

In an example, a network device forwarding latency on the first path includes one or a combination of more of the following latencies: the processing latency of the network device on the first path, the output latency of the network device on the first path, the preemption latency of the network device on the first path, or the scheduling latency of the network device on the first path. For example, the network device forwarding latency on the first path includes the output latency of the network device on the first path and the processing latency of the network device on the first path. The network device forwarding latency on the first path may be any one of the foregoing latency parameters or any combination of the foregoing latency parameters. A combination manner is not limited in this application.

For example,FIG.4is a schematic diagram of a network device transmission latency and a link transmission latency according to this application. InFIG.4, a node A and a node B are included, and a transmission direction of a data stream is from the node A to the node B. A network device transmission latency and a link transmission latency of the data stream from the node A to the node B includes a part shown by a digit inFIG.4. InFIG.4, a digit 1 represents a network device output latency, a digit 2 represents a link transmission latency, a digit 3 represents a preemption latency, a digit 4 represents a network device processing latency, a digit 5 represents a scheduling latency, and a digit 6 represents a queue latency. The network device transmission latency on the forwarding path includes a sum of a transmission latency of the node A, a transmission latency of the node B, and the link transmission latency. A transmission latency of a single network device on the forwarding path may be any one or any combination of 1, 3, 4, and 5, for example, a transmission latency of a single network device on the first path is a sum of 1, 3, 4, and 5, or may include only 4. The network device transmission latency on the forwarding path is N times the determined transmission latency of the single network device, and N is a quantity of network devices on the forwarding path.

In an example, the network device on the first path or the forwarding path includes one or more network devices configured to forward the data stream. The one or more network devices do not include devices at two ends of the forwarding path, or the one or more network devices include only either of devices at two ends of the forwarding path, or the one or more network devices include devices at two ends of the forwarding path. The control device may receive a network device transmission latency and a link transmission latency on the forwarding path that are sent by any one or more of the foregoing forwarding devices.

The control device needs to consider the network device transmission latency and the link transmission latency on the forwarding path as factors for solving the required bandwidth. Therefore, the control device needs to determine a range of network devices on the forwarding path. The determined range of network devices on the forwarding path varies with an actual scenario. For example, if the network devices, at the two ends, for forwarding the data stream are respectively a source end device and a destination end device of the data stream, the one or more network devices on the forwarding path do not include the devices, at the two ends, of the data stream. If the devices at the two ends of the forwarding path are edge forwarding devices in a subnet, the devices at the two ends belong to the plurality of network devices on the forwarding path. If one of the devices at the two ends of the forwarding path is an edge forwarding device, the device belongs to the one or more network devices on the forwarding path. According to the method, the network device on the path for forwarding the data stream may be selected and determined based on different network scenarios, to help the control device more accurately determine the required bandwidth.

In addition, the control device needs to configure a network resource for the forwarding device on the path for transmitting the data stream. As shown inFIG.1, if the sending device102is a source end device of the data stream, and the receiving device103is a destination end device of the data stream, the control device may not configure bandwidth resources for the source end device and the destination end device of the data stream. Therefore, the network device on which the control device needs to perform bandwidth configuration does not include the sending device102or the receiving device103. If the sending device102and the receiving device103are edge devices in a subnet and are not a source end device and a destination end device of the data stream, the control device may alternatively calculate and configure required bandwidths for both the sending device102and the receiving device103.

The control device may receive the network device transmission latency and the link transmission latency on the forwarding path by using an MRP packet, an LRP packet, a NETCONF packet, a RESTCONF packet, or a MIB packet. For example, the control device may use a YANG model to carry the network device transmission latency and the link transmission latency on the forwarding path, and send the YANG model to the control device by using a NETCONF packet or a RESTCONF packet.

Step230: The control device determines the required bandwidth for transmitting the data stream.

The control device determines, based on the service requirement latency of the data stream and the network device transmission latency and the link transmission latency on the forwarding path, the required bandwidth for transmitting the data stream. Optionally, a time length for which the network device on the forwarding path performs end-to-end transmission on the data stream by using the required bandwidth is less than or equal to the service requirement latency of the data stream.

In an example, the control device may determine the required bandwidth for the data stream based on an arrival curve and a service curve. The arrival curve α is used to describe an accumulated maximum quantity (bit or byte) of data streams sent within a time t, and the service curve is used to describe an accumulated service quantity (bit or byte) of data streams sent within the time t. As shown inFIG.5, a schematic diagram of determining the required bandwidth for the data stream is provided. The data stream conforms to the arrival curve α(t)=b+rt, b is a burst length of the data stream, and r is an average rate of the data stream. The burst length of the data stream refers to a length of burst traffic of the data stream. For example, when the data stream is sent by using a token bucket, the burst length is a committed burst size (CBS). This embodiment of this application is not limited to a manner of sending the data stream by using the token bucket. The data stream conforms to the service curve β(t)=R (t−T), R is a sending rate provided by the network device on the forwarding path for the data stream, T is a sum of network device transmission latency and the link transmission latency on the forwarding path, and the service curve may be used to describe one forwarding device or a plurality of cascaded forwarding devices. The control device may obtain a feasible solution of a bandwidth variable R by using the following formula 1, where p is used to describe a probability that the data stream is reliably transmitted in a network (without a packet loss) and the service requirement latency of the data stream is met, for example, a specific service requires that at a probability of 99.99%, the transmission latency does not exceed 20 ms. A default value of an accuracy requirement p for transmitting the data stream may be p=1, that is, the service requirement latency of the data stream needs to be 100% met. A solving method may be network calculus or the like. For example, a maximum horizontal distance between the arrival curve and the service curve is solved as an upper bound of the latency, that is, the service requirement latency of the data stream. The determined required bandwidth R is less than or equal to the maximum bandwidth of the network device on the forwarding path.
h_max(a(b,r,t),β(R,T,t),p)≤dq(Formula 1)
Rmin≤R≤Rmax

In an example, for the data stream, the required bandwidth for the data stream may be obtained based on a queue latency. The queue latency of the data stream may be dq=dobj−dfix. dobjindicates the end-to-end service requirement latency of the data stream. dfixindicates the network device transmission latencies and the link transmission latencies of all the network devices that forward the data stream on the forwarding path. For example, if there are two network devices on the forwarding path, dfixincludes the link transmission latency of end-to-end transmission of the data stream and transmission latencies of the two network devices.

In an example, a value of the required bandwidth for the data stream is obtained based on a relational expression Bd=b/(dobj−dfix). Bdindicates the value of the required bandwidth. b indicates a value of the burst length. dobjindicates the service requirement latency of the data stream. dfixindicates the network device transmission latency and the link transmission latency on the forwarding path. A difference between dobjand dfixindicates a network device queue latency for the burst length on the forwarding path in a physical sense. The network device on the forwarding path transmits the data stream by using the required bandwidth, so that the service requirement latency of the data stream can be met. In addition, the method can further ensure that transmission of the data stream meets a constraint of the service requirement latency in the case of the burst traffic.

For example, the burst length b may be sent by the network device on the forwarding path to the control device. For a specific sending manner, refer to the manner of sending the service requirement latency of the data stream in step210. The burst length of the data stream may alternatively be obtained based on a burst length b=tprp. rpindicates a burst rate of the data stream, and tpindicates a burst time of the data stream. The burst length of the data stream may alternatively be obtained based on a burst length b=NLL. NLindicates a quantity of data streams with a maximum packet length L that are sent in a specified period. L indicates a longest packet of the data stream. For accurate calculation, the burst length of the data stream may alternatively be obtained based on a burst length b=2NLL, that is, the burst length is calculated by using a quantity of longest packets in two periods.

For a manner in which the control device obtains the feature information of the data stream, refer to the manner of obtaining the service requirement latency of the data stream in step210. For example, the control device may obtain, by using the packets listed in step210, the burst length b, the burst rate rp, or the burst time tpof the data stream, the average rate r at which the data stream is transmitted, the maximum packet length L of the data stream sent in the specified period, the quantity of data streams with the maximum packet length L that are sent in the specified period, or the accuracy requirement p for transmitting the data stream. The accuracy requirement p is an accuracy requirement for transmitting the data stream, and may also be referred to as a reliability requirement for transmitting the data stream. For a method for receiving the parameter by the control device, refer to the method for receiving the service requirement latency of the data stream by the control device in step210. Details are not described herein again. The control device may obtain the arrival curve α based on other information of the data stream.

In an example, the control device sends indication information to the network device on the path by using a CUC device.

In an example, the control device sends indication information to the network device on the forwarding path. The indication information carries the required bandwidth. As shown inFIG.12, a YANG model that carries the required bandwidth for the data stream is provided. The indication information is used to indicate the network device on the forwarding path to transmit the data stream based on the required bandwidth, or is used to indicate the network device on the forwarding path to reserve a bandwidth for the data stream based on the required bandwidth. The control device may send the required bandwidth for the data stream to a next-hop device that sends the data stream, or may send the required bandwidth for the data stream to all the network devices on the forwarding path.

As shown inFIG.3, a schematic flowchart of a method for determining a required bandwidth for a data stream is provided. A control device inFIG.3may be the control device101inFIG.1, and a network device inFIG.3may be one or more of the network devices101to105inFIG.1. A data stream A inFIG.3is a data stream in TSN. A feature of a process of transmitting the data stream A from a sending device to a receiving device meets all requirements or a combination of some requirements defined in the Institute of Electrical and Electronics Engineers (IEEE) 802.1 TSN series standards. The data stream A in the TSN is used as an example below to explain and describe a method for determining and deploying a required bandwidth for the data stream A.

Step310: The sending device of the data stream A sends feature information of the data stream A to the control device.

The feature information of the data stream includes a service requirement latency of the data stream A from the sending device to the receiving device. The feature information may further include a burst length b, a burst rate rp, or a burst time tpof the data stream, an average rate r at which the data stream is transmitted, a maximum packet length L of a data stream sent in a specified period, a quantity of data streams with a maximum packet length L that are sent in a specified period, or an accuracy requirement p for transmitting the data stream. A control device may determine, by using the parameter in the feature information, the required bandwidth for transmitting the data stream A.

A method for sending the feature information to the control device by the sending device is described below.

The sending device may send the feature information of the data stream A to the control device by using a data model traffic specification (TSPEC) TLV that is defined by using a UNI or a user to network requirements TLV. Alternatively, the feature information of the data stream A may be sent to the control device by using a TSPEC TLV or a user to network requirements TLV by a user centralized control device that manages the sending device. The data stream A may be a set, for example, the data stream includes a plurality of sub-data streams on a same transmission path.

In an example,FIG.6is a schematic diagram of a format in which the TLV carries the feature information of the data stream according to this application. For example, an interval inFIG.6may be a period TLin which the sending device sends a data stream with a maximum packet length L. If statistics are collected on the data stream A by using a value of Interval as a period, a value of MaxFramsPerinterval indicates a quantity NLof packets with the maximum packet length L that are sent in the data stream A in each period, and a length of each packet cannot exceed a value of MaxFramesSize. The burst length b of the data stream A may be obtained by using a product of the value of MaxFramsPerinterval and the value of MaxFramesSize. The following Table 1 shows a correspondence between a packet format parameter inFIG.6and the feature information of the data stream A.

TABLE 1Field in the TSPEC TLVFeature information of the data stream AIntervalPeriod TLMaxPacketPerInterval *Burst length bMaxFramesSizeMaxFramesSizeMaximum packet length L

In an example, a new TLV may alternatively be added to the TSPEC to carry the feature information of the data stream A.FIG.7is another schematic diagram of a format in which the new TLV is added to carry the feature information of the data stream according to this application. In the newly added TLV shown inFIG.7, Max_Committed Information Rate (bit/second (s)) and Max_Committed Burst Size (bit) may be used to restrict that the sent data stream A does not exceed values of Max_Committed Information Rate and Max_Committed Burst Size. In other words, this may be understood as that the data stream A is sent by using a token bucket, a rate at which a token is injected into the token bucket is the value corresponding to Max_CommittedInformationRate, and a maximum quantity of tokens that can be contained in the token bucket is the value corresponding Max_CommittedBurstSize, in this way, tokens in the token bucket are not used up. In addition, a length of a packet in the data stream A is not less than a value corresponding to MinFrameSize (bit), and is not greater than a value corresponding to MaxFrameSize (bit). The following Table 2 shows a correspondence between a packet format parameter inFIG.7and the feature information of the data stream A.

TABLE 2Field in the new TLV added to theFeature information of the dataTSPECstream AMax_CommittedInformationRateAverage rate rMax_CommittedBurstSizeBurst length bMaxFrameSizeMaximum packet length L

In an example,FIG.8is still another schematic diagram of a packet format in which the TLV carries the feature information of the data stream according to this application. A new field is added to a UserToNetworkRequirements TLV shown inFIG.8. For example, the field is Latency_ConfidenceLevel. If a value of the field is 999900, it means that a user accepts that at 99.99%, a network can ensure that a transmission latency is less than a value of MaxLatency. The following Table 3 shows a correspondence between a packet format parameter inFIG.8and the feature information of the data stream A.

TABLE 3Field in the new TLV added to theFeature information of the dataTSPECstream AMaxLatencyLatency requirement dobjLatency_ConfidenceLevelReliability requirement p

The TLV that carries the feature information of the data stream A may be used to implement information exchange between the network device and the control device by using a MRP, a LRP, a NETCONF, a RESTCONF, or the like. Methods for transmitting and carrying the feature information of the data stream A based on the foregoing three protocols are described below.

(1) MRP:

The sending device registers the feature information of the data stream into an MRPDU of the sending device, and sends a declaration to the control device. After receiving the declaration, the control device registers (registration) the feature information of the data stream into a database of the control device, and notifies the registration manner in a Multiple Stream Registration Protocol (MSRP) of the control device.

In the foregoing declaration and registration processes, the network device encapsulates the TLV that carries the feature information of the data stream into the MRPDU for transmission.FIG.9is a schematic diagram of a structure of an MRPDU packet according to this application. The sending device places a value part in the TLV at a location of FirstValue. Correspondingly, a type value is selected according to a specific protocol definition, and a length value depends on a length of FirstValue.

(2) LRP:

The sending device obtains the feature information of the data stream A from a Resource Allocation Protocol (RAP), registers the feature information of the data stream into an LRP database, and sends a declaration. The declaration includes a TLV carrying the feature information of the data stream. After receiving the declaration, the control device registers (registration) the feature information of the data stream into a database of the control device, and notifies a RAP of the control device.

In the foregoing declaration and registration processes, the sending device encapsulates the TLV that carries the feature information of the data stream into an LRP database (or data unit (DU)) for transmission.FIG.10is a schematic diagram of an LRPDU format according to this application. A value part in the TLV is placed at a location corresponding to application data. Correspondingly, a type value is selected according to a protocol definition, and a length value depends on a total length of zero or more records. In a specific transmission process of the LRPDU, transmission may be further performed by using an Edge Control Protocol (ECP) or a Transmission Control Protocol (TCP).

(3) RESTCONF:

The sending device may convert the feature information of the data stream A into a YANG data model, and transmits the feature information between the network device and the control device by using the RESTCONF protocol, where the YANG data model carries the feature information of the data stream A.FIG.11is a schematic diagram of the YANG model that carries the feature information of the data stream A according to this application. InFIG.11, the feature information of the data stream that is carried in the TLV inFIG.7is converted into the YANG model, where uint32 in the YANG model carries the feature information of the data stream A.

An occasion on which the sending device sends the feature information of the data stream A may be that when the sending device accesses a network for the first time, the sending device directly or indirectly sends the feature information of the data stream A to the control device, or when the feature information of the data stream A changes, the sending device may directly or indirectly send updated feature information of the data stream A to the control device, or the sending device may send the feature information of the data stream A to the control device according to an instruction of the control device, or the sending device may directly or indirectly send the feature information of the data stream A to the control device based on a specified period.

Step320: The control device receives the feature information of the data stream A.

The control device may receive the feature information of the data stream A based on a specific implementation in step310.

In an example, the control device determines, based on stored topology information of the TSN and the feature information of the data stream A, a forwarding path for transmitting the data stream. For example, the control device determines, based on the service requirement latency of the data stream, the path for forwarding the data stream A.

In an example, the control device determines, based on the stored topology information of the TSN and an SLA of the data stream A, the forwarding path for transmitting the data stream.

Step330: The forwarding device sends feature information of the forwarding device.

One or more network devices on the forwarding path send feature information of the one or more network devices to the control device based on the forwarding path determined in step320. With reference toFIG.1, two forwarding devices104and105are included on the path for transmitting the data stream A, that is, the forwarding devices104and105separately send network device feature information of the forwarding devices104and105to the control device.

The feature information of the forwarding device includes a forwarding device transmission latency on the forwarding path and a link transmission latency on the forwarding path. The forwarding latency may further include status information of the forwarding device and capability information of the forwarding device, for example, one or more of a port rate rpof the forwarding device, a maximum available bandwidth R of a link on the forwarding path, a maximum remaining bandwidth of a link on the forwarding path, a weight of a link on the forwarding path, or a maximum transmission unit (MTU) of a link on the forwarding path. The control device may determine, based on the feature information of the forwarding device, the required bandwidth for transmitting the data stream A.

The feature information of the forwarding device may be directly or indirectly sent to the control device by using the YANG data model. For a YANG data model language, an XML format or a JSON format may be used to describe information, and the control device may parse, by using the NETCONF, the feature information of the data stream in the YANG model. In the NETCONF, a Secure Shell (SSH) protocol, a Transport Layer Security (TLS) protocol, or a TCP may be used to transmit a packet carrying the feature information of the network device. In addition, the feature information of the data stream in YANG data may be parsed by using the RESTCONF.

Step340: The control device receives the feature information of the network device that transmits the data stream A.

The control device may receive the feature information of the forwarding device based on a possible implementation in step330.

Step350: The control device determines the required bandwidth for the data stream A based on the received feature information of the data stream A and the received feature information of the forwarding device.

With reference to the scenario shown inFIG.1, an example in which the required bandwidth for the data stream A is solved based on the feature information is provided below.

The control device determines, based on the forwarding path of the data stream A, that the network device on the forwarding path includes the forwarding devices104and105, that is, a quantity N=2 of network devices on the forwarding path. The end-to-end service requirement latency of the data stream A that is obtained by the control device based on the feature information of the data stream is dobj=2 milliseconds (ms). The transmission latency of each network device on the forwarding path is Tp=0.075 ms. Tpis used to describe the network device transmission latency of each network device on the forwarding path, for example, the network device transmission latency on the forwarding path inFIG.1includes the network device transmission latencies of the two forwarding devices: the forwarding device104and the forwarding device105, that is, a value is 2Tp=0.15 ms. The link transmission latency on the forwarding path is Tfix=1 ms. Tfixis used to describe the end-to-end link transmission latency of the data stream, for example, TfixinFIG.1is used to describe the link transmission latency of the data stream from the sending device102to the receiving device103. A sum of the network device transmission latency and the link latency on the forwarding path that are obtained based on dfix=Tfix+NTpis 1.15 ms, N is the quantity of forwarding devices on the forwarding path, and N is 2 with reference toFIG.1.

The control device may obtain, from the sending device, the burst length b=1000 bytes of the data stream A, or may obtain the burst length b based on a product of a quantity of packets with the maximum packet length L that are sent by the sending device and the maximum packet length L.

According to the foregoing parameters and the formula Bd=b/(dobjdfix) or a formula of an equivalent variation of the formula, the required bandwidth for transmitting the data stream A is solved as Bd=9.4 megabits per second (Mbps).

Step360: The control device delivers, to the forwarding device, the required bandwidth for transmitting the data stream A.

The control device delivers an indication message to the one or more network devices on the forwarding path, where the indication message carries the required bandwidth for transmitting the data stream A. The indication message is used to indicate the forwarding device to reserve, for the data stream A, a bandwidth equal to the required bandwidth, or the indication message is used to indicate the forwarding device to transmit the data stream A by using the required bandwidth. With reference toFIG.1, the control device delivers a required bandwidth value for the data stream A to the forwarding device104or the forwarding device105, so that the forwarding device104or the forwarding device105forwards the data stream A by using the required bandwidth.

FIG.12is a schematic diagram of a structure of YANG that carries the feature information of the network device according to this application. A traffic shaping (Asynchronous Traffic Shaping (ATS)) scheduling method defined in TSN in 802.1 is used as an example. As shown inFIG.12, the control device may configure the required bandwidth in a YANG model parameter committed-information-rate field, where the field is readable and writable, for example, unit64. For another scheduling method, the feature information of the forwarding device may be configured at another parameter location of the YANG model.

For the YANG data model language, the XML format or the JSON format may be used to describe information, and the control device may parse, by using the NETCONF, the feature information of the data stream in the YANG model. In the NETCONF, the SSH protocol, the TLS protocol, or the TCP may be used to transmit a packet carrying the feature information of the network device. In addition, the feature information of the data stream in YANG data may be parsed by using the RESTCONF.

In an example, for a forwarding device that uses a weighted fair queuing (WFQ) or dynamic rate repartitioning (DRR) scheduling method, the control device or the network device may plan a network slice based on the required bandwidth for the data stream A.

To meet a service latency constraint, the required bandwidth for transmitting the data stream is determined by using the foregoing method, to ensure that a service meets the latency constraint, and guide parameter configuration in bounded latency service scenarios such as smart grid differential protection such as network slicing and an industrial automation network.

Step370: The control device sends acknowledgment or charging information to a transmit end device based on the determined required bandwidth.

The control device sends the determined required bandwidth for the data stream A to a user based on the service requirement latency of the data stream A. The control device sends the charging information to the user based on the service requirement latency of the data stream A and the required bandwidth.

FIG.13is a schematic flowchart of another method for determining a required bandwidth for a data stream according to this application. A control device inFIG.13may be the control device101inFIG.1, and a network device or a forwarding device inFIG.13may be one of the network devices101to105inFIG.1. A data stream A inFIG.13is a data stream in TSN. The data stream A in the TSN is used as an example below to explain and describe a method for determining and deploying a required bandwidth for the data stream A.

Step1310: A network device that sends the data stream A sends, to the control device, a service requirement latency dobjof end-to-end transmission of the data stream A.

For a method for sending the service requirement latency of the data stream A to the control device by the network device, refer to the manner in step310inFIG.3. Details are not described herein again.

Step1320: The control device receives the service requirement latency dobjof the data stream A.

Step1330: The control device determines a forwarding path of the data stream A and a forwarding device on the forwarding path.

The control device may determine the forwarding path and the forwarding device on the forwarding path based on a known network topology and a feature of the data stream A. The control device may alternatively determine the forwarding path for forwarding the data stream A and the forwarding device on the forwarding path based on the service requirement latency of the data stream A. For example, when there is a plurality of forwarding paths for forwarding the data stream, the control device may select an appropriate path from the plurality of paths based on the service requirement latency of the data stream A.

Step1340: The forwarding device on the forwarding path sends, to the control device, a link transmission latency Tfixof end-to-end transmission of the data stream A.

For the link transmission latency of transmitting the data stream A, the link transmission latency of the data stream A may be determined based on descriptions of step220inFIG.2inFIG.4, and the link transmission latency of the data stream A may be described by Tfix.

Step1350: Each forwarding device on the forwarding path sends a transmission latency ddeviceof the forwarding device to the control device.

For a manner in which the forwarding device sends the transmission latency of the forwarding device and the link transmission latency to the control device, refer to the manners in step220and step320. The transmission latency of the forwarding device may be a processing latency represented by the digit 4 inFIG.4.

Step1360: The control device receives a network device transmission latency ddeviceand a link transmission latency Tfixof a single forwarding device.

The control device receives the forwarding device transmission latency of the single forwarding device and the end-to-end link transmission latency of the data stream A.

Step1370: The control device obtains a burst length of the data stream A.

The control device may directly receive the burst length of the data stream A, or may calculate the burst length of the data stream A based on another parameter. For details, refer to related descriptions of calculating the burst length of the data stream in step230.

Step1380: The control device determines a required bandwidth of each forwarding device on the forwarding path.

The control device solves the required bandwidth for the data stream A based on Bd=b/(dobj-per−ddevice). Bdindicates a value of the required bandwidth of the single network device on the forwarding path. b indicates a value of the burst length of the data stream. dobj-perindicates a value of a service requirement latency of the single network device on the forwarding path. ddeviceindicates the network device transmission latency of the single network device on the forwarding path.

In an example, there are a plurality of manners of obtaining the value of dobj-per. First, required latencies of forwarding the data stream A by all forwarding devices on the forwarding path may be obtained based on a difference between the service requirement latency dobjof the data stream A and the link transmission latency Tfixof the data stream A. The control device may allocate the difference between dobjand Tfixto each network device on the forwarding path in a specific proportion, to obtain the service requirement latency of each network device, that is, obtain dobj-per. For example, the control device evenly allocates the difference between dobjand Tfixto the network device on the forwarding path, and the control device may further allocate, to each network device on the forwarding path based on a requirement and an application scenario, the difference between dobjand Tfixin a specific proportion, to obtain the service requirement latency of the single network device, that is, obtain dobj-per.

Step1390: The control device delivers the required bandwidth of each forwarding device to the corresponding forwarding device.

The control device delivers the required bandwidth of each forwarding device to the corresponding device based on the required bandwidth of the forwarding device that is determined in step1380, so that the forwarding device configures a bandwidth resource for the data stream based on the required bandwidth. For a specific manner in which the control device delivers the required bandwidth, refer to the manner in step350.

FIG.14is a possible schematic diagram of a structure of the control device in the foregoing embodiments. The control device1400may implement functions of the control device in the embodiments shown inFIG.2,FIG.3, andFIG.13. For example, the control device may perform steps210to230inFIG.2, or perform step320and steps340and350inFIG.3, or perform steps1320and1330and steps1360to1390inFIG.13. For functions of units of the control device1400, refer to descriptions in the steps in the foregoing methods.

Refer toFIG.14. The control device1400includes an obtaining unit1401and a processing unit1402. The obtaining unit1401is configured to obtain a service requirement latency of transmitting a data stream from a first network device to a second network device, a network device transmission latency on a forwarding path, and a link transmission latency on the forwarding path, where the forwarding path is a path through which the data stream is transmitted from the first network device to the second network device. The processing unit1402is configured to determine, based on the service requirement latency, the network device transmission latency on the forwarding path, and the link transmission latency on the forwarding path, a required bandwidth for transmitting the data stream.

In an example, the network device transmission latency on the forwarding path includes one or more of a processing latency of a network device on the forwarding path, an output latency of the network device on the forwarding path, a preemption latency of the network device on the forwarding path, or a scheduling latency of the network device on the forwarding path. For details, refer to descriptions ofFIG.4in step220inFIG.2.

In an example, the required bandwidth satisfies the following condition: a latency of transmitting the data stream by the network device on the forwarding path along the forwarding path based on the required bandwidth is less than or equal to the service requirement latency.

In an example, the processing unit1402is configured to determine the required bandwidth for the data stream based on a difference between the service requirement latency and the network device transmission latency and the link transmission latency on the forwarding path.

In an example, the obtaining unit1401is further configured to obtain a burst length of the data stream. The processing unit1402is configured to obtain the required bandwidth for the data stream by using the following relationship:
Bd=b/(dobj−dfix).

Bdindicates a value of the required bandwidth. b indicates a value of the burst length. dobjindicates a value of the service requirement latency. dfixindicates the network device transmission latency and the link transmission latency on the forwarding path.

In an example, the network device on the forwarding path includes one or more network devices configured to forward. The one or more network devices do not include the first network device or the second network device, or the one or more network devices include the first network device, or the one or more network devices include the second network device, or the one or more network devices include the first network device and the second network device.

In an example, the control device includes a receiving unit. The obtaining unit1401is configured to obtain the burst length from the receiving unit. Alternatively, the obtaining unit1401obtains the burst length from the processing unit1402. The processing unit1402uses a value of a product of a burst rate and a burst time of the data stream as the burst length and sends the burst length to the obtaining unit1401. For the data stream, a value of a product of a packet length of a packet sent in the data stream in a specified period and a quantity of sent packets is used as the burst length, and the burst length is sent to the obtaining unit1401.

In an example, the obtaining unit1401may obtain the service requirement latency, or the network device transmission latency and the link transmission latency on the forwarding path from an MRP packet, an LRP packet, a NETCONF packet, a RESTCONF packet, or an MIB packet.

In an example, the processing unit1402is further configured to, before the obtaining unit obtains the network device transmission latency and the link transmission latency on the forwarding path, determine, based on the service requirement latency of the data stream, the path for transmitting the data stream.

In an example, the control device further includes a sending unit. The sending unit is configured to send indication information to the network device on the path, where the indication information is used to indicate the network device on the path to transmit the data stream based on the required bandwidth.

In an example, the sending unit is further configured to send the indication information to a CUC device, so that the CUC device sends the indication information to the network device on the path.

In an example, a value of the required bandwidth is less than or equal to a maximum bandwidth of the network device on the forwarding path.

It should be noted that, in this embodiment of this application, unit division is an example, and is merely logical function division. During actual implementation, another division manner may be used. Functional units in the embodiments of this application may be integrated in one processing unit1402, or each unit may exist alone physically, or two or more units are integrated into one unit. For example, in the foregoing embodiments, the receiving unit and the sending unit may be a same unit or different units. The integrated unit may be implemented in a form of hardware, or may be implemented in a form of a software function unit.

FIG.15is a schematic diagram of a structure of a control device according to an embodiment of this application. The control device1500includes a processor1502, a communications interface1503, a memory1501, and a bus1504. The communications interface1503, the processor1502, and the memory1501are connected to each other by using the bus1104. The bus1504may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used to represent the bus inFIG.15, but this does not mean that there is only one bus or only one type of bus. The control device1500may implement functions of the control device in the embodiments shown inFIG.2,FIG.3, andFIG.13. The processor1502and the communications interface1503may perform corresponding functions of the control device in the foregoing method examples. The communications interface1503is configured to support the control device1500in performing steps210and220inFIG.2, or performing step320, step340, and step360inFIG.3, or performing step1320, step1360, and step1390inFIG.13. The processor1502is configured to support the control device1500in performing step230inFIG.2, or performing step350inFIG.3, or performing step1330, step1360, step1370, and step1380inFIG.13. Step1370inFIG.13may be performed by the communications interface1503, or may be performed by the processor1502. The memory1501is configured to store program code and data of the control device1500.

The following further describes each component of the control device with reference toFIG.15.

The memory1501may be a volatile memory, for example, a random-access memory (RAM), or a non-volatile memory, for example, a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), or a combination of the foregoing types of memories configured to store program code that can implement the method in this application, a configuration file of a network device in a TSN domain, or other content.

The processor1502is a control center of the control device, and may be a central processing unit (CPU), or may be an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application, for example, one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).

The communications interface1503is configured to communicate with a network device, for example, to obtain an end-to-end service requirement latency of a data stream, a network device transmission latency on a forwarding path of the data stream, and a link transmission latency on the forwarding path. For example, the service requirement latency of the data stream may be obtained by using an MRP packet, an LRP packet, a NETCONF packet, a RESTCONF packet, or an MIB packet. The communications interface1503may be an Ethernet interface, a Fast Ethernet (FE) interface, or a Gigabit Ethernet (GE) interface.

In an example, the communications interface1503is configured to receive a burst length of the data stream.

In an example, the communications interface1503is configured to send indication information to a network device on the forwarding path of the data stream, where the indication information carries a required bandwidth for the data stream. The indication information is used to indicate the network device on the path to transmit the data stream based on the required bandwidth, and reserve a bandwidth resource for the data stream.

In a possible implementation, the control device may be configured as the control device101inFIG.1. The processor1502runs or executes a software program and/or a module stored in the memory1501, and invokes data stored in the memory1501, to perform the following function: determining, based on the service requirement latency, the network device transmission latency on the forwarding path, and the link transmission latency on the forwarding path, the required bandwidth for transmitting the data stream.

In a possible implementation, the processor1502is configured to determine the required bandwidth for the data stream based on a difference between the service requirement latency and the network device transmission latency and the link transmission latency on the forwarding path.

In a possible implementation, the processor1502is further configured to obtain the burst length of the data stream. The processor1502is configured to obtain the required bandwidth for the data stream by using the following relationship:
Bd=b/(dobj−dfix).

Bdindicates a value of the required bandwidth. b indicates a value of the burst length. dobjindicates a value of the service requirement latency. dfixindicates the network device transmission latency and the link transmission latency on the forwarding path.

In a possible implementation, the processor1502uses a value of a product of a burst rate and a burst time of the data stream as the burst length, or uses a value of a product of a packet length of a packet sent in the data stream in a specified period and a quantity of sent packets as the burst length.

In a possible implementation, the processor1502is further configured to, before the communications interface1503obtains the network device transmission latency and the link transmission latency on the forwarding path, determine, based on the service requirement latency of the data stream, the path for transmitting the data stream.

For a specific execution process, refer to detailed descriptions of corresponding steps in the embodiments shown inFIG.2,FIG.3, andFIG.13. Details are not described herein again.

FIG.16shows a system1600for determining a required bandwidth for data stream transmission according to this application. The system includes a sending device1601, a control device1602, and a forwarding device1603. The system1600is configured to implement the method for determining a required bandwidth for a data stream in the foregoing method embodiments. The control device1602may implement functions of the control device in the embodiment shown inFIG.2,FIG.3, orFIG.13. The sending device1601may implement functions of the sending device in the embodiment shown inFIG.3orFIG.13. The forwarding device1603may implement functions of the forwarding device in the embodiments shown inFIG.3andFIG.13. For example, the sending device1601is configured to send a service requirement latency of a data stream or other feature information of the data stream to the control device. The forwarding device1602is configured to send a network device transmission latency and a link transmission latency on a forwarding path of the data stream to the control device. The control device1603is configured to determine, based on the service requirement latency of the data stream and the network device transmission latency and the link transmission latency on the forwarding path of the data stream, a required bandwidth for transmitting the data stream. For a specific execution process, refer to detailed descriptions of corresponding steps in the embodiment shown inFIG.2,FIG.3, orFIG.13. Details are not described herein again.

It should be noted that any apparatus embodiment described above is merely an example. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located at one position, or may be distributed on a plurality of network units. Some or all the modules may be selected according to an actual need to achieve the objectives of the solutions of the embodiments. In addition, in the accompanying drawings of the embodiments of the first network device or the control device provided in this application, connection relationships between the modules indicate that the modules have communication connections with each other, and the communication connection may be further implemented as one or more communications buses or signal lines. A person of ordinary skill in the art may understand and implement the embodiments without creative efforts.

Methods or algorithm steps described in the content disclosed in the embodiments of this application may be implemented by hardware, or may be implemented by a processor by executing software instructions. The software instructions may include a corresponding software module. The software module may be stored in a RAM, a flash memory, a ROM, an erasable programmable ROM (EPROM), an electrically EPROM (EEPROM), a hard disk, a removable hard disk, a compact disc (CD), or any other form of storage medium well-known in the art. For example, a storage medium is coupled to a processor, so that the processor can read information from the storage medium or write information into the storage medium. Certainly, the storage medium may be a component of the processor. The processor and the storage medium may be located in an ASIC. In addition, the ASIC may be located in a core network interface device. Certainly, the processor and the storage medium may exist in the core network interface device as discrete components.

A person skilled in the art should be aware that in the foregoing one or more examples, functions described in this application may be implemented by hardware, software, firmware, or any combination thereof. When the functions are implemented by software, the foregoing functions may be stored in a computer-readable medium or transmitted as one or more instructions or code in the computer-readable medium. The computer-readable medium includes a computer storage medium and a communications medium, where the communications medium includes any medium that enables a computer program to be transmitted from one place to another. The storage medium may be any available medium accessible to a general-purpose or dedicated computer.

The objectives, technical solutions, and beneficial effects of this application are further described in detail in the foregoing specific implementations. It should be understood that the foregoing descriptions are merely specific implementations of this application, but are not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, or the like made based on the technical solutions of this application shall fall within the protection scope of this application.

The foregoing descriptions are merely specific implementations of the present application, but are not intended to limit the protection scope of the present application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present application shall fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.