WO2024114501A1 - 一种数据流调度方法及相关设备 - Google Patents

一种数据流调度方法及相关设备 Download PDF

Info

Publication number
WO2024114501A1
WO2024114501A1 PCT/CN2023/133602 CN2023133602W WO2024114501A1 WO 2024114501 A1 WO2024114501 A1 WO 2024114501A1 CN 2023133602 W CN2023133602 W CN 2023133602W WO 2024114501 A1 WO2024114501 A1 WO 2024114501A1
Authority
WO
WIPO (PCT)
Prior art keywords
queue
data stream
time period
data flow
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/133602
Other languages
English (en)
French (fr)
Inventor
何斌
宋秋斌
袁鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP23896652.7A priority Critical patent/EP4607883A4/en
Publication of WO2024114501A1 publication Critical patent/WO2024114501A1/zh
Priority to US19/222,402 priority patent/US20250293989A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/6295Queue scheduling characterised by scheduling criteria using multiple queues, one for each individual QoS, connection, flow or priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling

Definitions

  • the present application relates to the field of computer technology, and in particular to a data flow scheduling method and related equipment.
  • terminal devices such as mobile phones, tablets, and smart watches
  • cross-device near-field distributed services such as file sharing and screen projection
  • the same device may carry out multiple distributed services at the same time, and these services have different traffic characteristics and priorities.
  • file sharing is characterized by continuous large traffic and is sensitive to bandwidth.
  • Screen projection is characterized by periodic bursts of traffic, which is sensitive to latency and has a relatively higher priority.
  • the present application provides a data stream scheduling method and related equipment, which schedules a second queue according to the transmission characteristics of a first data stream in a first queue to reduce the backlog of a second data stream called out by the second queue in an underlying queue, thereby ensuring low-latency transmission of the first data stream.
  • the first aspect of the embodiment of the present application provides a data stream scheduling method, which can be applied to scenarios where delay-sensitive services and bandwidth-sensitive services are transmitted simultaneously.
  • the method can be executed by a computer device, or by a component of a computer device (such as a processor, a chip, or a chip system, etc.).
  • the method includes: obtaining a first data stream and a second data stream, the priority of the first data stream is higher than the priority of the second data stream; the first data stream is transmitted through a first queue, and the second data stream is transmitted through a second queue; obtaining the transmission characteristics of the first data stream in the first queue, the transmission characteristics are related to the time when the message in the first data stream arrives at the first queue; scheduling the second queue based on the transmission characteristics.
  • the priority of the first data stream is higher than the priority of the second data stream. And in the process of scheduling the second queue, the transmission characteristics of the first data stream in the first queue are considered to reduce the backlog of the second data stream called out by the second queue in the underlying queue.
  • the moment when the first data stream arrives at the first queue is taken into consideration when scheduling the second queue, and the interference of the second service data on the first data stream in the underlying queue can be reduced in advance, thereby ensuring low-latency transmission of the first data stream and the overall bandwidth utilization of the transmission of the first data stream and the second data stream, thereby providing a reasonable data scheduling method.
  • the above-mentioned transmission characteristic is the transmission period of the first data stream; scheduling the second queue based on the transmission characteristic includes: determining a first time period based on the transmission period, the length of the first time period is less than the length of the transmission period, and the first time period is between the times when adjacent messages in the first data stream arrive at the first queue; scheduling the second queue to transmit the second data stream in the first time period.
  • the first time period for the second queue to transmit the second data stream is determined by the transmission period of the first data stream. Since the duration of the first time period is less than the duration of the transmission period, and the first time period is located between the times when adjacent messages in the first data stream arrive at the first queue. That is, the difference between the end time of the first time period and the arrival time of the next message of the first data stream is greater than or equal to the first preset time period.
  • the difference between the end time of the first time period and the arrival time of the next message of the first data stream can be understood as an emptying time period, which is used for the network card queue to discharge the messages of the second data stream, reduce the backlog of the messages of the second data stream in the network card queue, and reduce the impact of the messages of the second data stream on the transmission of the messages in the first data stream, thereby reducing the transmission delay of the first data stream in the bottom queue.
  • the above steps also include: determining the start time of the second queue transmitting the second data stream based on the number of messages in the first queue; scheduling the second queue based on the transmission characteristics, including: scheduling the second queue based on the transmission characteristics and the start time.
  • the start time of the second queue transmitting the second data stream is determined by the number of messages in the first queue, thereby reducing the subsequent backlog of the second data stream in the bottom queue and reducing the delay effect of the second data stream in the bottom queue on the first data stream.
  • the above-mentioned start time is determined according to the number of packets of the first data flow in the first queue.
  • the start time may be the time when the number of packets in the first data flow in the first queue is less than a threshold, or the time when the number of packets in the first data flow in the first queue is less than the threshold plus a period of time.
  • the moment when the number of packets of the first data stream in the above-mentioned first queue is less than a preset threshold is the first moment
  • the size of the first data stream includes at least one of the following: the total number of bytes, the number of packets, etc.
  • the difference between the first moment and the start moment is positively correlated with the size of the first data stream.
  • the size of the first data stream includes at least one of the following: the total number of bytes, the number of messages, etc. For example, the more the number of messages in the first data stream is, the longer the second preset time period is. This allows the bottom queue to have enough time to discharge the first data stream that has entered, thereby reducing the impact of the subsequent second data stream entering the bottom queue on the transmission of the first data stream.
  • scheduling the second queue based on the transmission characteristics and the start time includes: when the second queue is in a sending cycle, scheduling the second queue to transmit the second data stream, and the sending cycle is determined according to the start time and the transmission characteristics.
  • the sending period of the second queue is determined according to the start time and the transmission characteristics. Since the start time is used to determine t and the transmission characteristics are used to determine dt, the second queue can transmit the second data stream at [t, t+dt].
  • the above steps also include: obtaining statistical information related to the network card driver, the statistical information including at least one of the following parameters within a preset time period: the quality of service QoS of the first data stream, the network card utilization rate, the queuing time of the driver queue, etc.; the driver queue is used to receive data from the first queue and the second queue, and the network card driver is connected to the computer device; based on the statistical information, the first time period is updated to obtain the second time period, the second time period is used to ensure that the parameters in the statistical information are within a preset range, and the second time period is used to schedule the second queue.
  • the first time period for the second queue to transmit the second data stream can be dynamically adjusted by using the statistical information at the network card, so as to reversely adjust the transmission time period of the second queue according to the specific situation of the network card transmitting the data stream, thereby reducing the backlog of the second data stream in the network card queue and reducing the transmission delay of the first data stream.
  • the first data flow belongs to a delay-sensitive service
  • the second data flow belongs to a bandwidth-sensitive service
  • the method is applicable to the scenario of simultaneously transmitting delay-sensitive services and bandwidth-sensitive services.
  • the first queue and the second queue are located in the same computer device or different computer devices.
  • the method is applicable both within a computer device and between different computer devices.
  • the second aspect of the embodiment of the present application provides a computer device.
  • the computer device can be applied to scenarios where delay-sensitive services and bandwidth-sensitive services are transmitted simultaneously.
  • the computer device includes: an acquisition unit, used to acquire a first data stream and a second data stream, the priority of the first data stream is higher than the priority of the second data stream; the first data stream is transmitted through a first queue, and the second data stream is transmitted through a second queue; the acquisition unit is also used to acquire the transmission characteristics of the first data stream in the first queue, and the transmission characteristics are related to the time when the message in the first data stream arrives at the first queue; a scheduling unit is used to schedule the second queue based on the transmission characteristics.
  • the above-mentioned transmission feature is a transmission period of the first data stream; a scheduling unit is specifically used to determine a first time period based on the transmission period, the length of the first time period is less than the length of the transmission period, and the first time period is between the times when adjacent messages in the first data stream arrive at the first queue; the scheduling unit is specifically used to schedule the second queue to transmit the second data stream in the first time period.
  • the above-mentioned computer device also includes: a determination unit, which is also used to determine the start time of the second queue transmitting the second data stream based on the number of messages in the first queue; and a scheduling unit, which is specifically used to schedule the second queue based on the transmission characteristics and the start time.
  • the above-mentioned start time is determined according to the number of packets of the first data flow in the first queue.
  • the moment when the number of packets of the first data flow in the first queue is less than a preset threshold is the first moment
  • the difference between the start moment and the first moment is positively correlated with the size of the first data flow
  • the size of the first data flow is positively correlated with the size of the first data flow.
  • the above-mentioned scheduling unit is specifically used to schedule the second queue to transmit the second data stream when the second queue is in a sending cycle, and the sending cycle is determined according to the start time and the transmission characteristics.
  • the above-mentioned acquisition unit is also used to obtain statistical information related to the network card driver, the statistical information includes at least one of the following parameters within a preset time period: the quality of service QoS of the first data stream, the network card utilization rate, the queuing time of the driver queue, etc.; the driver queue is used to receive data from the first queue and the second queue, and the network card driver is connected to the computer device; the computer device also includes: an update unit, which is used to update the first time period based on the statistical information to obtain a second time period, the second time period is used to ensure that the parameters in the statistical information are within a preset range, and the second time period is used to schedule the second queue.
  • the first data flow belongs to a delay-sensitive service
  • the second data flow belongs to a bandwidth-sensitive service
  • the first queue and the second queue are located in the same computer device or different computer devices.
  • a third aspect of the present application provides a computer device, comprising: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the computer device implements the method in the above-mentioned first aspect or any possible implementation of the first aspect.
  • a fourth aspect of the present application provides a computer-readable medium having a computer program or instruction stored thereon.
  • the computer program or instruction When executed on a computer, the computer executes the method in the aforementioned first aspect or any possible implementation of the first aspect.
  • a fifth aspect of the present application provides a computer program product.
  • the computer program product When the computer program product is executed on a computer, it enables the computer to execute the method in the aforementioned first aspect or any possible implementation manner of the first aspect.
  • a sixth aspect of an embodiment of the present application provides a chip system, which includes at least one processor for supporting a computer device to implement the functions involved in the above-mentioned first aspect or any possible implementation method of the first aspect.
  • the chip system may also include a memory for storing program instructions and data necessary for the computer device.
  • the chip system may be composed of a chip, or may include a chip and other discrete devices.
  • the chip system also includes an interface circuit, which provides program instructions and/or data for at least one processor.
  • the technical effects brought about by the second, third, fourth, fifth, and sixth aspects or any possible implementation methods thereof can refer to the technical effects brought about by the first aspect or different possible implementation methods of the first aspect, and will not be repeated here.
  • the present application has the following advantages: by determining a first queue for transmitting a first data stream and a second queue for transmitting a second data stream, the priority of the first data stream is higher than the priority of the second data stream. And the second queue is scheduled based on the transmission characteristics of the first data stream in the first queue to reduce the backlog of the second data stream called out by the second queue in the underlying queue.
  • the moment when the first data stream arrives at the first queue is taken into account when scheduling the second queue, and the interference of the second service data to the first data stream in the underlying queue can be reduced in advance, thereby ensuring low-latency transmission of the first data stream and the overall bandwidth utilization of the transmission of the first data stream and the second data stream, thereby providing a reasonable data scheduling method.
  • FIG1A is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG1B is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG2 is a schematic diagram of different types of service scheduling provided by an embodiment of the present application.
  • FIG3 is another schematic diagram of different types of service scheduling provided by an embodiment of the present application.
  • FIG4 is a schematic diagram of a deployment scenario provided in an embodiment of the present application.
  • FIG5 is another schematic diagram of a deployment scenario provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of a flow chart of a data flow scheduling method provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of a first data stream and a second data stream provided in an embodiment of the present application.
  • FIG8 is another schematic diagram of a first data stream and a second data stream provided in an embodiment of the present application.
  • FIG9 is another schematic diagram of a first data stream and a second data stream provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of scheduling rules for a first data stream and a second data stream provided in an embodiment of the present application
  • FIG11 is a schematic diagram of a process of dynamically updating a first time period according to an embodiment of the present application.
  • FIG12 is another schematic diagram of a process of dynamically updating a first time period provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of a flow chart of calculating the parameters of a traffic model in the deployment scenario shown in FIG5 ;
  • FIG14 is a schematic diagram of a process for issuing scheduling rules in the deployment scenario shown in FIG5 ;
  • FIG15 is a schematic diagram of a scheduling process of a high priority queue provided in an embodiment of the present application.
  • FIG16 is a schematic diagram of a scheduling process of a low priority queue provided in an embodiment of the present application.
  • FIG17 is a schematic diagram of a structure of a computer device provided in an embodiment of the present application.
  • FIG. 18 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application.
  • Near-field distributed services refer to services that interact between multiple devices through near-field communications such as wireless fidelity (WiFi) local area networks, peer-to-peer (P2P) connections, and Bluetooth.
  • WiFi wireless fidelity
  • P2P peer-to-peer
  • Bluetooth Bluetooth
  • Multi-screen collaboration refers to a distributed technology that can achieve cross-system and cross-device collaboration.
  • mobile phones are connected to computers and tablets to achieve resource sharing and collaborative operations.
  • Delay-sensitive tasks refer to services that are sensitive to delay, generally referring to services with higher priority, or large amounts of continuous traffic in a short period of time (i.e., traffic bursts), or services where users have high latency requirements. Examples include screen projection, video/voice calls, game battles, distributed cameras, multi-screen collaboration, live broadcasts, news browsing, online shopping, electronic payments, and QR code scanning.
  • Bandwidth-sensitive tasks refer to services that are sensitive to bandwidth, generally continuous high-traffic services (or throughput services), or services where users have low latency requirements and high transmission volume requirements, such as file sharing, upload/download, application updates, network disks, distributed files, video on demand, etc.
  • delay-sensitive services and bandwidth-sensitive services can be descriptions of different services, or descriptions of the same service (i.e., a service can essentially be both a delay-sensitive service and a bandwidth-sensitive service). If it is a description of the same service, one category can be selected according to actual needs, and no specific limitation is made here.
  • the data flow scheduling method provided in the embodiment of the present application is mainly applied to the scenario where a first computer device and a second computer device perform service transmission.
  • the computer device is a terminal device and the service includes a delay-sensitive service and a bandwidth-sensitive service as an example.
  • the computer device can also be a cloud-side device, such as a server, a virtual machine, etc., and the service can also be of other types, which are not specifically limited here.
  • the terminal devices mentioned above may be mobile terminal devices, such as mobile phones (or “cellular” phones, mobile phones), computers and data cards, for example, portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile devices, which exchange language and/or data with the wireless access network.
  • mobile terminal devices such as mobile phones (or “cellular" phones, mobile phones), computers and data cards, for example, portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile devices, which exchange language and/or data with the wireless access network.
  • PCS personal communication service
  • SIP session initiation protocol
  • WLL wireless local loop
  • PDAs personal digital assistants
  • Pads tablet computers with wireless transceiver functions and other devices.
  • Wireless terminal devices may also be referred to as systems, subscriber units, subscriber stations, mobile stations, mobile stations (MS), remote stations, access points (AP), remote terminal equipment (remote terminal), access terminal equipment (access terminal), user terminal equipment (user terminal), user agent, subscriber station (SS), customer premises equipment (CPE), terminal, user equipment (UE), mobile terminal (MT), drones, vehicles, car machines, smart terminals (such as smart TVs, smart watches, smart glasses, etc.), etc. Terminal devices may also be wearable devices.
  • Equipment and next-generation communication systems for example, terminal equipment in a 5G communication system or terminal equipment in a future evolved public land mobile network (PLMN) or terminal equipment in other communication systems that will be developed in the next step of the 5G communication system.
  • PLMN public land mobile network
  • the number of the second computer device can be one or more. The following description is made by taking the second computer device as one terminal device and two terminal devices as examples.
  • FIG1A a schematic diagram of an application scenario provided by an embodiment of the present application is shown in FIG1A.
  • the application scenario includes a first terminal device 101, a second terminal device 102, and a third terminal device 103.
  • the first terminal device 101 and the second terminal device 102 transmit delay-sensitive services.
  • the first terminal device 101 and the third terminal device 103 transmit bandwidth-sensitive services. That is, the first terminal device 102 transmits different service data to multiple terminal devices (i.e., the second terminal device 102 and the third terminal device 103 in FIG1A).
  • FIG1B a schematic diagram of an application scenario provided by an embodiment of the present application is shown in FIG1B .
  • the application scenario includes a first terminal device 101 and a second terminal device 102.
  • the first terminal device 101 and the second terminal device 102 transmit delay-sensitive services and bandwidth-sensitive services. That is, the first terminal device 102 transmits multiple service data to the same terminal device (i.e., the second terminal device 102 in FIG1B ).
  • the commonly used data flow scheduling method is shown in Figure 3.
  • delay-sensitive high-priority services and low-priority high-throughput services or bandwidth-sensitive low-priority services
  • the messages of the high-priority services enter the high-priority queue
  • the messages of the low-priority services enter the low-priority queue.
  • the absolute priority scheduling rule is adopted to make the messages of the high-priority services go out of the queue first, reducing the queuing delay of the high-priority services. Only when there are no messages in the high-priority queue will the messages in the low-priority queue be scheduled for sending.
  • the queues involved in FIG3 are only in the traffic scheduling shown in FIG4 , that is, the scheduling method shown in FIG3 is only in the queueing discipline (qdisc).
  • qdisc queueing discipline
  • the messages of the two services may enter the same queue or be separated in different queues, but the high-priority message may not have an absolute priority. In this way, the high-priority message that is preferentially scheduled by qdisc will still be affected by the low-priority message that is already queued in the bottom queue.
  • an embodiment of the present application provides a data stream scheduling method which is mainly applied to how the sending end (i.e., the first terminal device 101) schedules the data stream corresponding to the service when transmitting the service to the second terminal device 102 and the third terminal device 103. Specifically, by determining a first queue for transmitting the first data stream and a second queue for transmitting the second data stream, the priority of the first data stream is higher than the priority of the second data stream. And the second queue is scheduled based on the transmission characteristics of the first data stream in the first queue to reduce the backlog of the second data stream called out by the second queue in the underlying queue.
  • the moment when the first data stream arrives at the first queue is taken into account, and the interference of the second service data to the first data stream in the underlying queue can be reduced in advance, thereby ensuring the low-latency transmission of the first data stream and the overall bandwidth utilization of the transmission of the first data stream and the second data stream, thereby providing a reasonable data scheduling method.
  • the deployment scenario is improved on the basis of FIG. 4 to reduce the increase in transmission delay of high priority messages caused by the backlog of low priority messages in the bottom queue.
  • the data flow scheduling method provided in the embodiment of the present application can be included in the operating system software of the computer device and deployed in the program code on the computer device hardware.
  • the computer device includes a user plane, a kernel, and a network card connected to the computer device.
  • the transmission component in the user plane provides a transmission interface for App (such as App1, App2) and can run in the application process.
  • the transmission component encapsulates the transport layer socket and provides a transmission interface (for example, a file transfer interface and a stream transmission interface, etc.) for the data flow of the App.
  • the data stream from the App (for example, the first data stream from App1 and the second data stream from App2) is statistically processed by the traffic model statistics module to obtain statistical results (for example, data stream service type identification, five-tuple of messages in the data stream, frame interval, frame interval standard deviation, average frame size, etc.).
  • the scheduling engine module on the user side determines whether to enable the inter-queue joint scheduling rule (i.e., whether to schedule the second queue according to the transmission characteristics of the first data stream in the first queue) based on the statistical results.
  • the scheduling engine After the scheduling engine determines to enable the inter-queue joint scheduling rule, it sends the priority information of the data stream to the traffic scheduling module (for example, the priority information is used to indicate that the priority of the first data stream is higher than the priority of the second data stream, or to indicate that the first queue is a high priority queue and the second queue is a low priority queue.) and configuration information, the configuration information includes the start time t (or understood as the start time of the second queue sending window) and the time period dt for the second queue to transmit the second data stream.
  • the traffic scheduling module schedules the second queue to open the sending window in the [t, t+dt] time period to transmit the second data stream.
  • the start time t is related to the number of messages of the first data stream in the first queue.
  • the time period dt is related to the transmission characteristics of the first data flow (for example, the transmission period of the first data flow, etc.), and the transmission characteristics can be used to determine the time when the message in the first data flow arrives at the first queue.
  • the scheduling engine module can also call the system interface to obtain the statistical information of the network card driver (for example, the round-trip delay of the first data stream, the jitter of the first data stream, the network card rate, the number of bytes sent, the network card utilization rate, the queuing time of the driver queue, etc.), and update the time period dt according to the statistical information, and use the updated time period dt to schedule the second queue.
  • the statistical information of the network card driver for example, the round-trip delay of the first data stream, the jitter of the first data stream, the network card rate, the number of bytes sent, the network card utilization rate, the queuing time of the driver queue, etc.
  • the sending window of the priority queue (i.e., the second queue) is dynamic and depends on the sending status of the high-priority queue.
  • the sending switch of the low-priority queue is turned on within a period of time after the number of messages in the high-priority queue is less than the threshold, which can reduce the average delay of the high-priority transmission of the first data stream and reduce the jamming and frame drops of the first data stream.
  • the time when the first data stream arrives at the first queue is taken into consideration when scheduling the second queue, which can reduce the interference of the second service data on the first data stream in the underlying queue in advance, thereby ensuring the low-latency transmission of the first data stream and the overall bandwidth utilization of the transmission of the first data stream and the second data stream, thereby providing a reasonable data scheduling method.
  • the data stream scheduling method provided by the embodiment of the present application is described below.
  • the method can be performed by a computer device, or by a component of the computer device (such as a processor, a chip, or a chip system, etc.).
  • the embodiment of the present application is only described exemplarily by taking the computer device as a terminal device as an example. It can be understood that the computer device can also be a server, etc., which is not specifically limited here.
  • the data in the data stream involved in the embodiment of the present application can refer to text, images, audio and video, etc., which are not specifically limited here.
  • Fig. 6 is a flowchart of a data stream scheduling method provided in an embodiment of the present application, which can be applied in the deployment scenario shown in Fig. 5 above, and the method can include steps 601 to 603. Steps 601 to 603 are described in detail below.
  • Step 601 obtaining a first data stream and a second data stream.
  • the computer device to obtain the first data stream and the second data stream, which may be uploaded by the user, obtained from an application (Application, App), or selected from a database, etc., which are not limited here.
  • the priority of the first data stream is higher than the priority of the second data stream.
  • the service types to which the first data stream and the second data stream belong may be the same or different. In the embodiment of the present application, only the example that the services to which the first data stream and the second data stream belong are different is used for exemplary description.
  • the service type to which the data flow belongs can be determined according to the interface number and traffic identification characteristics of the data flow.
  • the traffic identification characteristics include at least one of the following: network card identification, source Internet Protocol (IP) address, destination IP address, source port, destination port, type of service (TOS) field, differentiated services code point (DSCP) field, etc.
  • the DSCP field values corresponding to the first data stream (stream transmission) and the second data stream (file transmission) are different.
  • the DSCP value of the data stream can also be used to distinguish high-priority messages from low-priority messages.
  • the first data stream belongs to a delay-sensitive service, such as screen casting, Bluetooth music, video/voice calls, game battles, distributed cameras, multi-screen collaboration, live broadcast, news browsing, online shopping, electronic payment, QR code scanning, etc.
  • the second data stream belongs to a bandwidth-sensitive service, such as file sharing, data upload/download, application update, network disk, distributed files, video on demand, etc.
  • delay-sensitive services and bandwidth-sensitive services are not limited here.
  • the first data stream is transmitted through the first queue
  • the second data stream is transmitted through the second queue.
  • the computer device determines the first queue and the second queue. It can be determined according to the interface number of the data stream (for example, the number corresponding to the transmission interface provided by the transmission component for different apps) to determine the queue for transmitting the data stream. It can also be determined according to the identifier carried by the data stream.
  • the queue for transmitting the data flow may also be determined according to a special field of a message in the data flow, and the specific details are not limited here.
  • the data in the first queue and the second queue are transmitted outward through the bottom queue (such as the network card queue, etc.).
  • the computer device is preset with a first mapping table as shown in Table 1, and the first mapping table is used to indicate the association between the interface number and the queue.
  • the user plane in the computer device receives the first data stream from App1 through the 1# interface, and receives the second data stream from App1 through the 2# interface.
  • the computer device determines that the queue corresponding to the 1# interface is the first queue through the first mapping table, thereby determining that the queue for transmitting the first data stream is the first queue.
  • the queue for transmitting the second data stream is determined to be the second queue.
  • step 602 is after step 601.
  • the queue for transmitting the first data stream can be determined based on the relevant information of the first data stream (such as the identifier of the data stream or the special field of the message in the data stream, etc.).
  • step 602 is before step 601.
  • the queue can be determined based on the interface number, that is, the queue for transmitting the data stream can be directly determined based on the interface number without identifying the data stream transmitted by the interface number.
  • Step 602 Acquire the transmission characteristics of the first data flow in the first queue.
  • the computer device After the computer device determines the first queue, it can obtain the transmission characteristics of the first data stream in the first queue.
  • the transmission characteristics are related to the time when the message in the first data stream arrives at the first queue. It can also be understood that the transmission characteristics can determine the time when the message in the first data stream arrives at the first queue.
  • the transmission characteristic may be that of adjacent messages in the first data stream (for example, message interval, etc.), or may be that of N adjacent messages in the first data stream, where N is a positive integer greater than 1 and is not specifically limited here.
  • the transmission characteristics may also include the time regularity of each message in the data stream arriving at the first queue (for example, the message interval between the nth message and the n-1th message in the first data stream is 20 milliseconds, and the message interval between the nth message and the n+1th message is 5 milliseconds).
  • Step 603 scheduling the second queue based on the transmission characteristics.
  • the computer device After the computer device obtains the transmission characteristics, it can schedule the second queue based on the transmission characteristics.
  • the computer device may first determine a first time period. And schedule the second queue to transmit the second data stream within the first time period.
  • the duration of the first time period is less than the duration of the transmission period, and the first time period is between the times when adjacent messages in the first data stream arrive at the first queue.
  • the first time period may be understood as dt shown in the aforementioned FIG. 5.
  • the difference between the end time of the first time period and the arrival time of the next message of the first data flow is greater than or equal to the first preset time period.
  • the difference between the end time of the first time period and the arrival time of the next message of the first data flow can be understood as an emptying time period, which is used for the network card queue to discharge the messages of the second data flow, reduce the backlog of the messages of the second data flow in the network card queue, and reduce the transmission of the messages of the second data flow to the messages in the first data flow, thereby reducing the transmission delay of the first data flow in the bottom queue.
  • the bottom queue may be a network card queue, which receives the data stream transmitted from the first queue and the second queue, and transmits the data stream to other devices communicating with the computer device.
  • the computer device can also obtain a start time, which is the time when the second queue starts to transmit the second data stream.
  • the start time can be a preset time, or a time determined based on the number of messages in the first queue, etc., which is not specifically limited here.
  • the time when the number of messages in the first queue is less than the preset threshold (i.e., the first time) and the start time of the second queue transmitting the second data stream differ by a second preset time period.
  • the second preset time period is 0, the time when the number of messages in the first queue is less than the preset threshold is the start time of the second queue transmitting the second data stream.
  • the second preset time period is non-0, the time when the number of messages in the first queue is less than the preset threshold plus the time of the second preset time period is the start time of the second queue transmitting the second data stream.
  • the second queue is scheduled to transmit the second data stream.
  • the sending cycle is based on the start time
  • the transmission period can also be understood as the aforementioned [t, t+dt].
  • the difference between the first moment and the start moment is positively correlated with the size of the first data stream.
  • the size of the first data stream includes at least one of the following: the total number of bytes, the number of messages, etc. For example, the more messages in the first data stream, the longer the second preset time period. This allows the bottom queue to have enough time to discharge the first data stream that has entered, thereby reducing the impact of the second data stream entering the bottom queue on the transmission of the first data stream.
  • Example 1 the transmission process of the first data stream and the second data stream is shown in Figure 7.
  • the horizontal axis represents the time
  • the vertical axis represents the amount of data (for example, the number of messages or the number of bytes, etc.).
  • Each vertical square is used to represent a message or multiple messages.
  • the transmission period of the first data stream is 16 milliseconds (ms), and the first time period is 8ms (less than the transmission period of the first data stream).
  • the start time of the first time period is the moment when the first queue completes the transmission of the first data stream message (that is, the second preset time period is 0ms).
  • the end time of the first time period is 4ms before the next transmission period of the first data stream (that is, the first preset time period is 4ms).
  • the first preset time period can be understood as the aforementioned emptying time period.
  • Example 2 the transmission process of the first data stream and the second data stream is shown in Figure 8.
  • the horizontal axis represents the time
  • the vertical axis represents the data volume (for example, the number of messages or the number of bytes, etc.).
  • the transmission period of the first data stream is 16 milliseconds (ms)
  • the first time period is 8ms (less than the transmission period of the first data stream).
  • the start time of the first time period is the time when the first queue completes the transmission of the first data stream message plus the time of the second preset time period (that is, the second preset time period is 2ms).
  • the end time of the first time period is 2ms before the next transmission period of the first data stream (that is, the first preset time period is 2ms).
  • the first preset time period can be understood as the aforementioned emptying time period.
  • the difference between the above example 1 and example 2 is whether, within a certain period, the second queue is immediately scheduled to transmit the second data stream after the first queue completes the transmission of the first data stream.
  • the second queue is immediately scheduled to transmit the second data stream after the first queue completes the transmission of the first data stream.
  • the second queue is scheduled to transmit the second data stream after an interval of 2ms (i.e., the second preset time period) after the first queue completes the transmission of the first data stream.
  • FIG. 7 and FIG. 8 are only examples.
  • the transmission process of the first data stream and the second data stream may have other situations.
  • the first queue may also be transmitting the message of the first data stream, that is, the first queue and the second queue may have an overlapping time period for transmitting data streams.
  • the specific transmission process of the first data stream and the second data stream is not limited here.
  • the first queue is a priority queue
  • the second queue is a low priority queue.
  • the first queue has two states, namely, a busy state and an idle state.
  • the busy state indicates that there are messages of the first data stream in the first queue that need to be transmitted.
  • the idle state indicates that there are no messages of the first data stream in the first queue or the number of messages of the first data stream in the first queue is less than a preset threshold.
  • the second queue has two states, namely, a sendable state and an unsendable state.
  • the sendable state indicates that the second queue is within the sending cycle [t, t+dt].
  • the unsendable state indicates that the second queue is not within the sending cycle.
  • the first queue will enter the idle state after each message is sent.
  • a new message of the first data stream is detected to come in, it will be switched to the busy state, and a signal will be sent to the second queue, and the second queue will open the sending window until the end of the first time period.
  • the status of the first queue and the second queue in FIG10 is only an example. In actual applications, the status of the first queue and the second queue may have other situations.
  • the status of the second queue may also include an unsendable state, a speed-limited state, a full-speed state, etc.
  • the speed-limited state indicates that the speed at which the second queue transmits messages is less than a preset speed.
  • the full-speed state indicates that the speed at which the second queue transmits messages is the maximum speed supported by the hardware, etc.
  • the high priority message when the queueing discipline (qdisc) is scheduled, the high priority message can be dequeued before the message backlogged in the low priority queue, which can reduce the impact of the low priority service on the high priority to a certain extent.
  • the first time period for the second queue to transmit the second data stream is determined according to the transmission characteristics of the first data stream. The duration of the first time period is less than the duration of the transmission cycle, and the first time period is between the moments when adjacent messages in the first data stream arrive at the first queue.
  • the difference between the end time of the first time period and the arrival time of the next message of the first data stream can be understood as an emptying time period, which is used for the network card queue to discharge the message of the second data stream, reduce the backlog of the message of the second data stream in the network card queue, and reduce the transmission of the message of the second data stream to the message in the first data stream, thereby reducing the transmission delay of the first data stream in the bottom queue.
  • the overall bandwidth utilization rate of the transmission of the first data stream and the second data stream thereby providing a reasonable data scheduling method.
  • the moment when the second queue starts to transmit the second data stream can be determined based on the number of messages in the first queue, thereby reducing the interference of the second data stream in the bottom queue to the first data stream.
  • first queue and the second queue in the embodiment of the present application may be located in the same computer device or in different computer devices.
  • the first time period for the second queue to transmit the second data stream can also be dynamically adjusted by the statistical information at the network card.
  • the specific process is shown in Figure 11.
  • the dynamic adjustment process includes step 1101 and step 1102, which are described below respectively:
  • Step 1101 obtaining statistical information related to the network card driver.
  • the computer device can obtain statistical information related to the network card driver from the network card driver.
  • the statistical information includes at least one of the following parameters within a third preset time period: the quality of service (QoS) of the first data flow, the network card utilization rate, the queuing time of the driver queue, the average sending rate of the network card queue, the average queuing time, etc.
  • QoS quality of service
  • the driver queue is used to receive data from the first queue and the second queue, and the network card driver is connected to the computer device.
  • the queuing time refers to the queuing time of the message in the driver queue
  • the sending rate is the rate at which the driver queue sends the message.
  • the QoS of the first data stream may include at least one of the following: round-trip delay of the message (i.e. the difference between the time when the message is sent and the time when the response message corresponding to the message is received), delay jitter (jitter of round-trip delay of different messages), etc.
  • the acquisition method of at least one of the above parameters can be directly acquired or calculated by acquiring other information.
  • other information may include network card rate and number of bytes sent.
  • the network card utilization rate can be calculated by the network card rate and the number of bytes sent. Specifically, the number of bytes sent is divided by the value obtained by the third preset time period, and then divided by the network card rate to obtain the network card utilization rate.
  • the specific method for obtaining the above statistical information is not limited here.
  • Step 1102 Update the first time period based on the statistical information to obtain a second time period, where the second time period is used to schedule the second queue.
  • the first time period is updated based on the statistical information, and the second time period is used to schedule the second queue.
  • the second time period is used to ensure that the parameters in the statistical information are within a preset range.
  • the parameter is the network card utilization rate, and the preset range may be between 90% and 95%.
  • the parameter is the average queue length of the driver queue, and the preset range may be between 100 and 150 IP packets.
  • the parameter is the average sending rate, and the preset range may be between 80 megabits per second (MB/s) and 90 MB/s.
  • This step can be understood as an adjustment of dt in the aforementioned embodiment. For example, if the network card utilization, the average queue length of the driver queue, or the average sending rate is higher than the target range, dt is reduced, otherwise it is increased.
  • the first time period for the second queue to transmit the second data stream can be dynamically adjusted by the statistical information at the network card, so as to reversely adjust the transmission time period of the second queue according to the specific situation of the network card transmitting the data stream, thereby reducing the backlog of the second data stream in the network card queue and reducing the transmission delay of the first data stream.
  • the embodiment of the present application also provides another specific process for updating the first time period. As shown in FIG12 , the process is implemented after the scheduling strategy is executed, and the process includes steps 1201 to 1206 .
  • Step 1201 The scheduling engine module periodically obtains the channel load from the network card driver.
  • the scheduling engine module periodically obtains the channel load from the network card driver.
  • the channel load is used to indicate the proportion of the busy time of the corresponding channel of the network card driver to the total working time.
  • Step 1202 determine whether the channel load is greater than a first preset value, if so, execute step 1203. If not, execute step 1205.
  • the scheduling engine module determines whether the channel load is greater than the first preset value, and if so, executes step 1203. If not, executes step 1205.
  • Step 1203 determine whether the channel load is less than a second preset value, if so, execute step 1206. If not, execute step 1204.
  • the scheduling engine module determines whether the channel load is greater than the first preset value, it determines whether the channel load is less than the second preset value, and if so, executes step 1206. If not, executes step 1204.
  • the second preset value is greater than or equal to the first preset value.
  • Step 1202 and step 1203 can also be understood as determining whether the channel load obtained by the scheduling engine module is between the first preset value and the second preset value (the second preset value is greater than the first preset value).
  • the first preset value and the second preset value can also be understood as a preset range.
  • Step 1204 increase the size of the openable time window, and the scheduling engine module updates the strategy and sends it to the traffic scheduling module.
  • the open time window of the low priority queue is too short and the open time window size needs to be increased. That is, dt is increased until the channel load is within the preset range. The adjusted dt is sent to the traffic scheduling module.
  • Step 1205 reduce the size of the open time window, and the scheduling engine module updates the strategy and sends it to the traffic scheduling module.
  • the openable time window of the low priority queue is too long, and the openable time window size needs to be reduced. That is, dt is reduced until the channel load is within the preset range. The adjusted dt is sent to the traffic scheduling module.
  • Step 1206 determine whether the service is finished, if so, end the process. If not, re-execute steps 1201 to 1206.
  • the traffic scheduling module determines whether the service data transmission is completed. If so, the process of updating the time window is terminated. If not, steps 1201 to 1206 are repeated until a preset condition is met.
  • the preset condition includes at least one of the following: the number of times the time window is updated reaches a preset value, the service transmission is completed, etc.
  • the network card driver adjusts the openable time window of the low-priority queue in real time according to the ratio of the busy time of the corresponding channel to the total working time and the preset range, thereby reducing in advance the interference of the second business data on the first data stream in the underlying queue, thereby ensuring the low-latency transmission of the first data stream and the overall bandwidth utilization of the transmission of the first data stream and the second data stream, thereby providing a reasonable data scheduling method.
  • a statistical process of the traffic model parameters in the deployment scenario shown in Fig. 5 is performed. As shown in Fig. 13 , the process includes steps 1301 to 1306 .
  • Step 1301 the file sharing service initializes the file transmission interface, and the multi-screen collaboration service initializes the stream transmission interface.
  • Step 1302 The upper layer service calls the sending interface of the transmission component to send data.
  • Step 1301 and step 1302 can be understood as being executed when the upper-layer business uses the transmission component to send business data.
  • the transmission component encapsulates the transport layer socket and provides a file transmission interface and a stream transmission interface for file sharing and multi-screen collaboration, respectively.
  • the transmission interface is initialized for file sharing and multi-screen collaboration services, and the transmission interface of the transmission component is called to send the corresponding business data.
  • Step 1303 determine whether the data is stream transmission. If yes, execute step 1304. If no, execute step 1305.
  • the traffic scheduling module determines whether the service data from the transmission component sending interface is stream data. If the service data is stream data, execute step 1304. If the service data is not stream data, execute step 1305.
  • step 1302 in the embodiment shown in Fig. 13 it can be determined whether the interface transmits stream data according to whether the interface is a file transmission interface or a stream transmission interface, that is, data transmitted using the stream transmission interface is stream data.
  • Step 1304 The traffic model statistics module counts parameters such as frame interval, frame interval jitter, and average frame size.
  • the traffic model statistics module performs statistics on the service data to obtain statistical results, for example, parameters such as frame interval, frame interval jitter (such as frame interval standard deviation), and average frame size.
  • Step 1305 The transmission component synchronizes the service type, DSTP field value, and traffic statistics parameters to the scheduling engine module.
  • the transmission component determines the service type, DSTP field value and traffic statistics parameters of the service data, and synchronizes them to the scheduling engine module, so that the scheduling engine module can input the service data into the corresponding queue for transmission.
  • file transfer and stream transfer use different dscp field values.
  • DSTP is used to distinguish traffic of different types of services.
  • Other fields such as network card identification, source IP address, destination IP address, source port, destination port, type of service (TOS) field, and differentiated services code point (DSCP) can also be used to distinguish traffic of different types of services.
  • TOS type of service
  • DSCP differentiated services code point
  • Step 1306 determine whether the service is terminated. If so, the process of calculating the traffic model parameters is terminated.
  • the traffic scheduling module determines whether the service data transmission is completed. If so, the process of counting traffic model parameters is terminated. If not, steps 1301 to 1306 are repeated until a preset condition is met.
  • the preset condition includes at least one of the following: the duration of counting traffic model parameters reaches a preset duration, the amount of data of the counting traffic model parameters reaches a preset value, the service transmission is completed, etc.
  • a process for collecting information in the embodiments shown in the above-mentioned Figures 5 to 12 is provided.
  • the frame interval of the multi-screen collaboration service is counted to determine the first time period
  • the frame interval jitter is counted to determine whether the scheduling condition is met
  • the average frame size is counted to determine the second preset time period, thereby determining the time interval of the schedulable file sharing service traffic, thereby reducing the impact of the file sharing service on the multi-screen collaboration service, and reducing the delay and jamming of the multi-screen collaboration service.
  • step 604 in the embodiment shown in FIG. 6 includes steps 1401 to 1404 .
  • Step 1401 The scheduling engine module obtains the service type and service statistics information of the service data.
  • the scheduling engine module obtains the service type and service statistics of the service data from the transmission component.
  • Step 1402 determine whether throughput and periodic burst flow exist at the same time. If yes, execute step 1403, if not, do not issue the scheduling rule.
  • the scheduling engine module determines whether there are both throughput and periodic burst flows (or understood as both delay-sensitive services and bandwidth-sensitive services). If yes, execute step 1403. If not, do not issue scheduling rules.
  • Step 1403 determine whether the scheduling condition is met based on the service statistical information. If yes, execute step 1404; if not, do not issue the scheduling rule.
  • the scheduling engine module determines whether the scheduling condition is met based on the service statistics information.
  • the scheduling condition is that the delay-sensitive service has a nearly periodic burst feature.
  • Step 1402 and step 1403 can be understood as: if there are both delay-sensitive services and throughput services, and the delay-sensitive services have approximately periodic burst characteristics, then step 1404 is executed. If not, the scheduling rule is not issued.
  • the scheduling rule includes a scheduling strategy and a preliminary test time window size.
  • Step 1404 The scheduling engine module sends a scheduling policy and an initial time window size to the traffic scheduling module.
  • the scheduling engine module determines that the scheduling conditions are met, the scheduling engine module sends a scheduling strategy and an initial time window size to the traffic scheduling module.
  • the scheduling strategy is used to determine the start time of the low priority queue (i.e., the second queue) transmitting the bandwidth sensitive service (i.e., the second data stream).
  • the initial time window size can be understood as the first time period in the embodiment shown in FIG. 6 above.
  • the traffic scheduling module schedules the low priority queue according to the scheduling strategy and initial time window size issued by the scheduling engine module. Specifically, the traffic scheduling module first determines the transmission time period of the low priority queue according to the start time and the first time period, and schedules the low priority queue to transmit bandwidth-sensitive services within the transmission time period.
  • step 604 in the embodiment shown in FIG. 6 is executed only when the scheduling condition is met. This reduces the defect of reducing the overall transmission bandwidth of the service data due to continuous execution of step 604.
  • the scheduling process of the high priority queue is shown in FIG. 15 , and the process includes steps 1501 to 1506 .
  • Step 1501 determine whether there is a message to be sent in the queue. If yes, execute step 1502. If no, execute step 1505.
  • the traffic scheduling module determines whether there is a message to be sent in the high priority queue. If so, execute step 1502. If not, execute step 1505.
  • Step 1502 sending a message.
  • the message is sent.
  • Step 1503 determine whether the high priority queue is in an idle state. If yes, execute step 1504. If no, return to step 1501.
  • the traffic scheduling module determines whether the high priority queue is in an idle state. If so, execute step 1504. If not, return to step 1501.
  • the idle state indicates that there is no message in the high priority queue, or the number of messages is less than a threshold.
  • Step 1504 set the high priority queue to a busy state, and turn on the sending switch of the low priority queue.
  • the traffic scheduling module determines that the high priority queue is in an idle state, the high priority queue is set to a busy state, and the low priority queue sending switch is turned on.
  • the sending switch can be understood as the start time of the second queue in the embodiment shown in FIG. 6 above.
  • Step 1505 determine whether the burst is over. If so, execute step 1506. If not, return to step 1501.
  • the traffic scheduling module determines whether the burst has ended. If so, execute step 1506. If not, return to step 1501. That is, the traffic scheduling module determines whether the burst of the first data stream has ended.
  • the burst of the first data stream there are multiple ways to determine whether the burst of the first data stream has ended. It can be by adding special processing to the last message of the first data stream (for example, sending a message of length 0 at the end), or it can be by counting the arrival time of the messages, and when there is a period of time (for example, 1ms) when no new messages arrive, the burst is considered to be over. It can also be based on the identification field indicating the last message in the message, etc., which is not limited here.
  • Step 1506 setting the high priority queue to an idle state.
  • the traffic scheduling module determines that the burst of the first data flow ends, the high priority queue is set to an idle state.
  • the scheduling process of the low priority queue is shown in FIG. 16 , and the process includes steps 1601 to 1605 .
  • Step 1601 determine whether there is a message to be sent in the queue. If yes, go to step 1602. If no, go back to step 1601.
  • the traffic scheduling module determines whether there is a message to be sent in the low priority queue. If so, execute step 1602. If not, return to step 1601.
  • Step 1602 determine whether the low priority queue sending switch is on. If yes, execute step 1603. If not, return to step 1601.
  • the traffic scheduling module determines whether there is a message to be sent in the low priority queue, it determines whether the low priority queue sending switch is turned on. If so, execute step 1603. If not, return to step 1601.
  • Step 1603 determine whether the low priority queue sending switch duration exceeds the sending threshold. If yes, execute step 1605. If no, execute step 1604.
  • the traffic scheduling module determines whether the low priority queue sending switch is turned on, it determines whether the low priority queue sending switch duration exceeds the sending threshold. If yes, execute step 1605. If no, execute step 1604.
  • the sending threshold may be the first time period in the embodiment shown in FIG. 6 , or the second time period in the embodiment shown in FIG. 11 , and is not specifically limited here.
  • Step 1604 sending a message.
  • the traffic scheduling module determines that the low priority queue sending switch duration does not exceed the sending threshold (or understood as the low priority queue is within the transmission time period), the low priority queue is scheduled to send the message.
  • Step 1605 turn off the low priority queue sending switch.
  • the traffic scheduling module determines that the low priority queue sending switch duration has exceeded the sending threshold (or understood as the low priority queue is not in the transmission time period)
  • the low priority queue sending switch is turned off, that is, the low priority queue is scheduled not to send messages.
  • Figures 15 and 16 provide a linkage scheduling method for a high-priority queue and a low-priority queue. That is, whether the low-priority queue can send data is determined by the state of its sending switch.
  • the sending switch is turned on after receiving the signal of the high-priority queue, and is closed after the first time period dynamically issued by the upper layer through rules.
  • the start time of the low-priority queue transmission service is determined by whether there is a message in the high-priority queue and the state of the high-priority queue.
  • the low-priority service can be emptied as much as possible in the bottom queue, thereby reducing the transmission delay of the high-priority service.
  • the model processing method in the embodiment of the present application is described above, and the computer device in the embodiment of the present application is described below.
  • the computer device can be a terminal device or a server, etc., which is not specifically limited here.
  • an embodiment of a computer device in the embodiment of the present application includes:
  • the acquisition unit 1701 is used to acquire a first data stream and a second data stream, wherein the priority of the first data stream is higher than the priority of the second data stream; the first data stream is transmitted through a first queue, and the second data stream is transmitted through a second queue;
  • the acquiring unit 1701 is further configured to acquire a transmission characteristic of the first data flow in the first queue, where the transmission characteristic is related to a time when a message in the first data flow arrives at the first queue;
  • the scheduling unit 1702 is used to schedule the second queue based on the transmission characteristics.
  • the acquisition unit 1701 is further used to acquire statistical information related to the network card driver, the statistical information including at least one of the following parameters within a preset time period: the quality of service QoS of the first data stream, the network card utilization rate, and the queuing time of the driver queue; the driver queue is used to receive data from the first queue and the second queue, and the network card driver is connected to the computer device;
  • the computer device further includes: a determining unit 1703, further configured to determine a start time for the second queue to transmit the second data stream based on the number of messages in the first queue;
  • the computer device further includes: an updating unit 1704, configured to update the first time period based on the statistical information to obtain a second time period, wherein the second time period is used to ensure that the parameters in the statistical information are within a preset range, and the second time period is used to schedule the second queue.
  • an updating unit 1704 configured to update the first time period based on the statistical information to obtain a second time period, wherein the second time period is used to ensure that the parameters in the statistical information are within a preset range, and the second time period is used to schedule the second queue.
  • the determining unit 1703 determines a first queue for transmitting a first data stream and a second queue for transmitting a second data stream, and the priority of the first data stream is higher than the priority of the second data stream.
  • the scheduling unit 1702 considers the first queue in the process of scheduling the second queue. The transmission characteristics of the first data stream are used to reduce the backlog of the second data stream called out by the second queue in the bottom queue.
  • the scheduling unit 1702 takes into account the time when the first data stream arrives at the first queue when scheduling the second queue, and can reduce the interference of the second service data on the first data stream in the bottom queue in advance, thereby ensuring the low-latency transmission of the first data stream and the overall bandwidth utilization of the transmission of the first data stream and the second data stream, thereby providing a reasonable data scheduling method.
  • the computer device may include a processor 1801, a memory 1802, and a communication port 1803.
  • the processor 1801, the memory 1802, and the communication port 1803 are interconnected via a line.
  • the memory 1802 stores program instructions and data.
  • the memory 1802 stores program instructions and data corresponding to the steps executed by the computer device in the corresponding implementation modes shown in the aforementioned FIGS. 1A to 16 .
  • the processor 1801 is used to execute the steps performed by a computer device as shown in any of the embodiments shown in Figures 1A to 16 above.
  • the communication port 1803 can be used to receive and send data, and to execute the steps related to acquisition, sending, and receiving in any of the embodiments shown in FIG. 1A to FIG. 16 .
  • the computer device may include more or fewer components than those in FIG. 18 , and this application is merely an illustrative description and is not intended to be limiting.
  • An embodiment of the present application also provides a computer-readable storage medium storing one or more computer-executable instructions.
  • the processor executes a method as a possible implementation method of the computer device in the aforementioned embodiment.
  • An embodiment of the present application also provides a computer program product (or computer program) storing one or more computers.
  • the processor executes the method of the possible implementation mode of the above-mentioned computer device.
  • the embodiment of the present application also provides a chip system, which includes at least one processor for supporting the functions involved in the possible implementation of the above-mentioned computer device.
  • the chip system also includes an interface circuit, which provides program instructions and/or data for at least one processor.
  • the chip system may also include a memory, which is used to store the necessary program instructions and data for the computer device.
  • the chip system can be composed of chips, or it can include chips and other discrete devices.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Landscapes

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

Abstract

本申请实施例公开了一种数据流调度方法,可以应用于同时传输时延敏感业务与带宽敏感业务的场景等。该方法包括:获取第一数据流与第二数据流,第一数据流的优先级高于第二数据流的优先级。第一数据流通过第一队列传输,第二数据流通过第二队列传输;并在调度第二队列的过程中考虑第一队列中第一数据流的传输特征,以减少第二队列调出的第二数据流在底层队列中的积压。换句话说,调度第二队列时考虑到第一数据流到达第一队列的时刻,可以提前减少由于第二业务数据在底层队列中对第一数据流的干扰,从而保证第一数据流的低时延传输,以及传输第一数据流与第二数据流的整体带宽利用率,从而提供一种合理的数据调度方法。

Description

一种数据流调度方法及相关设备
本申请要求于2022年11月30日提交国家知识产权局、申请号为202211528807.3、发明名称为“一种数据流调度方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种数据流调度方法及相关设备。
背景技术
随着终端设备的多样化,例如手机、平板、智能手表等。跨设备近场分布式业务也越来越多。例如,文件分享、投屏等。
目前,同一设备可能同时进行多个分布式业务,这些业务之间具有不同的流量特征和优先级。例如,文件分享的特征是持续的大流量,对带宽敏感。投屏的特征是周期性突发的流量,对时延敏感,优先级相对更高。
因此,在多种业务并发时,如何进行合理调度是亟待解决的技术问题。
发明内容
本申请提供了一种一种数据流调度方法及相关设备,通过第一队列中第一数据流的传输特征调度第二队列,以减少第二队列调出的第二数据流在底层队列中的积压,从而保证第一数据流的低时延传输。
本申请实施例第一方面提供了一种数据流调度方法,该方法可以应用于同时传输时延敏感业务与带宽敏感业务的场景等。该方法可以由计算机设备执行,也可以由计算机设备的部件(例如处理器、芯片、或芯片系统等)执行。该方法包括:获取第一数据流与第二数据流,第一数据流的优先级高于第二数据流的优先级;第一数据流通过第一队列传输,第二数据流通过第二队列传输;获取第一队列中第一数据流的传输特征,传输特征与第一数据流中报文到达第一队列的时刻相关;基于传输特征调度第二队列。
本申请实施例中,通过确定传输第一数据流的第一队列与传输第二数据流的第二队列,第一数据流的优先级高于第二数据流的优先级。并在调度第二队列的过程中考虑第一队列中第一数据流的传输特征,以减少第二队列调出的第二数据流在底层队列中的积压。换句话说,调度第二队列时考虑到第一数据流到达第一队列的时刻,可以提前减少由于第二业务数据在底层队列中对第一数据流的干扰,从而保证第一数据流的低时延传输,以及传输第一数据流与第二数据流的整体带宽利用率,从而提供一种合理的数据调度方法。
可选地,在第一方面的一种可能的实现方式中,上述的传输特征为第一数据流的传输周期;基于传输特征调度第二队列,包括:基于传输周期确定第一时间段,第一时间段的时长小于传输周期的时长,且第一时间段位于第一数据流中相邻报文到达第一队列的时刻之间;调度第二队列在第一时间段传输第二数据流。
该种可能的实现方式中,通过第一数据流的传输周期确定第二队列传输第二数据流的第一时间段,由于第一时间段的时长小于传输周期的时长,且第一时间段位于第一数据流中相邻报文到达第一队列的时刻之间。即第一时间段的结束时刻与第一数据流下次报文的到达时刻的差值大于或等于第一预设时间段。第一时间段的结束时刻与第一数据流下次报文的到达时刻的差值可以理解为是排空时间段,用于网卡队列排出第二数据流的报文,减少第二数据流的报文在网卡队列形成积压,减少第二数据流的报文对第一数据流中报文的传输的影响,从而降低第一数据流在底层队列的传输时延。
可选地,在第一方面的一种可能的实现方式中,上述步骤还包括:基于第一队列中的报文数量确定第二队列传输第二数据流的开始时刻;基于传输特征调度第二队列,包括:基于传输特征与开始时刻调度第二队列。
该种可能的实现方式中,通过第一队列中的报文数量确定第二队列传输第二数据流的开始时刻。从而减少后续在底层队列中第二数据流的积压,减少第二数据流在底层队列中对第一数据流的时延影响。
可选地,在第一方面的一种可能的实现方式中,上述的开始时刻根据第一队列中第一数据流的报文数量确定。
该种可能的实现方式中,该开始时刻可以是第一队列中第一数据流的报文数量小于阈值的时刻,也可以是第一队列中第一数据流的报文数量小于阈值的时刻加上一段时间段后的时刻。
可选地,在第一方面的一种可能的实现方式中,上述第一队列中第一数据流的报文数量小于预设阈值的时刻为第一时刻,开始时刻与第一时刻的差值与第一数据流的大小正相关,第一数据流的大小包括以下至少一项:字节总数、报文数量等。
该种可能的实现方式中,第一时刻与开始时刻的差值与第一数据流的大小正相关。该第一数据流的大小包括以下至少一项:字节总数、报文数量等。例如,第一数据流的报文数量越多,第二预设时间段越大。进而使得底层队列有足够的时间将已进入的第一数据流排出,减少后续第二数据流进入底层队列后对第一数据流的传输带来的影响。
可选地,在第一方面的一种可能的实现方式中,上述步骤:基于传输特征与开始时刻调度第二队列,包括:在第二队列在发送周期的情况下,调度第二队列传输第二数据流,发送周期根据开始时刻与传输特征确定。
该种可能的实现方式中,根据开始时刻与传输特征确定第二队列的发送周期,由于开始时刻用于确定t,传输特征用于确定dt,进而实现第二队列在[t,t+dt]传输第二数据流。
可选地,在第一方面的一种可能的实现方式中,上述步骤还包括:获取与网卡驱动相关的统计信息,统计信息包括预设时间段内的以下至少一项参数:第一数据流的服务质量QoS、网卡利用率、驱动队列的排队时长等;驱动队列用于接收来自第一队列与第二队列的数据,网卡驱动与计算机设备连接;基于统计信息更新第一时间段以得到第二时间段,第二时间段用于保证统计信息中的参数在预设范围内,第二时间段用于调度第二队列。
该种可能的实现方式中,可以通过对网卡处的统计信息对第二队列传输第二数据流的第一时间段进行动态调整。以实现根据网卡传输数据流的具体情况来反向调整第二队列的传输时间段,进而减少网卡队列中第二数据流的积压,并减少第一数据流的传输时延。
可选地,在第一方面的一种可能的实现方式中,上述的第一数据流属于时延敏感业务,第二数据流属于带宽敏感业务。
该种可能的实现方式中,该方法适用于同时传输时延敏感业务与带宽敏感业务的场景。
可选地,在第一方面的一种可能的实现方式中,上述第一队列与第二队列位于同一计算机设备或不同计算机设备。
该种可能的实现方式中,该方法既适用于一个计算机设备内部,又可以适用于不同计算机设备之间。
本申请实施例第二方面提供了一种计算机设备。该计算机设备可以应用于同时传输时延敏感业务与带宽敏感业务的场景等。该计算机设备包括:获取单元,用于获取第一数据流与第二数据流,第一数据流的优先级高于第二数据流的优先级;第一数据流通过第一队列传输,第二数据流通过第二队列传输;获取单元,还用于获取第一队列中第一数据流的传输特征,传输特征与第一数据流中报文到达第一队列的时刻相关;调度单元,用于基于传输特征调度第二队列。
可选地,在第二方面的一种可能的实现方式中,上述的传输特征为第一数据流的传输周期;调度单元,具体用于基于传输周期确定第一时间段,第一时间段的时长小于传输周期的时长,且第一时间段位于第一数据流中相邻报文到达第一队列的时刻之间;调度单元,具体用于调度第二队列在第一时间段传输第二数据流。
可选地,在第二方面的一种可能的实现方式中,上述的计算机设备还包括:确定单元,还用于基于第一队列中的报文数量确定第二队列传输第二数据流的开始时刻;调度单元,具体用于基于传输特征与开始时刻调度第二队列。
可选地,在第二方面的一种可能的实现方式中,上述的开始时刻根据第一队列中第一数据流的报文数量确定。
可选地,在第二方面的一种可能的实现方式中,上述的第一队列中第一数据流的报文数量小于预设阈值的时刻为第一时刻,开始时刻与第一时刻的差值与第一数据流的大小正相关,第一数据流的大小包 括以下至少一项:字节总数、报文数量等。
可选地,在第二方面的一种可能的实现方式中,上述的调度单元,具体用于在第二队列在发送周期的情况下,调度第二队列传输第二数据流,发送周期根据开始时刻与传输特征确定。
可选地,在第二方面的一种可能的实现方式中,上述的获取单元,还用于获取与网卡驱动相关的统计信息,统计信息包括预设时间段内的以下至少一项参数:第一数据流的服务质量QoS、网卡利用率、驱动队列的排队时长等;驱动队列用于接收来自第一队列与第二队列的数据,网卡驱动与计算机设备连接;计算机设备还包括:更新单元,用于基于统计信息更新第一时间段以得到第二时间段,第二时间段用于保证统计信息中的参数在预设范围内,第二时间段用于调度第二队列。
可选地,在第二方面的一种可能的实现方式中,上述的第一数据流属于时延敏感业务,第二数据流属于带宽敏感业务。
可选地,在第二方面的一种可能的实现方式中,上述的第一队列与第二队列位于同一计算机设备或不同计算机设备。
本申请第三方面提供了一种计算机设备,包括:处理器,处理器与存储器耦合,存储器用于存储程序或指令,当程序或指令被处理器执行时,使得该计算机设备实现上述第一方面或第一方面的任意可能的实现方式中的方法。
本申请第四方面提供了一种计算机可读介质,其上存储有计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行前述第一方面或第一方面的任意可能的实现方式中的方法。
本申请第五方面提供了一种计算机程序产品,该计算机程序产品在计算机上执行时,使得计算机执行前述第一方面或第一方面的任意可能的实现方式中的方法。
本申请实施例第六方面提供了一种芯片系统,该芯片系统包括至少一个处理器,用于支持计算机设备实现上述第一方面或第一方面任意一种可能的实现方式中所涉及的功能。
在一种可能的设计中,该芯片系统还可以包括存储器,存储器,用于保存该计算机设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。可选的,芯片系统还包括接口电路,接口电路为至少一个处理器提供程序指令和/或数据。
其中,第二、第三、第四、第五、第六方面或者其中任一种可能实现方式所带来的技术效果可参见第一方面或第一方面不同可能实现方式所带来的技术效果,此处不再赘述。
从以上技术方案可以看出,本申请具有以下优点:通过确定传输第一数据流的第一队列与传输第二数据流的第二队列,第一数据流的优先级高于第二数据流的优先级。并基于第一队列中第一数据流的传输特征调度第二队列,以减少第二队列调出的第二数据流在底层队列中的积压。换句话说,调度第二队列时考虑到第一数据流到达第一队列的时刻,可以提前减少由于第二业务数据在底层队列中对第一数据流的干扰,从而保证第一数据流的低时延传输,以及传输第一数据流与第二数据流的整体带宽利用率,从而提供一种合理的数据调度方法。
附图说明
图1A为本申请实施例提供的应用场景示意图;
图1B为本申请实施例提供的另一应用场景示意图;
图2为本申请实施例提供的不同类型业务调度的示意图;
图3为本申请实施例提供的不同类型业务调度的另一示意图;
图4为本申请实施例提供的部署场景的示意图;
图5为本申请实施例提供的部署场景的另一示意图;
图6为本申请实施例提供的数据流调度方法的流程示意图;
图7为本申请实施例提供的第一数据流与第二数据流的示意图;
图8为本申请实施例提供的第一数据流与第二数据流的另一示意图;
图9为本申请实施例提供的第一数据流与第二数据流的另一示意图;
图10为本申请实施例提供的第一数据流与第二数据流的调度规则示意图;
图11为本申请实施例提供的动态更新第一时间段的流程示意图;
图12为本申请实施例提供的动态更新第一时间段的另一流程示意图;
图13为图5所示部署场景下统计流量模型参数的流程示意图;
图14为图5所示部署场景下下发调度规则的流程示意图;
图15为本申请实施例提供的高优先级队列的调度流程示意图;
图16为本申请实施例提供的低优先级队列的调度流程示意图;
图17本申请实施例提供的计算机设备的一个结构示意图;
图18为本申请实施例提供的计算机设备的一个结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
首先,对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。
1、近场分布式业务
近场分布式业务是指多个设备间通过无线保真(wireless fidelity,WiFi)局域网、对等网络(peer-to-peer,P2P)连接、蓝牙等近场通信进行交互的业务。
2、多屏协同
多屏协同是指一种分布式技术,可以实现跨系统、跨设备协同。例如,手机与电脑、平板连接,以实现资源共享、协同操作等。
3、时延敏感任务与带宽敏感任务
时延敏感任务是指对时延较敏感的业务,一般指优先级较高的业务,或者短时间内连续的大量流量(即流量突发),或者是用户对时延需求较高需求的业务。例如投屏、视频/语音通话、游戏对战、分布式相机、多屏协同、直播、新闻浏览、网上购物、电子支付、扫二维码等业务。
带宽敏感任务是指对带宽较敏感的业务,一般是持续的大流量业务(或称为吞吐型业务),或者是用户对时延需求较低、传输量需求较高的业务。例如文件分享、上传/下载、应用更新、网盘、分布式文件、视频点播等业务。
可以理解的是,时延敏感业务和带宽敏感业务可以是对不同业务的描述,也可以是对同一业务的描述(即一个业务本质上可以即是时延敏感业务,又是带宽敏感业务)。如果是对同一业务的描述,可以根据实际需要择一分类,具体此处不做限定。
首先,对本申请实施例提供的方法所适用的应用场景进行简单介绍。
本申请实施例提供的数据流调度方法主要应用于第一计算机设备与第二计算机设备而进行业务传输的场景。为了方便描述,后续以计算机设备是终端设备,业务包括时延敏感业务与带宽敏感为例进行示例性描述,可以理解的是,在实际应用中,计算机设备还可以是云侧设备,如服务器、虚拟机等,业务还可以有其他类型,具体此处不做限定。
上述的终端设备可以是移动终端设备,如移动电话(或称为“蜂窝”电话,手机(mobile phone))、计算机和数据卡,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(personal communication service,PCS)电话、无绳电话、会话发起协议(SIP)话机、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、平板电脑(Pad)、带无线收发功能的电脑等设备。无线终端设备也可以称为系统、订户单元(subscriber unit)、订户站(subscriber station),移动站(mobile station)、移动台(mobile station,MS)、远程站(remote station)、接入点(access point,AP)、远程终端设备(remote terminal)、接入终端设备(access terminal)、用户终端设备(user terminal)、用户代理(user agent)、用户站(subscriber station,SS)、用户端设备(customer premises equipment,CPE)、终端(terminal)、用户设备(user equipment,UE)、移动终端(mobile terminal,MT)、无人机、车辆、车机、智能终端(例如智能电视、智能手表、智能眼镜等)等。终端设备也可以是可穿戴设 备以及下一代通信系统,例如,5G通信系统中的终端设备或者未来演进的公共陆地移动网络(public land mobile network,PLMN)中的终端设备或者5G通信系统下一步发展的其他通信系统中的终端设备等。
另外,上述第二计算机设备的数量可以是一个或多个。下面以第二计算机设备是一个终端设备与两个终端设备为例进行描述。
在一种可能实现的方式中,本申请实施例提供的一种应用场景示意图如图1A所示。该应用场景包括第一终端设备101、第二终端设备102以及第三终端设备103。其中,第一终端设备101与第二终端设备102传输时延敏感业务。第一终端设备101与第三终端设备103传输带宽敏感业务。即第一终端设备102向多个终端设备(即图1A中的第二终端设备102与第三终端设备103)分别传输不同的业务数据。
在另一种可能实现的方式中,本申请实施例提供的一种应用场景示意图如图1B所示。该应用场景包括第一终端设备101与第二终端设备102。其中,第一终端设备101与第二终端设备102传输时延敏感业务与带宽敏感业务。即第一终端设备102向同一终端设备(即图1B中的第二终端设备102)传输多个业务数据。
在图1A或图1B所示的应用场景中,由于网络资源时有限的,流量调度需要根据各种业务的特点来对网络资源进行合理的规划和分配,从而使网络资源得到高效利用。如图2所示,不同类型的数据流入队到不同的队列缓存,通过在出队时对队列进行调度,控制出队的速率和顺序,可以保障某些高优先级业务的服务质量。
目前,常用的数据流调度方法如图3所示,当时延敏感的高优先级业务和低优先级的高吞吐业务(或者带宽敏感的低优先级业务)并发时,高优先级业务的报文进入高优先级队列,低优先级业务的报文进入低优先级队列。在调度时采用绝对优先级的调度规则,让高优先级业务的报文先出队,减少高优先级业务的排队时延,只有高优先级队列中没有报文时才调度低优先级队列中的报文发送。
然而,在Linux操作系统的场景中(如图4所示),上述图3所涉及的队列只是在图4所示的流量调度中,即图3所示的调度方法只是在队列规则(queueing discipline,qdisc)中。从图4可以看出,数据流的报文在经过qdisc调度之后到实际从网卡发出去,还要经过多级队列,在底层队列(例如图4中的驱动队列和网卡队列)两种业务的报文可能进入同一个队列排队或者分开在不同的队列上但高优先级的报文不一定具有绝对优先级。这样,从qdisc优先调度的高优先级报文仍然会受已经在底层队列排队的低优先级报文影响。
因此,图3所示的调度方法在图4所示的场景中,如何减少由于底层队列中低优先级报文的积压导致的高优先级报文的传输时延增加是亟待解决的技术问题。
为了解决上述问题,本申请实施例提供一种数据流调度方法主要应用于发送端(即第一终端设备101)在向第二终端设备102与第三终端设备103传输业务时如何调度业务对应的数据流。具体的,通过确定传输第一数据流的第一队列与传输第二数据流的第二队列,第一数据流的优先级高于第二数据流的优先级。并基于第一队列中第一数据流的传输特征调度第二队列,以减少第二队列调出的第二数据流在底层队列中的积压。换句话说,调度第二队列时考虑到第一数据流到达第一队列的时刻,可以提前减少由于第二业务数据在底层队列中对第一数据流的干扰,从而保证第一数据流的低时延传输,以及传输第一数据流与第二数据流的整体带宽利用率,从而提供一种合理的数据调度方法。
在对本申请实施例提供的数据流调度方法描述之前,先对本申请实施例提供的部署场景进行描述。该部署场景在图4的基础上进行改进,以减少由于底层队列中低优先级报文的积压导致的高优先级报文的传输时延增加。
如图5所示,本申请实施例提供的数据流调度方法可以包含在计算机设备的操作系统软件中,并部署在计算机设备硬件上的程序代码。其中,该计算机设备包括用户面、内核、以及与计算机设备连接的网卡。用户面中的传输组件为App(例如App1、App2)提供传输接口,可以运行在应用进程中。传输组件对传输层套接字进行封装,并为App的数据流提供传输接口(例如,文件传输接口与流传输接口等)。 在传输组件内部,通过流量模型统计模块对来自App的数据流(例如,来自App1的第一数据流与来自App2的第二数据流)进行统计处理得到统计结果(例如,数据流的业务类型识别、数据流中报文的五元组、帧间隔、帧间隔标准差、平均帧大小等)。用户面的调度引擎模块根据统计结果确定是否开启队列间联合调度规则(即是否根据第一队列中第一数据流的传输特征调度第二队列)。调度引擎确定开启队列间联合调度规则之后,向流量调度模块发送数据流的优先级信息(例如,该优先级信息用于指示第一数据流的优先级高于第二数据流的优先级,或者指示第一队列为高优先级队列,第二队列为低优先级队列。)与配置信息,该配置信息包括第二队列传输第二数据流的开始时刻t(或者理解为第二队列发送窗口的开始时刻)与时间段dt。从而流量调度模块调度第二队列在[t,t+dt]时间段内开启发送窗口,对第二数据流进行传输。其中,开始时刻t与第一队列中第一数据流的报文数量相关。时间段dt与第一数据流的传输特征(例如,第一数据流的传输周期等)相关,该传输特征可以用于确定第一数据流中报文到达第一队列的时刻。
另外,调度引擎模块还可以调用系统接口获取网卡驱动的统计信息(例如,第一数据流的往返时延、第一数据流的抖动、网卡速率、发送字节数、网卡利用率、驱动队列的排队时长等)。并根据该统计信息更新时间段dt,并使用更新后的时间段dt调度第二队列。
可以看出,优先级队列(即第二队列)的发送窗口是动态的,取决于高优先级队列的发送情况,低优先级队列的发送开关在高优先级队列中报文数量小于阈值后的一段时间内打开,可以降低高优先级传输第一数据流的平均时延,减少第一数据流的卡顿和掉帧。换句话说调度第二队列时考虑到第一数据流到达第一队列的时刻,可以提前减少由于第二业务数据在底层队列中对第一数据流的干扰,从而保证第一数据流的低时延传输,以及传输第一数据流与第二数据流的整体带宽利用率,从而提供一种合理的数据调度方法。
下面对本申请实施例提供的数据流调度方法进行描述。该方法可以由计算机设备执行,也可以由计算机设备的部件(例如处理器、芯片、或芯片系统等)执行。本申请实施例仅以计算机设备是终端设备为例进行示例性描述,可以理解的是,该计算机设备还可以是服务器等,具体此处不做限定。另外,本申请实施例所涉及的数据流中的数据可以是指文本、图像、音视频等具体此处不做限定。
请参阅图6,本申请实施例提供的数据流调度方法的一个流程示意图,可以应用在前述图5所示的部署场景中,该方法可以包括步骤601至步骤603。下面对步骤601至步骤603进行详细说明。
步骤601,获取第一数据流与第二数据流。
本申请实施例中,计算机设备获取第一数据流与第二数据流的方式有多种方式,可以是通过用户上传的方式,也可以是从应用程序(Application,App)处获取的方式,还可以是从数据库中选取的方式等,具体此处不做限定。其中,第一数据流的优先级高于第二数据流的优先级。
另外,第一数据流与第二数据流所属的业务类型可以相同或不同。本申请实施例中仅以第一数据流与第二数据流的所属业务不同为例进行示例性描述。
可选地,数据流所属的业务类型可以根据数据流的接口编号、流量识别特征所确定。该流量识别特征包括以下至少一项:网卡标识、源网际互连协议(Internet Protocol,IP)地址、目的IP地址、源端口、目的端口、服务类型(type of service,TOS)字段、差分服务代码点(differentiated services code point,DSCP)字段等。
可选地,第一数据流(流传输)与第二数据流(文件传输)对应的DSCP字段值不同。数据流的DSCP值也可以用于区分高优先级报文与低优先级报文。
可选地,第一数据流属于时延敏感业务,例如,投屏、蓝牙音乐、视频/语音通话、游戏对战、分布式相机、多屏协同、直播、新闻浏览、网上购物、电子支付、扫二维码等。第二数据流属于带宽敏感业务,例如,文件分享、数据上传/下载、应用更新、网盘、分布式文件、视频点播等。在实际应用中,时延敏感业务与带宽敏感业务还可以有其他示例,具体此处不做限定。
本步骤中的第一数据流通过第一队列进行传输,第二数据流通过第二队列进行传输。另外,计算机设备确定第一队列与第二队列的方式有多种。可以是根据数据流的接口编号(例如,传输组件为不同App提供的传输接口对应的编号)确定传输该数据流的队列。也可以是根据数据流携带的标识确定传输该数 据流的队列。还可以是根据数据流中报文的特殊字段确定传输该数据流的队列等,具体此处不做限定。
其中,第一队列与第二队列中的数据通过底层队列(例如网卡队列等)向外传输。
示例性的,计算机设备预设有如表1所示的第一映射表,该第一映射表用于表示接口编号与队列的关联关系。假设前述步骤601中,计算机设备中的用户面通过1#接口接收来自App1的第一数据流,通过2#接口接收来自App1的第二数据流。本步骤中。计算机设备通过第一映射表确定1#接口对应的队列为第一队列,从而确定传输第一数据流的队列为第一队列。同理,确定传输第二数据流的队列为第二队列。
表1
可以理解的是,通过数据流携带的标识或数据流中报文的特殊字段确定队列的方式与前述表1对应的举例类似,具体此处不再赘述。
另外,本申请实施例对于步骤601与步骤601的时序关系不做限定。例如,步骤602在步骤601之后。该示例下,步骤602中可以根据第一数据流的相关信息(例如数据流的标识或数据流中报文的特殊字段等)确定传输第一数据流的队列。又例如,步骤602在步骤601之前。该示例下,步骤602中可以根据接口编号确定队列,即可以不用识别该接口编号所传输的数据流,直接根据接口编号确定传输数据流的队列。
步骤602,获取第一队列中第一数据流的传输特征。
计算机设备确定第一队列之后,可以获取第一队列中第一数据流的传输特征。该传输特征与第一数据流中报文到达第一队列的时刻相关。也可以理解为,该传输特征可以确定第一数据流中的报文到达第一队列的时刻。
可选地,该传输特征可以是第一数据流中相邻报文的(例如,报文间隔等),还可以是针对第一数据流中相邻N个报文的等,N为大于1的正整数,具体此处不做限定。
可以理解的是,对于没有固定传输周期的第一数据流,该传输特征也可以包括数据流中各报文到达第一队列的时刻规律(例如,第一数据流中的第n个报文与第n-1个报文之间的报文间隔是20毫秒,第n个报文与第n+1个报文之间的报文间隔是5毫秒)。
步骤603,基于传输特征调度第二队列。
计算机设备获取传输特征之后,可以基于该传输特征调度第二队列。
可选地,以传输特征是第一数据流的传输周期为例,计算机设备可以先确定第一时间段。并调度第二队列在第一时间段内传输第二数据流。该第一时间段的时长小于传输周期的时长,且第一时间段位于第一数据流中相邻报文到达第一队列的时刻之间。该第一时间段可以理解为是前述图5所示中的dt。
其中,第一时间段的结束时刻与第一数据流下次报文的到达时刻的差值大于或等于第一预设时间段。第一时间段的结束时刻与第一数据流下次报文的到达时刻的差值可以理解为是排空时间段,用于网卡队列排出第二数据流的报文,减少第二数据流的报文在网卡队列形成积压,减少第二数据流的报文对第一数据流中报文的传输,从而降低第一数据流在底层队列的传输时延。
可选地,底层队列可以是网卡队列,该底层队列接收来自第一队列与第二队列传输的数据流,并将数据流传输给与计算机设备通信的其他设备。
另外,计算机设备还可以获取开始时刻,该开始时刻为第二队列开始传输第二数据流的时刻。该开始时刻可以是预设时刻,也可以是基于第一队列中报文数量所确定的时刻等,具体此处不做限定。其中,第一队列中的报文数量小于预设阈值的时刻(即第一时刻)与第二队列传输第二数据流的开始时刻之间相差第二预设时间段。例如,在第二预设时间段为0的情况下,第一队列中的报文数量小于预设阈值的时刻为第二队列传输第二数据流的开始时刻。又例如,在第二预设时间段为非0的情况下,第一队列中的报文数量小于预设阈值的时刻加上第二预设时间段的时刻为第二队列传输第二数据流的开始时刻。
可选地,在第二队列的发送周期的情况下,调度第二队列传输第二数据流。该发送周期根据开始时 刻与传输特征(或第一时间段)确定。该发送周期也可以理解为是前述的[t,t+dt]。
可选地,第一时刻与开始时刻的差值(即第二预设时间段)与第一数据流的大小正相关。该第一数据流的大小包括以下至少一项:字节总数、报文数量等。例如,第一数据流的报文数量越多,第二预设时间段越大。进而使得底层队列有足够的时间将已进入的第一数据流排出,减少第二数据流进入底层队列后对第一数据流的传输带来的影响。
示例1,第一数据流与第二数据流的传输过程如图7所示。其中,横坐标表示时刻,纵坐标表示数据量(例如,报文数量或字节数量等)。每一个竖的方块用于表示一个报文或多个报文。第一数据流的传输周期为16毫秒(ms),第一时间段为8ms(小于第一数据流的传输周期)。以图7中第一数据流的第一个传输周期为例,可以看出,第一时间段的开始时刻为第一队列传输完第一数据流报文的时刻(即第二预设时间段为0ms)。第一时间段的结束时刻与第一数据流的下一传输周期之前相隔4ms(即第一预设时间段为4ms)。该第一预设时间段可以理解为前述的排空时间段。
示例2,第一数据流与第二数据流的传输过程如图8所示。其中,横坐标表示时刻,纵坐标表示数据量(例如,报文数量或字节数量等)。第一数据流的传输周期为16毫秒(ms),第一时间段为8ms(小于第一数据流的传输周期)。以图8中第一数据流的第一个传输周期为例,可以看出,第一时间段的开始时刻为第一队列传输完第一数据流报文的时刻加上第二预设时间段的时刻(即第二预设时间段为2ms)。第一时间段的结束时刻与第一数据流的下一传输周期之前相隔2ms(即第一预设时间段为2ms)。该第一预设时间段可以理解为前述的排空时间段。
上述示例1与示例2的区别在于,在某一周期内,第一队列传输完第一数据流的报文之后是否立刻调度第二队列传输第二数据流。示例1的情况为第一队列传输完第一数据流的报文之后立刻调度第二队列传输第二数据流。示例2的情况为第一队列传输完第一数据流的报文之后间隔2ms(即第二预设时间段)再调度第二队列传输第二数据流。
可以理解的是,前述图7与图8只是举例,在实际应用中,第一数据流与第二数据流的传输过程还可以有其他情况。例如,如图9所示,第二队列传输第二数据流的开始时刻,第一队列还可以在传输第一数据流的报文,即第一队列与第二队列可以有传输数据流的重叠时间段。对于第一数据流与第二数据流的具体传输过程此处不做限定。
示例性的,具体的调度过程可以如图10所示。第一队列为优先级队列,第二队列为低优先队列。第一队列有两种状态,分别为忙时状态与闲时状态。忙时状态表示第一队列中有第一数据流的报文需要传输。闲时状态表示第一队列中没有第一数据流的报文或者第一队列中第一数据流的报文数量小于预设阈值。第二队列有两种状态,分别为可发送状态与不可发送状态。可发送状态表示第二队列在发送周期[t,t+dt]内。不可发送状态表示第二队列不在发送周期内。由图10可以看出,第一队列中每次报文发送结束后会进入闲时状态,当检测到有新的第一数据流的报文进来时转为忙时状态,并发送信号给第二队列,第二队列开启发送窗口持续第一时间段结束。
可以理解的是,图10中第一队列与第二队列的状态情况只是举例,在实际应用中,第一队列与第二队列的状态还可以有其他的情况。例如,第二队列的状态还可以包括不可发送状态、限速状态、全速状态等,限速状态表示第二队列传输报文的速度小于预设速度。全速状态表示第二队列传输报文的速度为硬件所支持的最大速度等。
本申请实施例中,一方面,能够在队列规则(queueing discipline,qdisc)调度时使高优先级报文比积压在低优先级队列中的报文先出队,能够一定程度上减少低优先级业务对高优先级的影响。具体的,根据第一数据流的传输特征确定第二队列传输第二数据流的第一时间段。该第一时间段的时长小于传输周期的时长,且第一时间段位于第一数据流中相邻报文到达第一队列的时刻之间。即第一时间段的结束时刻与第一数据流下次报文的到达时刻的差值可以理解为是排空时间段,用于网卡队列排出第二数据流的报文,减少第二数据流的报文在网卡队列形成积压,减少第二数据流的报文对第一数据流中报文的传输,从而降低第一数据流在底层队列的传输时延。以及传输第一数据流与第二数据流的整体带宽利用率,从而提供一种合理的数据调度方法。另一方面,第二队列开始传输第二数据流的时刻可以是基于第一队列中报文数量所确定,进而减少底层队列中第二数据流对第一数据流的干扰。
另外,本申请实施例中的第一队列与第二队列可以位于同一计算机设备或不同计算机设备。
进一步的,由于数据流的传输是动态的,可能会受网络原因等其他因素影响。因此,还可以通过对网卡处的统计信息对第二队列传输第二数据流的第一时间段进行动态调整。具体流程如图11所示。动态调整过程包括步骤1101与步骤1102,下面分别进行描述:
步骤1101,获取与网卡驱动相关的统计信息。
计算机设备可以从网卡驱动处获取与网卡驱动相关的统计信息。该统计信息包括第三预设时间段内的以下至少一项参数:第一数据流的服务质量(quality of service,QoS)、网卡利用率、驱动队列的排队时长、网卡队列的平均发送速率、平均排队时长等。该驱动队列用于接收来自第一队列与第二队列的数据,网卡驱动与计算机设备连接。其中,排队时长指的是报文在驱动队列中的排队时长,发送速率是驱动队列发送报文的速率。
其中,第一数据流的QoS可以包括以下至少一项:报文的往返时延(即发送报文的时刻与接收到该报文对应的响应报文时刻的差值)、时延抖动(不同报文往返时延的抖动)等。
另外,关于上述至少一项参数的获取方式可以是直接获取,也可以通过获取其他信息计算得到。例如,其他信息可以包括网卡速率与发送字节数。通过网卡速率与发送字节数可以计算网卡利用率。具体的,发送字节数除以第三预设时间段得到的值,再除以网卡速率得到网卡利用率。对于上述统计信息的具体获取方式此处不做限定。
步骤1102,基于统计信息更新第一时间段以得到第二时间段,第二时间段用于调度第二队列。
计算机设备获取与网卡驱动相关的统计信息之后,基于该统计信息更新第一时间段,第二时间段用于调度第二队列。第二时间段用于保证统计信息中的参数在预设范围内。
示例性的,参数是网卡利用率的情况,该预设范围可以是90%-95%之间。参数是驱动队列平均排队长度的情况,该预设范围可以是100-150个IP分组之间。参数是平均发送速率的情况,该预设范围可以是80兆比特每秒(MB/s)-90MB/s之间。
本步骤可以理解为是对前述实施例中dt的调整,例如,如果网卡利用率、驱动队列平均排队长度或者平均发送速率高于目标范围,则调小dt,反之则调大。
本申请实施例中,可以通过对网卡处的统计信息对第二队列传输第二数据流的第一时间段进行动态调整。以实现根据网卡传输数据流的具体情况来反向调整第二队列的传输时间段,进而减少网卡队列中第二数据流的积压,并减少第一数据流的传输时延。
可选地,本申请实施例还提供另外一种更新第一时间段的具体过程。如图12所示,该过程在调度策略执行后实施,该过程包括步骤1201至步骤1206。
步骤1201,调度引擎模块定期从网卡驱动处获取信道负载。
调度引擎模块定期从网卡驱动处获取信道负载。信道负载用于指示网卡驱动对应信道繁忙时间占总工作时间的比例。
步骤1202,判断信道负载是否大于第一预设值,若是,执行步骤1203。若否,执行步骤1205。
调度引擎模块获取信道负载之后,判断信道负载是否大于第一预设值,若是,执行步骤1203。若否,执行步骤1205。
步骤1203,判断信道负载是否小于第二预设值,若是,执行步骤1206。若否,执行步骤1204。
在调度引擎模块确定信道负载大于第一预设值的情况下,判断信道负载是否小于第二预设值,若是,执行步骤1206。若否,执行步骤1204。第二预设值大于或等于第一预设值。
步骤1202与步骤1203也可以理解为用于判断调度引擎模块获取的信道负载是否在第一预设值与第二预设值之间(第二预设值大于第一预设值)。该第一预设值与第二预设值之间也可以理解为是预设范围。
步骤1204,增加可开启时间窗大小,调度引擎模块更新策略下发给流量调度模块。
若确定信道负载大于或等于第二预设值,说明低优先级队列的可开启时间窗过短,需要增加可开启时间窗大小。即调大dt直至信道负载在预设范围内。并将调整后的dt下发给流量调度模块。
步骤1205,减少可开启时间窗大小,调度引擎模块更新策略下发给流量调度模块。
若确定信道负载小于或等于第一预设值,说明低优先级队列的可开启时间窗过长,需要减少可开启时间窗大小。即调小dt直至信道负载在预设范围内。并将调整后的dt下发给流量调度模块。
步骤1206,判断业务是否结束,若是,结束流程。若否,重新执行步骤1201至步骤1206。
流量调度模块判断业务数据是否传输结束。若是,结束更新时间窗的过程。若否,重复执行步骤1201至步骤1206,直至满足预设条件。该预设条件包括以下至少一项:更新时间窗的次数达到预设值、业务传输结束等。
本实施例中,通过网卡驱动对应信道繁忙时间占总工作时间的比例与预设范围对低优先级队列的可开启时间窗进行实时调整,从而提前减少由于第二业务数据在底层队列中对第一数据流的干扰,从而保证第一数据流的低时延传输,以及传输第一数据流与第二数据流的整体带宽利用率,从而提供一种合理的数据调度方法。
接下来以第一数据流为多屏协同业务,第二数据流为文件分享业务为例,结合附图对于前述图6应用在图5所示部署场景下的具体流程进行详细描述。
首先,对图5所示部署场景中流量模型参数的统计过程。如图13所示,该过程包括步骤1301至步骤1306。
步骤1301,文件分享业务初始化文件传输接口,多屏协同业务初始化流传输接口。
步骤1302,上层业务调用传输组件的发送接口发送数据。
步骤1301与步骤1302可以理解为,上层业务使用传输组件发送业务数据时执行。传输组件封装传输层套接字,给文件分享和多屏协同分别提供了文件传输接口和流传输接口。在进行文件分享与多屏协同业务分别初始化传输接口,并调用传输组件的发送接口发送相应业务数据。
步骤1303,判断数据是否为流传输。若是,执行步骤1304。若否,执行步骤1305。
进一步的,流量调度模块确定来自传输组件发送接口的业务数据是否为流数据。若该业务数据是流数据,执行步骤1304。若该业务数据不是流数据,执行步骤1305。
可选地,如前述图13所示实施例中步骤1302的描述,可以根据接口是文件传输接口还是流传输接口来确定该接口传输的是否为流数据。即使用流传输接口传输的数据为流数据。
步骤1304,流量模型统计模块统计帧间隔、帧间隔抖动、平均帧大小等参数。
流量模型统计模块对业务数据进行统计得到统计结果,例如,帧间隔、帧间隔抖动(例如帧间隔标准差)、平均帧大小等参数。
步骤1305,传输组件将业务类型、DSTP字段值和流量统计参数同步给调度引擎模块。
传输组件确定业务数据的业务类型、DSTP字段值和流量统计参数,并同步给调度引擎模块。以便于调度引擎模块将业务数据输入相应队列进行传输。
可选地,文件传输和流传输分别使用不同dscp字段值。本步骤中,使用DSTP区分不同类型业务的流量,这里也可以使用网卡标识、源IP地址、目的IP地址、源端口、目的端口、服务类型(type of service,TOS)字段、差分服务代码点(differentiated services code point,DSCP)等其他字段来区分不同类型业务的流量。
步骤1306,判断业务是否结束。若是,结束统计流量模型参数的过程。
流量调度模块判断业务数据是否传输结束。若是,结束统计流量模型参数的过程。若否,重复执行步骤1301至步骤1306,直至满足预设条件。该预设条件包括以下至少一项:统计流量模型参数的时长达到预设时长、统计流量模型参数的数据量达到预设值、业务传输结束等。
本实施例中,提供一种为前述图5至图12所示实施例中的信息采集的过程。在传输组件传输文件分享业务和多屏协同业务的同时,统计多屏协同业务的帧间隔用于确定第一时间段,统计帧间隔抖动用于判断是否满足调度条件,统计平均帧大小用于确定第二预设时间段,从而确定可调度文件分享业务流量的时间区间,从而减少文件分享业务对多屏协同业务的影响,减少多屏协同业务的时延和卡顿。
接下来对图5所示部署场景中调度规则的下发过程。该过程也可以理解为是判断是否触发执行前述 图6所示实施例中步骤604的过程,如图14所示,该过程包括步骤1401至步骤1404。
步骤1401,调度引擎模块获取业务数据的业务类型和业务统计信息。
调度引擎模块从传输组件处获取业务数据的业务类型和业务统计信息。
步骤1402,判断是否同时存在吞吐和周期性突发流。若是,执行步骤1403,若否,不下发调度规则。
调度引擎模块从传输组件处获取业务数据的业务类型和业务统计信息之后,判断是否同时存在吞吐和周期性突发流(或者理解为同时存在时延敏感业务与带宽敏感业务)。若是,执行步骤1403。若否,不下发调度规则。
步骤1403,基于业务统计信息判断是否满足调度条件。若是,执行步骤1404,若否,不下发调度规则。
调度引擎模块确定同时存在时延敏感业务与带宽敏感业务之后,基于业务统计信息判断是否满足调度条件。该调度条件为时延敏感业务存在近似周期性突发特征。
步骤1402与步骤1403可以理解为,若同时存在时延敏感业务和吞吐型业务,且时延敏感业务存在近似周期性突发特征,则执行步骤1404。若否,不下发调度规则。该调度规则包括调度策略与初试时间窗大小。
步骤1404,调度引擎模块给流量调度模块下发调度策略和初始时间窗大小。
调度引擎模块确定满足调度条件的情况下,调度引擎模块给流量调度模块下发调度策略和初始时间窗大小。该调度策略用于确定低优先级队列(即第二队列)传输带宽敏感业务(即第二数据流)的开始时刻。初始时间窗大小可以理解为前述图6所示实施例中的第一时间段。
进而,流量调度模块根据调度引擎模块下发的调度策略和初始时间窗大小对低优先级队列进行调度。具体的,流量调度模块先根据开始时刻与第一时间段确定低优先级队列的传输时间段,并在该传输时间段内调度低优先级队列传输带宽敏感业务。
本实施例中,在执行调度规则之前,先对是否满足调度条件进行判断。即只在满足调度条件的情况下,执行前述图6所示实施例中步骤604。从而减少由于一直执行步骤604减少业务数据的整体传输带宽的缺陷。
接下来以高优先级队列(即第一队列)与低优先级队列(即第二队列)的状态如前述图10为例,对前述图6所示实施例的步骤604中高优先级队列与低优先级队列的具体调度过程间描述。
高优先级队列的调度过程如图15所示,该过程包括步骤1501至步骤1506。
步骤1501,判断队列中是否有报文发送。若是,执行步骤1502。若否,执行步骤1505。
流量调度模块判断高优先级队列中是否有报文发送。若是,执行步骤1502。若否,执行步骤1505。
步骤1502,发送报文。
若确定高优先级队列中有报文需要发送,则发送报文。
步骤1503,判断高优先级队列是否处于闲时状态。若是,执行步骤1504。若否,回到步骤1501。
流量调度模块判断高优先级队列是否处于闲时状态。若是,执行步骤1504。若否,回到步骤1501。其中,闲时状态表示高优先级队列中无报文,或者报文的数量小于阈值。
步骤1504,将高优先级队列设置为忙时状态,并开启低优先级队列发送开关。
若流量调度模块确定高优先级队列处于闲时状态。则将高优先级队列设置为忙时状态,并开启低优先级队列发送开关。该发送开关可以理解为前述图6所示实施例中第二队列的开启时刻。
步骤1505,判断突发(burst)是否结束。若结束,执行步骤1506。若否,回到步骤1501。
流量调度模块判断突发是否结束。若结束,执行步骤1506。若否,回到步骤1501。即流量调度模块判断第一数据流的突发是否结束。
本申请实施例中,判断第一数据流的突发是否结束有多种方式,可以是通过对第一数据流的最后一个报文加特殊处理(例如比如最后发一个0长度的报文),也可以是统计报文到达时刻,当有一段时间(比如1ms)没有新的报文到达时认为burst结束,还可以是根据报文中表示最后一个报文的标识字段等,具体此处不做限定。
步骤1506,将高优先级队列设置为闲时状态。
若流量调度模块确定第一数据流的突发结束。则将高优先级队列设置为闲时状态。
低优先级队列的调度过程如图16所示,该过程包括步骤1601至步骤1605。
步骤1601,判断队列中是否有报文发送。若是,执行步骤1602。若否,回到步骤1601。
流量调度模块判断低优先级队列中是否有报文发送。若是,执行步骤1602。若否,回到步骤1601。
步骤1602,判断低优先级队列发送开关是否打开。若是,执行步骤1603。若否,回到步骤1601。
若流量调度模块确定低优先级队列中有报文发送,则判断低优先级队列发送开关是否打开。若是,执行步骤1603。若否,回到步骤1601。
步骤1603,判断低优先级队列发送开关持续时间是否超过下发阈值。若是,执行步骤1605。若否,执行步骤1604。
若流量调度模块确定低优先级队列发送开关已打开,则判断低优先级队列发送开关持续时间是否超过下发阈值。若是,执行步骤1605。若否,执行步骤1604。
其中,该下发阈值可以是前述图6所示实施例中的第一时间段,也可以是前述图11所示实施例中的第二时间段,具体此处不做限定。
步骤1604,发送报文。
若流量调度模块确定低优先级队列发送开关持续时间未超过下发阈值(或者理解为,低优先级队列在传输时间段内),则调度低优先级队列发送报文。
步骤1605,关闭低优先级队列发送开关。
若流量调度模块确定低优先级队列发送开关持续时间已超过下发阈值(或者理解为,低优先级队列不在传输时间段内),则关闭低优先级队列发送开关。即调度低优先级队列不发送报文。
本实施例中,图15与图16提供一种高优先级队列与低优先级队列的联动调度方法。即低优先级队列能否发送数据由其发送开关的状态决定,发送开关接收到高优先级队列的信号后开启,持续由上层通过规则动态下发的第一时间段后关闭。换句话说,通过高优先级队列中是否有报文以及高优先级队列的状态决定低优先级队列传输业务的开始时刻。可以在高优先级业务到来之前,在底层队列尽可能排空低优先级业务,从而减少高优先级业务的传输时延。
上面对本申请实施例中的模型处理方法进行了描述,下面对本申请实施例中的计算机设备进行描述。该计算机设备可以是终端设备或服务器等,具体此处不做限定。
请参阅图17,本申请实施例中计算机设备的一个实施例包括:
获取单元1701,用于获取第一数据流与第二数据流,第一数据流的优先级高于第二数据流的优先级;第一数据流通过第一队列传输,第二数据流通过第二队列传输;
获取单元1701,还用于获取第一队列中第一数据流的传输特征,传输特征与第一数据流中报文到达第一队列的时刻相关;
调度单元1702,用于基于传输特征调度第二队列。
可选地,获取单元1701,还用于获取与网卡驱动相关的统计信息,统计信息包括预设时间段内的以下至少一项参数:第一数据流的服务质量QoS、网卡利用率、驱动队列的排队时长;驱动队列用于接收来自第一队列与第二队列的数据,网卡驱动与计算机设备连接;
可选地,计算机设备还包括:确定单元1703,还用于基于第一队列中的报文数量确定第二队列传输第二数据流的开始时刻;
可选地,计算机设备还包括:更新单元1704,用于基于统计信息更新第一时间段以得到第二时间段,第二时间段用于保证统计信息中的参数在预设范围内,第二时间段用于调度第二队列。
本实施例中,计算机设备中各单元所执行的操作与前述图1A至图16所示实施例中描述的类似,此处不再赘述。
本实施例中,确定单元1703确定传输第一数据流的第一队列与传输第二数据流的第二队列,第一数据流的优先级高于第二数据流的优先级。调度单元1702在调度第二队列的过程中考虑第一队列中第 一数据流的传输特征,以减少第二队列调出的第二数据流在底层队列中的积压。换句话说,调度单元1702调度第二队列时考虑到第一数据流到达第一队列的时刻,可以提前减少由于第二业务数据在底层队列中对第一数据流的干扰,从而保证第一数据流的低时延传输,以及传输第一数据流与第二数据流的整体带宽利用率,从而提供一种合理的数据调度方法。
参阅图18,本申请提供的另一种计算机设备的结构示意图。该计算机设备可以包括处理器1801、存储器1802和通信端口1803。该处理器1801、存储器1802和通信端口1803通过线路互联。其中,存储器1802中存储有程序指令和数据。
存储器1802中存储了前述图1A至图16所示对应的实施方式中,由计算机设备执行的步骤对应的程序指令以及数据。
处理器1801,用于执行前述图1A至图16所示实施例中任一实施例所示的由计算机设备执行的步骤。
通信端口1803可以用于进行数据的接收和发送,用于执行前述图1A至图16所示实施例中任一实施例中与获取、发送、接收相关的步骤。
一种实现方式中,计算机设备可以包括相对于图18更多或更少的部件,本申请对此仅仅是示例性说明,并不作限定。
本申请实施例还提供一种存储一个或多个计算机执行指令的计算机可读存储介质,当计算机执行指令被处理器执行时,该处理器执行如前述实施例中计算机设备可能的实现方式的方法。
本申请实施例还提供一种存储一个或多个计算机的计算机程序产品(或称计算机程序),当计算机程序产品被该处理器执行时,该处理器执行上述计算机设备可能实现方式的方法。
本申请实施例还提供了一种芯片系统,该芯片系统包括至少一个处理器,用于支持上述计算机设备可能的实现方式中所涉及的功能。可选的,芯片系统还包括接口电路,接口电路为至少一个处理器提供程序指令和/或数据。在一种可能的设计中,该芯片系统还可以包括存储器,存储器,用于保存该计算机设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-only memory)、随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码的介质。

Claims (21)

  1. 一种数据流调度方法,其特征在于,所述方法应用于计算机设备,所述方法包括:
    获取第一数据流与第二数据流,所述第一数据流的优先级高于所述第二数据流的优先级,所述第一数据流通过第一队列传输,所述第二数据流通过第二队列传输;
    获取所述第一队列中所述第一数据流的传输特征,所述传输特征与所述第一数据流中报文到达所述第一队列的时刻相关;
    基于所述传输特征调度所述第二队列。
  2. 根据权利要求1所述的方法,其特征在于,所述传输特征为所述第一数据流的传输周期;
    所述基于所述传输特征调度所述第二队列,包括:
    基于所述传输周期确定第一时间段,所述第一时间段的时长小于所述传输周期的时长,且所述第一时间段位于所述第一数据流中相邻报文到达第一队列的时刻之间;
    调度所述第二队列在所述第一时间段传输所述第二数据流。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    基于所述第一队列中的报文数量确定所述第二队列传输所述第二数据流的开始时刻;
    所述基于所述传输特征调度所述第二队列,包括:
    基于所述传输特征与所述开始时刻调度所述第二队列。
  4. 根据权利要求3所述的方法,其特征在于,所述开始时刻根据所述第一队列中所述第一数据流的报文数量确定。
  5. 根据权利要求4所述的方法,其特征在于,所述第一队列中所述第一数据流的报文数量小于预设阈值的时刻为第一时刻,所述开始时刻与所述第一时刻的差值与所述第一数据流的大小正相关,所述第一数据流的大小包括以下至少一项:字节总数、报文数量。
  6. 根据权利要求3至5中任一项所述的方法,其特征在于,所述基于所述传输特征与所述开始时刻调度所述第二队列,包括:
    在所述第二队列在发送周期的情况下,调度所述第二队列传输所述第二数据流,所述发送周期根据所述开始时刻与所述传输特征确定。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:
    获取与网卡驱动相关的统计信息,所述统计信息包括预设时间段内的以下至少一项参数:所述第一数据流的服务质量QoS、网卡利用率、驱动队列的排队时长;所述驱动队列用于接收来自所述第一队列与所述第二队列的数据,所述网卡驱动与所述计算机设备连接;
    基于所述统计信息更新所述第一时间段以得到第二时间段,所述第二时间段用于保证所述统计信息中的参数在预设范围内,所述第二时间段用于调度所述第二队列。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述第一数据流属于时延敏感业务,所述第二数据流属于带宽敏感业务。
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述第一队列与所述第二队列位于同一计算机设备或不同计算机设备。
  10. 一种计算机设备,其特征在于,所述计算机设备包括:
    获取单元,用于获取第一数据流与第二数据流,所述第一数据流的优先级高于所述第二数据流的优先级,所述第一数据流通过第一队列传输,所述第二数据流通过第二队列传输;
    所述获取单元,还用于获取所述第一队列中所述第一数据流的传输特征,所述传输特征与所述第一数据流中报文到达所述第一队列的时刻相关;
    调度单元,用于基于所述传输特征调度所述第二队列。
  11. 根据权利要求10所述的计算机设备,其特征在于,所述传输特征为所述第一数据流的传输周期;
    所述调度单元,具体用于基于所述传输周期确定第一时间段,所述第一时间段的时长小于所述传输周期的时长,且所述第一时间段位于所述第一数据流中相邻报文到达第一队列的时刻之间;
    所述调度单元,具体用于调度所述第二队列在所述第一时间段传输所述第二数据流。
  12. 根据权利要求10或11所述的计算机设备,其特征在于,所述计算机设备还包括:
    确定单元,还用于基于所述第一队列中的报文数量确定所述第二队列传输所述第二数据流的开始时刻;
    所述调度单元,具体用于基于所述传输特征与所述开始时刻调度所述第二队列。
  13. 根据权利要求12所述的计算机设备,其特征在于,所述开始时刻根据所述第一队列中所述第一数据流的报文数量确定。
  14. 根据权利要求13所述的计算机设备,其特征在于,所述第一队列中所述第一数据流的报文数量小于预设阈值的时刻为第一时刻,所述开始时刻与所述第一时刻的差值与所述第一数据流的大小正相关,所述第一数据流的大小包括以下至少一项:字节总数、报文数量。
  15. 根据权利要求12至14中任一项所述的计算机设备,其特征在于,所述调度单元,具体用于在所述第二队列在发送周期的情况下,调度所述第二队列传输所述第二数据流,所述发送周期根据所述开始时刻与所述传输特征确定。
  16. 根据权利要求10至15中任一项所述的计算机设备,其特征在于,所述获取单元,还用于获取与网卡驱动相关的统计信息,所述统计信息包括预设时间段内的以下至少一项参数:所述第一数据流的服务质量QoS、网卡利用率、驱动队列的排队时长;所述驱动队列用于接收来自所述第一队列与所述第二队列的数据,所述网卡驱动与所述计算机设备连接;
    所述计算机设备还包括:
    更新单元,用于基于所述统计信息更新所述第一时间段以得到第二时间段,所述第二时间段用于保证所述统计信息中的参数在预设范围内,所述第二时间段用于调度所述第二队列。
  17. 根据权利要求10至16中任一项所述的计算机设备,其特征在于,所述第一数据流属于时延敏感业务,所述第二数据流属于带宽敏感业务。
  18. 根据权利要求10至17中任一项所述的计算机设备,其特征在于,所述第一队列与所述第二队列位于同一计算机设备或不同计算机设备。
  19. 一种计算机设备,其特征在于,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得所述计算机设备执行如权利要求1至9中任一项所述的方法。
  20. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在终端设备上运行时,使得所述终端设备执行如权利要求1至9中任一项所述的方法。
  21. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至9中任一项所述的方法。
PCT/CN2023/133602 2022-11-30 2023-11-23 一种数据流调度方法及相关设备 Ceased WO2024114501A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP23896652.7A EP4607883A4 (en) 2022-11-30 2023-11-23 DATA FLOW PLANNING METHOD AND ASSOCIATED DEVICE
US19/222,402 US20250293989A1 (en) 2022-11-30 2025-05-29 Data Flow Scheduling Method and Related Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211528807.3A CN118118428A (zh) 2022-11-30 2022-11-30 一种数据流调度方法及相关设备
CN202211528807.3 2022-11-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US19/222,402 Continuation US20250293989A1 (en) 2022-11-30 2025-05-29 Data Flow Scheduling Method and Related Device

Publications (1)

Publication Number Publication Date
WO2024114501A1 true WO2024114501A1 (zh) 2024-06-06

Family

ID=91218509

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/133602 Ceased WO2024114501A1 (zh) 2022-11-30 2023-11-23 一种数据流调度方法及相关设备

Country Status (4)

Country Link
US (1) US20250293989A1 (zh)
EP (1) EP4607883A4 (zh)
CN (1) CN118118428A (zh)
WO (1) WO2024114501A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20250202827A1 (en) * 2023-12-19 2025-06-19 Cisco Technology, Inc. Identifying and Scheduling Low Latency, Low Loss, and Scalable Throughput (L4S) Data Flows
CN119135675B (zh) * 2024-09-04 2026-02-24 中移互联网有限公司 文件下载方法、装置、设备、存储介质及程序产品
CN119697132A (zh) * 2025-02-25 2025-03-25 常州市索鼎自动化科技有限公司 一种用于工视一体设备的数据传输方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7002918B1 (en) * 2000-05-22 2006-02-21 Northrop Grumman Corporation Method and apparatus for real time scheduling in a satellite communications network
CN101369962A (zh) * 2007-08-13 2009-02-18 华为技术有限公司 转发报文的方法和网络设备
CN101803311A (zh) * 2007-09-17 2010-08-11 高通股份有限公司 通信网络中的优先调度和准入控制
CN108762896A (zh) * 2018-03-26 2018-11-06 福建星瑞格软件有限公司 一种基于Hadoop集群任务调度方法及计算机设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483363B (zh) * 2017-08-15 2020-04-14 无锡职业技术学院 一种分层的加权轮询调度装置及方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7002918B1 (en) * 2000-05-22 2006-02-21 Northrop Grumman Corporation Method and apparatus for real time scheduling in a satellite communications network
CN101369962A (zh) * 2007-08-13 2009-02-18 华为技术有限公司 转发报文的方法和网络设备
CN101803311A (zh) * 2007-09-17 2010-08-11 高通股份有限公司 通信网络中的优先调度和准入控制
CN108762896A (zh) * 2018-03-26 2018-11-06 福建星瑞格软件有限公司 一种基于Hadoop集群任务调度方法及计算机设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4607883A4

Also Published As

Publication number Publication date
EP4607883A4 (en) 2026-01-28
CN118118428A (zh) 2024-05-31
EP4607883A1 (en) 2025-08-27
US20250293989A1 (en) 2025-09-18

Similar Documents

Publication Publication Date Title
WO2024114501A1 (zh) 一种数据流调度方法及相关设备
CN108616458B (zh) 客户端设备上调度分组传输的系统和方法
JP4015428B2 (ja) インアクティビティタイマを備えた無線基地局/無線基地局制御装置、無線端末及び状態制御方法
CN111213403B (zh) 无线通信系统中QoS流的调度方法及装置
CN103988543A (zh) 无线局域网中的控制设备、网络系统及业务处理方法
JP7640731B2 (ja) 伝送処理方法、第一の通信機器、第二の通信機器及び可読記憶媒体
US20200252337A1 (en) Data transmission method, device, and computer storage medium
TW202224477A (zh) 用於調度資料傳輸之裝置和方法
CN114615206A (zh) 数据传输方法、接入网设备、用户面功能网元和存储介质
EP3055958B1 (en) Downlink flow management
CN112243255A (zh) 一种调度优先级的确定方法和装置
WO2024152330A1 (zh) 调度请求传输方法及装置、通信设备及存储介质
WO2025241697A1 (zh) 数据处理方法、装置、设备、存储介质及程序产品
CN115996425A (zh) 数据传输方法、装置及终端
CN100417290C (zh) 一种第三代移动通讯系统中的拥塞控制方法
US8355403B2 (en) Stale data removal using latency count in a WiMAX scheduler
WO2025102666A1 (zh) 一种报文处理方法以及装置
CN119449735A (zh) 数据传输方法、非易失性存储介质和计算机设备
WO2024255804A1 (zh) 数据量上报方法、装置及可读存储介质
WO2025035893A1 (zh) 一种上报缓存状态报告的方法和通信装置
WO2023193203A1 (zh) 一种时延控制方法及装置、通信设备
CN114980350A (zh) 一种计数值配置方法和装置
KR100966630B1 (ko) QoS 제공 시스템 및 이를 이용한 방법
CN118631757B (zh) 基于信用值的速率控制方法、装置和设备
WO2025241643A1 (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: 23896652

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023896652

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2023896652

Country of ref document: EP

Effective date: 20250522

NENP Non-entry into the national phase

Ref country code: DE

WWP Wipo information: published in national office

Ref document number: 2023896652

Country of ref document: EP