WO2019037527A1 - Usb interface request scheduling method and apparatus, and device - Google Patents

Usb interface request scheduling method and apparatus, and device Download PDF

Info

Publication number
WO2019037527A1
WO2019037527A1 PCT/CN2018/091791 CN2018091791W WO2019037527A1 WO 2019037527 A1 WO2019037527 A1 WO 2019037527A1 CN 2018091791 W CN2018091791 W CN 2018091791W WO 2019037527 A1 WO2019037527 A1 WO 2019037527A1
Authority
WO
WIPO (PCT)
Prior art keywords
usb
interface
scheduling
data transmission
usb interface
Prior art date
Application number
PCT/CN2018/091791
Other languages
French (fr)
Chinese (zh)
Inventor
马伟伟
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2019037527A1 publication Critical patent/WO2019037527A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Definitions

  • the present invention relates to the field of communications, and in particular to a USB (Universal Serial Bus) interface request scheduling method and apparatus, and a USB multi-interface composite device.
  • USB Universal Serial Bus
  • LTE Long Term Evolution
  • Category the theoretical downlink rate of LTE (Long Term Evolution) CAT (Category) 6 can reach 300M, and the downlink rate of LTE CAT 11 reaches 600M.
  • the downlink rate of LTE may be faster in the future.
  • most wireless data module/data card type devices are connected to the host using a USB interface. Therefore, the efficiency of the USB interface is crucial for achieving the optimal speed of the whole machine.
  • the port form of the LTE module includes an AT interface for transmitting an AT (Attention, a communication command) in addition to a network card interface such as an NDIS (Network Driver Interface Specification) for network data transmission.
  • the DIAG (Diagnostics) port for diagnostic information, and the ADB (Android Debug Bridge) interface for debugging, that is, the existing multi-interface USB device supporting LTE CAT6 is a typical USB composite device.
  • USB interface Since the USB interface essentially adopts a polling mechanism, each interface needs to continuously read (Read) a URB (USB Request Block) request to and from the USB controller during operation, which means even this No data transmission on the interface also takes up a lot of USB bus resources. It can be seen that the existing multi-interface USB composite device supporting LTE CAT6, because the bus operation of ports such as AT/ADB/DIAG will affect the data transmission efficiency of the network port, so that the download rate is lower than the theoretical value of the wireless network 300M, thereby affecting Overall performance of the equipment.
  • URB USB Request Block
  • the invention provides a USB interface request scheduling method, device and USB multi-interface composite device, so as to at least solve the problem of USB interface efficiency in the related art.
  • a method for scheduling a USB interface request includes: receiving a data transmission request of the USB interface, and determining a type of the USB interface; and adopting a corresponding scheduling frequency according to a type of the USB interface The data transmission request is scheduled.
  • a USB interface request scheduling apparatus including: a receiving module, configured to receive a data transmission request of the USB interface, and determine a type of the USB interface; and a scheduling module, configured to The type of the USB interface schedules the data transmission request by using a corresponding scheduling frequency.
  • a USB multi-interface composite device includes: a central processing unit CPU and a USB controller, wherein the USB controller is connected to the CPU through a peripheral component interconnecting a standard PCI bus, wherein The USB controller includes a USB request block scheduler and a USB physical layer interface, wherein the USB request block scheduler is configured to receive a URB request issued by a user driver of the USB multi-interface composite device, and according to the USB URB request
  • the interface type carried in the interface sends the URB request to the USB physical layer interface by using a corresponding scheduling frequency.
  • a method for scheduling a USB interface request includes: determining whether there is data to be read on a USB bus when a scheduling time of the USB interface arrives; and dynamically adjusting the location according to the judgment result The next scheduling interval of the USB interface.
  • a storage medium having stored therein a computer program, wherein the computer program is configured to execute the steps of any one of the method embodiments described above.
  • an electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor being arranged to run the computer program to perform any of the above The steps in the method embodiments.
  • FIG. 1 is a schematic diagram of a hardware bus of a USB device according to the related art
  • USB device driver software is a schematic structural diagram of a USB device driver software according to the related art
  • FIG. 3 is a schematic structural diagram of a USB system according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of a USB interface request scheduling method according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of URB scheduling of a USB interface according to Embodiment 1 of the present invention.
  • FIG. 6 is a flowchart of URB scheduling of a USB interface according to Embodiment 3 of the present invention.
  • FIG. 8 is a schematic structural diagram of a USB system according to Embodiment 6 of the present invention.
  • FIG. 9 is a schematic structural diagram of a USB interface request scheduling apparatus according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a USB multi-interface composite device according to an embodiment of the present invention.
  • LTE data card/module devices mostly use USB interface technology to connect with the host (Host).
  • the LTE wireless module is often a USB composite device, that is, it not only provides The NDIS interface for network data transmission also provides other USB interfaces for control or debugging, such as the AT interface for sending AT commands, the ADB interface for debugging, and the DIAG for diagnostic log (Log) transmission. Interface, etc.
  • the USB protocol specification defines four transmission modes: control transmission, bulk (Bulk) transmission, isochronous transmission, and interrupt transmission.
  • the DIAG/AT/NDIS/ADB interface in the wireless module is based on the Bulk transmission mode in data transmission, and each interface provides 1 bulk in endpoint and 1 bulk out endpoint. This means that there is no difference between the four interfaces from the USB level, and there is no difference in the scheduling mechanism of data transmission and the allocation of USB resources.
  • the read operation of the USB interface technology is essentially a polling mechanism.
  • the port driver on the host side does not know when the device will send data, so it is necessary to continuously send a read token packet (In Token) to the USB bus. . If the device is a multi-interface USB composite device, each interface will generate In Token frequently, which takes up a lot of USB bus resources.
  • the USB polling mechanism described above has an obvious influence on the data transmission of the network interface, and multiple interfaces on the host side are simultaneously used.
  • the downlink rate is often lower than the theoretical rate of LTE, which has a great impact on device performance.
  • FIG. 1 is a schematic diagram of the hardware bus of the USB device.
  • the central processing unit CPU
  • the peripheral controller including the USB controller is connected to the peripheral component (Peripheral Component Interconnect (PCI)).
  • PCI Peripheral Component Interconnect
  • the bus is connected to the CPU, the USB device is connected to the system through the USB controller, the running system software is stored in the internal memory, and the CPU reads the software instructions in the internal memory to execute corresponding commands, including controlling the USB device and accessing the USB. Equipment and so on.
  • the mainstream USB controller not only supports USB 2.0 devices, but also supports devices such as USB 1.1 and USB 3.0/3.1, so the USB controller internally contains various Host Controller Interface types.
  • EHCI Enhanced Host Controller Interface
  • USB 1.1 devices Open Host Controller Interface/Universal Host Controller interface
  • OHCI/UHCI Open Host Controller Interface/Universal Host Controller Interface
  • XHCI eXtensible Host Controller Interface
  • FIG. 2 is a diagram of the USB device driver software architecture.
  • the system software layer loads the driver software of UHCI/OHCI and EHCI respectively according to the type of USB device.
  • the USBD software is responsible for providing a unified driver driver (Client Driver). USB bus operation method.
  • Client Driver is the collective name of device function driver.
  • the USB system architecture if the current USB device is a single-interface function device, then there is only one Client Driver; if the current USB device is a device that contains multiple interfaces. Composite devices, then each functional interface will correspond to a Client Driver.
  • USB USB Request Block
  • USB USB bus driver
  • This patent re-allocates the working mode of the URB according to the weight system rules according to the weight system rules issued by each interface to reduce the load of the USB PHY and minimize the impact on the network transmission interface.
  • USB URB Scheduler a scheduler is added between a Client Driver and a USB bus driver (USBD), which is called a USB URB scheduler.
  • USB URB Scheduler USB bus driver
  • USB URB Scheduler When the USB device is working, all URB requests are first handed over to the USB URB Scheduler for unified scheduling, and scheduled to be sent to the USB PHY according to certain algorithm rules. Therefore, the USB URB Scheduler includes two parts of the executable body and the algorithm body. The cooperation mechanism of the USB URB Schedule and the Client Driver and the algorithm mechanism in the USB URB Schedule will be specifically described in the following embodiments.
  • FIG. 4 is a flowchart of a data transmission request scheduling of a USB interface according to an embodiment of the present invention. As shown in FIG. 4, the process includes the following steps:
  • Step S402 receiving a data transmission request sent by the USB interface driver, and determining a type of the USB interface;
  • Step S404 scheduling the data transmission request by using a corresponding scheduling frequency according to the type of the USB interface.
  • the flexibility of the USB interface is improved by flexibly scheduling the request of the interface by using different frequencies according to different types of the USB interface.
  • the USB URB scheduler determines the type of the function interface corresponding to each URB, and performs different processing on the same. The process is as follows:
  • Step S501 The function driver used by each interface of the USB multi-interface composite device marks the URB while generating it;
  • Step S502 The USB URB scheduler determines the corresponding interface and function according to the mark when receiving the URB;
  • Step S503 The USB URB scheduler adopts different scheduling frequencies according to different requirements of the communication efficiency of each interface function. If the function of the interface corresponding to the URB does not require high communication efficiency, for example, is not sensitive to real-time and delay, the URB may be sent to the USB bus for a period of time, that is, by scheduling the URB scheduling of the interface. The interval duration reduces its scheduling frequency. If the function of the URB corresponding interface has high requirements on communication efficiency, for example, sensitivity to real-time and delay, the scheduling interval of the interface is reduced to immediately send the URB to the USB bus.
  • the communication efficiency of a specific interface in the USB multi-interface composite device can be significantly improved, and the user experience is improved.
  • the parameter x is the number of times of rescheduling in the idle period
  • the parameter n is a weight coefficient
  • the parameter t is the reference scheduling time
  • the time parameter t means the minimum delay of the scheduling, and its value needs to be determined according to the actual application scenario. If the service corresponding to the USB interface needs higher timeliness, the t can be set smaller; if the USB interface corresponds to the service pair If the timeliness is not sensitive, a larger value can be taken.
  • This patent does not specifically limit the values of the parameters in the formula, and the application can be adjusted according to actual needs. For convenience of description, this example assumes that t is 1ms, then the scheduling time distribution is as shown in Table 1. The initial value of the scheduling time is 1ms. If the USB interface has no data, it will increase with the scheduling algorithm and reach the maximum value at the 5th time. After 16ms, it will not increase after 16ms. This embodiment can simultaneously satisfy the requirements of data burstiness and concentration.
  • a single interface USB device is involved, and the URB degree algorithm in the embodiment of the present invention can also be applied to the USB device of the single interface to dynamically adjust the USB device interface.
  • the specific scheduling procedure refer to the foregoing embodiment, and no further description is provided here.
  • the scheduling of the URB may be classified according to the requirements of the interface function, and the real-time and delay of the interface corresponding to the URB. There is a high requirement.
  • the scheduling algorithm is not applied and sent directly to the USB PHY.
  • the scheduling is required.
  • the specific scheduling mode is shown in Figure 6, which includes the following processes:
  • Step S601 After the device is inserted into the host, the user mode application APP can open the virtual device corresponding to each interface of the USB through the device node.
  • Step S602 The kernel driver generates a URB request.
  • Step S603 The kernel driver determines whether URB scheduling is required according to the type of the USB interface.
  • Step S604 If the URB corresponding to the interface does not need to be scheduled, it is directly sent to the USB PHY;
  • Step S605 If the URB corresponding to the interface needs to participate in scheduling, set a scheduling flag for informing the USB bus driver;
  • Step S606 The USB bus driver first schedules the URB according to the initial time of the scheduling algorithm
  • Step S607 determining whether data is read on the USB interface corresponding to the current URB, and if yes, maintaining the initial time for the next URB scheduling time;
  • Step S608 If there is no data transmission on the interface, the URB scheduling time is incremented according to the established algorithm
  • Step S609 continue to judge whether there is data transmission on the current USB bus, and if the data is read at any time, the scheduling time needs to be restored to the initial time;
  • Step S610 If there is no, the scheduling time continues to increase according to the established algorithm until the maximum value is reached.
  • This embodiment describes the scheduling method and policy of the URB in the multi-interface USB device in detail.
  • four interfaces need to participate in scheduling.
  • t is still set to 1 ms, but the weight system corresponding to each interface is different.
  • Table 2 below is the scheduling time policy of each interface.
  • the weight coefficient of interface 1 is 1, theoretically, there is a maximum delay of 16 ms when data is read; the weight coefficient of interfaces 2 and 3 is 2, and theoretically, there is a delay of up to 32 ms when data is read; The weight system of 4 is 3, and theoretically, the data is read with a delay of up to 48 ms.
  • adjusting the weight coefficient of each interface can affect the reading efficiency of each interface.
  • the USB communication efficiency can be optimized to the maximum extent according to the functional characteristics of each interface.
  • a CPE (Customer Premise Equipment) device in the field of wireless communication is composed of a host board and a wireless communication device module, and the two are connected through a USB interface.
  • the wireless communication device module enumerates multiple interfaces through USB, such as an AT interface for transmitting AT commands, an ADB interface for debugging, a DIAG interface for diagnosing logs, and an NDIS port for network data transmission.
  • the NDIS port maintains efficient transmission and does not participate in scheduling.
  • the USB URB corresponding to the AT/ADB/DIAG port participates in scheduling, and the weighting system is set to 1.
  • the scheduling time is still as shown in Table 1.
  • the flow of this embodiment is as shown in FIG. 7, and includes the following steps:
  • Step S701 the host kernel function driver generates a URB request
  • Step S702 determining an interface corresponding to the URB
  • Step S703 if it is an NDIS port, does not participate in scheduling, and directly sends the URB request to the USB PHY;
  • Step S704 if it is another port, for example, an AT/ADB/DIAG port, setting a URB scheduling flag;
  • Step S705 scheduling and performing data transmission according to the scheduling algorithm of Equation 1.
  • the technical solution of the present invention is not limited to the application and the USB host side, and can also be applied to the USB module/device side, thereby achieving the effect of improving the communication efficiency of the USB composite device interface.
  • the system architecture diagram of the USB host/device of the Linux system is shown in FIG. 8.
  • the USB URB Scheduler is added on the host side, and can also be applied to the device side.
  • the Gadget is used.
  • a USB IO request Scheduler layer is added between the Client Driver Software and the UDC (USB Device Controller) Driver, and the USB generated for each client driver is generated.
  • the IO request is re-scheduled, and the scheduling policy and algorithm are the same as the host embodiment, and are not described here.
  • the USB IO request generated by each client driver can be re-scheduled on the device side to improve the communication efficiency of an interface of the USB composite device.
  • the technical solution of the embodiment is applied to a CPE device connected to a USB interface, and the host motherboard can dynamically adjust the transmission efficiency of each port of the wireless communication module to improve the communication index of the main service.
  • This embodiment can also be applied to the HSIC (High-Speed Inter-Chip) system.
  • the host in the HISC system can use the technical solution of the embodiment to schedule the service ports of the slave devices in the HISC system. Improve communication efficiency between chips.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • a data transmission request scheduling device of the USB interface is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • FIG. 9 is a structural block diagram of a USB interface request scheduling apparatus according to an embodiment of the present invention.
  • the apparatus 100 includes a receiving module 10 and a scheduling module 20.
  • the receiving module 10 is configured to receive a data transmission request sent by the USB interface driver, and determine a type of the USB interface.
  • the scheduling module 20 is configured to schedule the data transmission request by using a corresponding scheduling frequency according to the type of the USB interface.
  • FIG. 10 is a structural block diagram of a USB multi-interface composite device according to an embodiment of the present invention.
  • the USB multi-interface composite device 200 includes a plurality of different in addition to the USB interface request scheduling device 100 shown in FIG. Similar to the USB interface. These interfaces include, for example, an AT interface for transmitting AT commands, an ADB interface for debugging, a DIAG interface for diagnosing logs, and an NDIS interface for network data transmission.
  • the data interaction between the USB interface of the composite device and the data transmission request scheduling device 100 is the same as the previous embodiment, and will not be described herein.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple In the processor.
  • Embodiments of the present invention also provide a storage medium.
  • Computer programs are stored in the storage medium, and the computer programs are executed to perform the steps in the foregoing embodiments.
  • the foregoing storage medium may include, but not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • mobile hard disk a magnetic disk
  • magnetic disk a magnetic disk
  • optical disk a variety of media that can store program code.
  • Embodiments of the present invention also provide an electronic device comprising a memory and a processor having a computer program stored therein, the processor being arranged to execute a computer program to perform the steps of any of the method embodiments described above.
  • the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
  • the scheduling parameter and the scheduling time of each interface can be specifically set by using the formula 1.
  • different interfaces are set for different interfaces.
  • the weight system achieves the purpose of reducing its impact on the USB bus; this patent can effectively solve the problem that the NDIS network downlink cannot reach the LTE CAT6 300M downlink rate due to the impact of the AT/DIAG/ADB port encountered in the CPE project. And it will not cause a big impact on other functional modules.
  • the implementation of the present invention can greatly improve the communication efficiency of the interface, and avoid the situation of replacing the USB controller hardware due to the speed problem under certain circumstances, thereby generating a large economic benefit; the technical solution provided by the implementation of the present invention can also be applied to the USB 1.1. On other devices such as USB 3.0, the user experience is improved; the technical solution provided by the present invention can also be applied to the USB device side, and the communication efficiency of an interface in the USB composite device can also be improved.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the USB interface request scheduling method, apparatus, and device provided by the embodiments of the present invention have the following beneficial effects: according to different types of USB interfaces, flexible scheduling of requests for the interface is performed with different frequencies, and the USB interface is improved. s efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Information Transfer Systems (AREA)

Abstract

The present invention provides a USB interface request scheduling method and apparatus, and a USB multi-interface composite device. The method comprises: receiving a data transmission request of a USB interface, and determining the type of the USB interface; and scheduling the data transmission request using a corresponding scheduling frequency according to the type of the USB interface. In the present invention, according to different type of USB interfaces, the requests of the interfaces are flexibly scheduled using different frequencies, thereby improving the efficiency of the USB interfaces.

Description

USB接口请求调度方法、装置及设备USB interface request scheduling method, device and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种USB(Universal Serial Bus,通用串行总线)接口请求调度方法、装置及USB多接口复合设备。The present invention relates to the field of communications, and in particular to a USB (Universal Serial Bus) interface request scheduling method and apparatus, and a USB multi-interface composite device.
背景技术Background technique
随着无线通讯技术的发展,数据传输的速度越来越快。目前LTE(Long Term Evolution,长期演进)CAT(Category,分类)6的理论下行速率可以达到300M,LTE CAT 11下行速率达到了600M,未来LTE的下行速率可能更快。目前大多数无线数据模块/数据卡类设备均使用USB接口与主机相连,因此,USB接口的效率对实现整机速率最优至关重要。With the development of wireless communication technology, the speed of data transmission is getting faster and faster. At present, the theoretical downlink rate of LTE (Long Term Evolution) CAT (Category) 6 can reach 300M, and the downlink rate of LTE CAT 11 reaches 600M. The downlink rate of LTE may be faster in the future. At present, most wireless data module/data card type devices are connected to the host using a USB interface. Therefore, the efficiency of the USB interface is crucial for achieving the optimal speed of the whole machine.
以USB 2.0结合LTE CAT 6模块为例,由于USB 2.0的理论带宽是480M,考虑减去USB协议等损耗,结合实际测量,这个值应该在320~350M之间。而LTE模块的端口形态除了用于网络数据传输的NDIS(Network Driver Interface Specification,网络驱动接口规范)等网卡接口外,还有用于发送AT(Attention,一种通讯指令)的AT接口,用于传输诊断信息的DIAG(Diagnostics)口,以及用于调试的ADB(Android Debug Bridge,安卓调试桥)接口等,即,现有的支持LTE CAT6的多接口USB设备是一个典型的USB复合设备。由于USB接口实质上采用的是一种轮询机制,每个接口在工作时都要不停的往USB控制器上下发读(Read)的URB(USB Request Block)请求,这就意味着即使这个接口上没有数据传输也会占用不少的USB总线资源。由此可见,现有的支持LTE CAT6的多接口USB复合设备,由于AT/ADB/DIAG等端口的总线操作会影响网络端口的数据传输效率,使得下载速率低于无线网络理论值300M,从而影响设备整体性能。Take USB 2.0 combined with LTE CAT 6 module as an example. Since the theoretical bandwidth of USB 2.0 is 480M, consider subtracting the loss of USB protocol. In combination with actual measurement, this value should be between 320 and 350M. The port form of the LTE module includes an AT interface for transmitting an AT (Attention, a communication command) in addition to a network card interface such as an NDIS (Network Driver Interface Specification) for network data transmission. The DIAG (Diagnostics) port for diagnostic information, and the ADB (Android Debug Bridge) interface for debugging, that is, the existing multi-interface USB device supporting LTE CAT6 is a typical USB composite device. Since the USB interface essentially adopts a polling mechanism, each interface needs to continuously read (Read) a URB (USB Request Block) request to and from the USB controller during operation, which means even this No data transmission on the interface also takes up a lot of USB bus resources. It can be seen that the existing multi-interface USB composite device supporting LTE CAT6, because the bus operation of ports such as AT/ADB/DIAG will affect the data transmission efficiency of the network port, so that the download rate is lower than the theoretical value of the wireless network 300M, thereby affecting Overall performance of the equipment.
发明内容Summary of the invention
本发明提供了一种USB接口请求调度方法、装置及USB多接口复合设备,以至少解决相关技术中USB接口效率的问题。The invention provides a USB interface request scheduling method, device and USB multi-interface composite device, so as to at least solve the problem of USB interface efficiency in the related art.
根据本发明的一个方面,提供一种USB接口请求调度方法,包括:接收所述USB接口的数据传输请求,并判断所述USB接口的类型;根据所述USB接口的类型,采用对应的调度频率对所述数据传输请求进行调度。According to an aspect of the present invention, a method for scheduling a USB interface request includes: receiving a data transmission request of the USB interface, and determining a type of the USB interface; and adopting a corresponding scheduling frequency according to a type of the USB interface The data transmission request is scheduled.
根据本发明的另一方面,还提供一种USB接口请求调度装置,包括:接收模块,设置为接收所述USB接口的数据传输请求,并判断所述USB接口的类型;调度模块,设置为根据所述USB接口的类型,采用对应的调度频率对所述数据传输请求进行调度。According to another aspect of the present invention, a USB interface request scheduling apparatus is further provided, including: a receiving module, configured to receive a data transmission request of the USB interface, and determine a type of the USB interface; and a scheduling module, configured to The type of the USB interface schedules the data transmission request by using a corresponding scheduling frequency.
根据本发明的又一方面,还提供一种USB多接口复合设备,包括:中央处理器CPU和USB控制器,USB控制器通过外设部件互连标准PCI总线与所述CPU相连,其中,所述USB控制器包括USB请求块调度器和USB物理层接口,其中,所述USB请求块调度器,设置为接收USB多接口复合设备的用户驱动下发的URB请求,并根据所述USB URB请求中携带的接口类型,采用对应的调度频率将所述URB请求发送至所述USB物理层接口。According to still another aspect of the present invention, a USB multi-interface composite device includes: a central processing unit CPU and a USB controller, wherein the USB controller is connected to the CPU through a peripheral component interconnecting a standard PCI bus, wherein The USB controller includes a USB request block scheduler and a USB physical layer interface, wherein the USB request block scheduler is configured to receive a URB request issued by a user driver of the USB multi-interface composite device, and according to the USB URB request The interface type carried in the interface sends the URB request to the USB physical layer interface by using a corresponding scheduling frequency.
根据本发明的又一方面,还提供一种USB接口请求调度方法,包括:在所述USB接口的调度时刻到来时,判断USB总线上是否有需要读取的数据;根据判断结果动态地调整所述USB接口的下一次调度间隔时长。According to still another aspect of the present invention, a method for scheduling a USB interface request includes: determining whether there is data to be read on a USB bus when a scheduling time of the USB interface arrives; and dynamically adjusting the location according to the judgment result The next scheduling interval of the USB interface.
根据本发明的又一个实施例,还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to still another embodiment of the present invention, there is also provided a storage medium having stored therein a computer program, wherein the computer program is configured to execute the steps of any one of the method embodiments described above.
根据本发明的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to still another embodiment of the present invention, there is also provided an electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor being arranged to run the computer program to perform any of the above The steps in the method embodiments.
在本发明上述实施例中,根据USB接口的不同类型,采用不同的频率对该接口的请求进行灵活调度,提高了USB接口的效率。In the above embodiment of the present invention, according to different types of USB interfaces, requests for the interface are flexibly scheduled using different frequencies, thereby improving the efficiency of the USB interface.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据相关技术的USB设备硬件总线示意图;1 is a schematic diagram of a hardware bus of a USB device according to the related art;
图2是根据相关技术的USB设备驱动软件结构示意图;2 is a schematic structural diagram of a USB device driver software according to the related art;
图3是根据本发明实施例的USB***结构示意图;3 is a schematic structural diagram of a USB system according to an embodiment of the present invention;
图4是根据本发明实施例的USB接口请求调度方法流程图;4 is a flowchart of a USB interface request scheduling method according to an embodiment of the present invention;
图5是根据本发明实施例一的USB接口的URB调度流程图;FIG. 5 is a flowchart of URB scheduling of a USB interface according to Embodiment 1 of the present invention; FIG.
图6是根据本发明实施例三的USB接口的URB调度流程图;6 is a flowchart of URB scheduling of a USB interface according to Embodiment 3 of the present invention;
图7是根据本发明实施例五的USB接口的URB调度流程图;7 is a flowchart of URB scheduling of a USB interface according to Embodiment 5 of the present invention;
图8是根据本发明实施例六的USB***结构示意图;8 is a schematic structural diagram of a USB system according to Embodiment 6 of the present invention;
图9是根据本发明实施例的USB接口请求调度装置结构示意图;9 is a schematic structural diagram of a USB interface request scheduling apparatus according to an embodiment of the present invention;
图10是根据本发明实施例的USB多接口复合设备结构示意图。FIG. 10 is a schematic structural diagram of a USB multi-interface composite device according to an embodiment of the present invention.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second", and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
目前在通讯设备领域,尤其是LTE数据卡类/模块类设备大都采用USB接口技术与主机(Host)相连,由于通讯设备的复杂性,LTE无线模块往往是一种USB复合设备,即它不仅提供用于网络数据传输的NDIS接口,也提供其它的用于控制或者调试的USB接口,例如,用于发送AT命令的AT接口,用于调试的ADB接口以及用于诊断日志(Log)传输的DIAG接口等。At present, in the field of communication equipment, especially LTE data card/module devices mostly use USB interface technology to connect with the host (Host). Due to the complexity of the communication device, the LTE wireless module is often a USB composite device, that is, it not only provides The NDIS interface for network data transmission also provides other USB interfaces for control or debugging, such as the AT interface for sending AT commands, the ADB interface for debugging, and the DIAG for diagnostic log (Log) transmission. Interface, etc.
USB协议规范定义了4中传输模式:控制传输、批量(Bulk)传输、同步传输和中断传输。如上所述、无线模块中DIAG/AT/NDIS/ADB接口在数据传输中均基于Bulk传输模式,每个接口提供1个bulk in端点和1个bulk out端点。这就意味着从USB层面4个接口并没差异,数据传输的调度机制以及USB资源分配并无差别。然而,USB接口技术的读操作本质上是一种轮询机制,主机侧的端口驱动并不知道设备何时会发送数据,所以就需要不停的向USB总线发送读令牌包(In Token)。如果设备是一个多接口的USB复合设备,每个接口均会频繁地产生In Token,占用了大量USB总线资源。The USB protocol specification defines four transmission modes: control transmission, bulk (Bulk) transmission, isochronous transmission, and interrupt transmission. As mentioned above, the DIAG/AT/NDIS/ADB interface in the wireless module is based on the Bulk transmission mode in data transmission, and each interface provides 1 bulk in endpoint and 1 bulk out endpoint. This means that there is no difference between the four interfaces from the USB level, and there is no difference in the scheduling mechanism of data transmission and the allocation of USB resources. However, the read operation of the USB interface technology is essentially a polling mechanism. The port driver on the host side does not know when the device will send data, so it is necessary to continuously send a read token packet (In Token) to the USB bus. . If the device is a multi-interface USB composite device, each interface will generate In Token frequently, which takes up a lot of USB bus resources.
在无线通讯领域,当LTE无线模块的下行速率非常接近USB物理接口最大速率时,此时以上所述的USB轮询机制对网络接口的数据传输影响就非常明显,在主机侧多个接口同时使用时往往造成下行速率低于LTE理论速率,对设备性能造成了很大影响。In the field of wireless communication, when the downlink rate of the LTE wireless module is very close to the maximum rate of the USB physical interface, the USB polling mechanism described above has an obvious influence on the data transmission of the network interface, and multiple interfaces on the host side are simultaneously used. The downlink rate is often lower than the theoretical rate of LTE, which has a great impact on device performance.
图1为USB设备硬件总线示意图,如图1所示,中央处理器(CPU)与内存储器相连,包括USB控制器在内的***控制器通过外设部件互连标准(Peripheral Component Interconnect,PCI)总线与CPU相连,USB设备通过USB控制器接入***之中,运行中的***软件存储在内存储器中,CPU读取内存储器中的软件指令执行相应的命令,包括控制USB设备、存取USB设备等等。Figure 1 is a schematic diagram of the hardware bus of the USB device. As shown in Figure 1, the central processing unit (CPU) is connected to the internal memory, and the peripheral controller including the USB controller is connected to the peripheral component (Peripheral Component Interconnect (PCI)). The bus is connected to the CPU, the USB device is connected to the system through the USB controller, the running system software is stored in the internal memory, and the CPU reads the software instructions in the internal memory to execute corresponding commands, including controlling the USB device and accessing the USB. Equipment and so on.
目前主流的USB控制器不仅支持USB 2.0设备,也支持USB 1.1和USB 3.0/3.1等设备,所以USB控制器内部包含多种主机控制器接口(Host Controller Interface)类型。例如,包括USB 2.0设备使用的增强型主机控制器接口(Enhanced Host Controller Interface,EHCI)、USB1.1设备使用的开放式主机控制器接口/通用主机控制器接口(Open Host Controller Interface/Universal Host Controller Interface,OHCI/UHCI)和USB 3.0/3.1设备使用的可扩展的主机控制器接口(eXtensible Host Controller Interface,XHCI),在下面的描述中,将这些接口统一称之为USB物理层(USB physical layer,USB PHY)。At present, the mainstream USB controller not only supports USB 2.0 devices, but also supports devices such as USB 1.1 and USB 3.0/3.1, so the USB controller internally contains various Host Controller Interface types. For example, an Enhanced Host Controller Interface (EHCI) for USB 2.0 devices, an Open Host Controller Interface/Universal Host Controller interface for USB 1.1 devices (Open Host Controller Interface/Universal Host Controller) Interface, OHCI/UHCI) and the eXtensible Host Controller Interface (XHCI) used by USB 3.0/3.1 devices. In the following description, these interfaces are collectively referred to as the USB physical layer. , USB PHY).
图2为USB设备驱动软件架构图,如图2所示,根据USB设备的类型不同,***软件层面分别加载UHCI/OHCI和EHCI的驱动软件,USBD软件负责向用户驱动(Client Driver)提供统一的USB总线操作方法。其中,Client Driver是设备功能驱动的统称,在USB***架构中,如果当前的USB设备是一个单接口的功能设备,那么Client Driver就只有一个;如果 当前的USB设备是一个包含了多个接口的复合设备,那么每个功能接口都会对应一个Client Driver。Figure 2 is a diagram of the USB device driver software architecture. As shown in Figure 2, the system software layer loads the driver software of UHCI/OHCI and EHCI respectively according to the type of USB device. The USBD software is responsible for providing a unified driver driver (Client Driver). USB bus operation method. Among them, Client Driver is the collective name of device function driver. In the USB system architecture, if the current USB device is a single-interface function device, then there is only one Client Driver; if the current USB device is a device that contains multiple interfaces. Composite devices, then each functional interface will correspond to a Client Driver.
在主机USB驱动软件设计中,所有的USB操作都会以USB请求块(USB Request Block,URB)的形式下发给USB总线,USB总线驱动(USBD)再转换为USB PHY可以识别的硬件操作指令。影响无线数据传输下行速率主要是各个端口的IN方向的URB,频繁的URB操作会严重影响USB PHY的性能,从而影响设备最终性能。In the host USB driver software design, all USB operations are sent to the USB bus in the form of a USB Request Block (URB), and the USB bus driver (USBD) is converted into a hardware operation command that the USB PHY can recognize. The downlink rate affecting wireless data transmission is mainly the URB of the IN direction of each port. Frequent URB operations can seriously affect the performance of the USB PHY, thus affecting the final performance of the device.
本专利将对各接口下发的URB按照权重***规则,重新调配URB的工作方式,以减少USB PHY的负载,将对网络传输接口的影响降到最低。This patent re-allocates the working mode of the URB according to the weight system rules according to the weight system rules issued by each interface to reduce the load of the USB PHY and minimize the impact on the network transmission interface.
图3为根据本发明实施例的USB***框图,如图3所示,在本发明实施例中,在Client Driver与USB总线驱动(USBD)之间增加一个调度器,称之为USB URB调度器(USB URB Scheduler)。USB设备工作时,所有的URB请求都会首先交由USB URB Scheduler来进行统一地调度,根据一定的算法规则决定调度发往USB PHY。所以USB URB Scheduler包括执行体和算法体两个部分,USB URB Schedule和Client Driver的配合机制以及USB URB Schedule中的算法机制将在下面的实施例中具体描述。3 is a block diagram of a USB system according to an embodiment of the present invention. As shown in FIG. 3, in the embodiment of the present invention, a scheduler is added between a Client Driver and a USB bus driver (USBD), which is called a USB URB scheduler. (USB URB Scheduler). When the USB device is working, all URB requests are first handed over to the USB URB Scheduler for unified scheduling, and scheduled to be sent to the USB PHY according to certain algorithm rules. Therefore, the USB URB Scheduler includes two parts of the executable body and the algorithm body. The cooperation mechanism of the USB URB Schedule and the Client Driver and the algorithm mechanism in the USB URB Schedule will be specifically described in the following embodiments.
在本实施例中提供了一种USB接口的数据传输请求调度方法,图4是根据本发明实施例的USB接口的数据传输请求调度流程图,如图4所示,该流程包括如下步骤:In this embodiment, a data transmission request scheduling method of a USB interface is provided. FIG. 4 is a flowchart of a data transmission request scheduling of a USB interface according to an embodiment of the present invention. As shown in FIG. 4, the process includes the following steps:
步骤S402,接收所述USB接口驱动下发的数据传输请求,并判断所述USB接口的类型;Step S402, receiving a data transmission request sent by the USB interface driver, and determining a type of the USB interface;
步骤S404,根据所述USB接口的类型,采用对应的调度频率对所述数据传输请求进行调度。Step S404, scheduling the data transmission request by using a corresponding scheduling frequency according to the type of the USB interface.
在上述实施例中,通过根据USB接口的不同类型,采用不同的频率对该接口的请求进行灵活调度,提高了USB接口的效率。In the above embodiment, the flexibility of the USB interface is improved by flexibly scheduling the request of the interface by using different frequencies according to different types of the USB interface.
实施例一Embodiment 1
在本实施例中,USB多接口复合设备在与主机通讯过程中,USB URB scheduler判断每个URB对应的功能接口类型,对其进行不同的处理,流程如下:In this embodiment, during the communication process with the host, the USB URB scheduler determines the type of the function interface corresponding to each URB, and performs different processing on the same. The process is as follows:
步骤S501:USB多接口复合设备的每个接口所使用的功能驱动在产生URB的同时为其做出标记;Step S501: The function driver used by each interface of the USB multi-interface composite device marks the URB while generating it;
步骤S502:USB URB scheduler在接收到URB的时候根据其标记判断出所对应的接口以及功能;Step S502: The USB URB scheduler determines the corresponding interface and function according to the mark when receiving the URB;
步骤S503:USB URB scheduler根据每个接口功能对通讯效率的不同要求采用不同的调度频率。如果该URB对应接口的功能对通讯效率要求不高,例如,对实时性和时延不敏感,则可延迟一段时间再将该URB发送到USB总线,即,可通过增加该接口URB调度的调度间隔时长减小其调度频率。如果该URB对应接口的功能对通讯效率有很高的要求,例如,对实时 性和时延敏感,则缩小该接口的调度间隔时长,以便立即将该URB发送到USB总线。Step S503: The USB URB scheduler adopts different scheduling frequencies according to different requirements of the communication efficiency of each interface function. If the function of the interface corresponding to the URB does not require high communication efficiency, for example, is not sensitive to real-time and delay, the URB may be sent to the USB bus for a period of time, that is, by scheduling the URB scheduling of the interface. The interval duration reduces its scheduling frequency. If the function of the URB corresponding interface has high requirements on communication efficiency, for example, sensitivity to real-time and delay, the scheduling interval of the interface is reduced to immediately send the URB to the USB bus.
通过本实施例,可以显著提升USB多接口复合设备中某一特定接口的通讯效率,提升用户体验。With this embodiment, the communication efficiency of a specific interface in the USB multi-interface composite device can be significantly improved, and the user experience is improved.
实施例二Embodiment 2
本实施例主要从时间调度算法的角度进行详细的说明。在数据通信中,数据传输往往具有以下两个特性:突发性和集中性。This embodiment is mainly explained in detail from the perspective of a time scheduling algorithm. In data communication, data transmission often has the following two characteristics: burstiness and concentration.
突发性意味着数据的产生不可预估,所以URB的时间间隔不宜过长,以免造成数据的延误和丢失;集中性意味着数据传输往往是集中的,所以设置固定的URB时间间隔也会造成空闲时的浪费。Suddenness means that data generation is unpredictable, so the URB time interval should not be too long to avoid data delay and loss. Concentration means that data transmission is often concentrated, so setting a fixed URB interval will also cause Waste when idle.
下面是本专利实施例中URB调度时间计算公式以及各个参数详细的解释和说明:The following is a calculation formula of the URB scheduling time in the embodiment of the patent and a detailed explanation and description of each parameter:
f(X)=nt(2) x(x<=5)        (公式1) f(X)=nt(2) x (x<=5) (Equation 1)
参数x为空闲时段重新调度的次数;The parameter x is the number of times of rescheduling in the idle period;
参数n为权重系数;The parameter n is a weight coefficient;
参数t为基准调度时间;The parameter t is the reference scheduling time;
时间参数t意味着调度最小时延,它的取值需要根据实际的应用场景确定,如果USB接口对应的业务需要更高的及时性,则可以将t设置的更小;如果USB接口对应业务对时效性不敏感,则可以取较大的值。本专利并不对公式中的各参数取值做具体限制,应用中可根据实际需要做调整。为讲述方便,本例假设t为1ms,那么调度时间分布如下表1所示,调度时间初始值为1ms,倘若USB接口一直无数据,其随着调度算法递增并在第5次时达到最大值16ms,之后保持在16ms不再增加。该实施例可以同时满足数据突发性和集中性的要求。The time parameter t means the minimum delay of the scheduling, and its value needs to be determined according to the actual application scenario. If the service corresponding to the USB interface needs higher timeliness, the t can be set smaller; if the USB interface corresponds to the service pair If the timeliness is not sensitive, a larger value can be taken. This patent does not specifically limit the values of the parameters in the formula, and the application can be adjusted according to actual needs. For convenience of description, this example assumes that t is 1ms, then the scheduling time distribution is as shown in Table 1. The initial value of the scheduling time is 1ms. If the USB interface has no data, it will increase with the scheduling algorithm and reach the maximum value at the 5th time. After 16ms, it will not increase after 16ms. This embodiment can simultaneously satisfy the requirements of data burstiness and concentration.
表1Table 1
调度次数Number of schedules 11 22 33 44 55
调度时间Dispatch time 1ms1ms 2ms2ms 4ms4ms 8ms8ms 16ms16ms
在本发明的另一实施例中涉及的是单一接口的USB设备,同样可将本发明实施例中的调URB度算法应用于此单一接口的USB设备,以实现动态地调整该USB设备接口的数据调度间隔时长,具体调度步骤可参见上述的实施例,在此不再累述。In another embodiment of the present invention, a single interface USB device is involved, and the URB degree algorithm in the embodiment of the present invention can also be applied to the USB device of the single interface to dynamically adjust the USB device interface. For the specific scheduling procedure, refer to the foregoing embodiment, and no further description is provided here.
实施例三Embodiment 3
本实施例主要描述了URB调度中策略的具体流程和方案,在本实施例中,可根据接口功 能对通讯效率的要求不同,将URB的调度进行分类,如果URB对应接口对实时性和时延有很高的要求,对于这类URB不应用调度算法,直接发送到USB PHY,对于其他类的URB则需要参与调度,具体的调度方式如图6所示,包括以下流程:In this embodiment, the specific process and solution of the policy in the URB scheduling are mainly described. In this embodiment, the scheduling of the URB may be classified according to the requirements of the interface function, and the real-time and delay of the interface corresponding to the URB. There is a high requirement. For this type of URB, the scheduling algorithm is not applied and sent directly to the USB PHY. For other types of URBs, the scheduling is required. The specific scheduling mode is shown in Figure 6, which includes the following processes:
步骤S601:设备***主机后,用户态应用APP可以通过设备节点打开USB各接口对应的虚拟设备Step S601: After the device is inserted into the host, the user mode application APP can open the virtual device corresponding to each interface of the USB through the device node.
步骤S602:内核驱动产生URB请求;Step S602: The kernel driver generates a URB request.
步骤S603:内核驱动根据USB接口类型,判断是否需要进行URB调度;Step S603: The kernel driver determines whether URB scheduling is required according to the type of the USB interface.
步骤S604:如果该接口对应的URB不需要调度,那么直接发送到USB PHY;Step S604: If the URB corresponding to the interface does not need to be scheduled, it is directly sent to the USB PHY;
步骤S605:如果该接口对应的URB需要参与调度,那么就设定调度标记,用于告知USB总线驱动;Step S605: If the URB corresponding to the interface needs to participate in scheduling, set a scheduling flag for informing the USB bus driver;
步骤S606:USB总线驱动首先按照调度算法的初始时间调度URB;Step S606: The USB bus driver first schedules the URB according to the initial time of the scheduling algorithm;
步骤S607:判断当前URB对应的USB接口上是否读到了数据,如果是,下次URB调度时间继续保持初始时间;Step S607: determining whether data is read on the USB interface corresponding to the current URB, and if yes, maintaining the initial time for the next URB scheduling time;
步骤S608:如果该接口上没有数据传输,那么URB调度时间按照既定算法递增;Step S608: If there is no data transmission on the interface, the URB scheduling time is incremented according to the established algorithm;
步骤S609:继续判断当前USB总线上是否有数据传输,任意时间读到数据,都需要将调度时间恢复到初始时间;Step S609: continue to judge whether there is data transmission on the current USB bus, and if the data is read at any time, the scheduling time needs to be restored to the initial time;
步骤S610:如果一直没有,则调度时间继续按照既定算法增加,直至到最大值。Step S610: If there is no, the scheduling time continues to increase according to the established algorithm until the maximum value is reached.
实施例四Embodiment 4
本实施例详细描述了多接口USB设备中URB的调度方法和策略,实施例中的多接口USB复合设备有4个接口需要参与调度。在前文的公式1中,仍然设定t为1ms,但每个接口对应的权重***不同,如下表2是各个接口的调度时间策略。This embodiment describes the scheduling method and policy of the URB in the multi-interface USB device in detail. In the multi-interface USB composite device in the embodiment, four interfaces need to participate in scheduling. In Equation 1 above, t is still set to 1 ms, but the weight system corresponding to each interface is different. Table 2 below is the scheduling time policy of each interface.
表2Table 2
Figure PCTCN2018091791-appb-000001
Figure PCTCN2018091791-appb-000001
由上表可知,接口1的权重系数为1,理论上数据读取时最多有16ms的时延;接口2和 3的权重系数为2,理论上数据读取时最多有32ms的时延;接口4的权重***为3,理论上数据读取时最多有48ms的时延。It can be seen from the above table that the weight coefficient of interface 1 is 1, theoretically, there is a maximum delay of 16 ms when data is read; the weight coefficient of interfaces 2 and 3 is 2, and theoretically, there is a delay of up to 32 ms when data is read; The weight system of 4 is 3, and theoretically, the data is read with a delay of up to 48 ms.
通过本实施例,调整每个接口的权重系数,可以影响每个接口的读取效率,在实际使用时可以根据每个接口的功能特征,最大程度的优化USB通讯效率。In this embodiment, adjusting the weight coefficient of each interface can affect the reading efficiency of each interface. In actual use, the USB communication efficiency can be optimized to the maximum extent according to the functional characteristics of each interface.
实施例五Embodiment 5
在本实施例中,无线通讯领域的CPE(Customer Premise Equipment,客户终端设备)类设备由一个主机大板和一个无线通讯设备模块组成,两者之间通过USB接口连接。其中,无线通讯设备模块通过USB枚举多个接口,如用于发送AT命令的AT接口,用于调试的ADB接口、用于诊断log的DIAG接口和网络数据传输的NDIS端口。In this embodiment, a CPE (Customer Premise Equipment) device in the field of wireless communication is composed of a host board and a wireless communication device module, and the two are connected through a USB interface. Among them, the wireless communication device module enumerates multiple interfaces through USB, such as an AT interface for transmitting AT commands, an ADB interface for debugging, a DIAG interface for diagnosing logs, and an NDIS port for network data transmission.
为了降低AT/ADB/DIAG端口工作时对网络NDIS端口的影响,提升NDIS端口的通讯效率,达到满足LTE CAT6 300M的理论下行速率要求,结合本专利实施策略如下:In order to reduce the impact of the AT/ADB/DIAG port on the network NDIS port and improve the communication efficiency of the NDIS port to meet the theoretical downlink rate requirement of the LTE CAT6 300M, the implementation strategy of this patent is as follows:
NDIS端口保持高效传输,不参与调度;AT/ADB/DIAG端口对应的USB URB参与调度,设置权重***均为1,其调度时间仍如表1所示。The NDIS port maintains efficient transmission and does not participate in scheduling. The USB URB corresponding to the AT/ADB/DIAG port participates in scheduling, and the weighting system is set to 1. The scheduling time is still as shown in Table 1.
本实施例的流程如下图7所示,包括以下步骤:The flow of this embodiment is as shown in FIG. 7, and includes the following steps:
步骤S701,主机内核功能驱动产生URB请求;Step S701, the host kernel function driver generates a URB request;
步骤S702,判断URB对应的接口;Step S702, determining an interface corresponding to the URB;
步骤S703,如果为NDIS端口,则不参与调度,将URB请求直接发送到USB PHY;Step S703, if it is an NDIS port, does not participate in scheduling, and directly sends the URB request to the USB PHY;
步骤S704,如果是其它端口,例如,AT/ADB/DIAG端口,则设置URB调度标志;Step S704, if it is another port, for example, an AT/ADB/DIAG port, setting a URB scheduling flag;
步骤S705,按照公式1的调度算法进行调度以及进行数据传输。Step S705, scheduling and performing data transmission according to the scheduling algorithm of Equation 1.
通过本实施例,可以大幅降低在数据高速下载时,AT/DIAG/ADB等端口占用USB总线资源而导致网络下载速率受限,无法满足300M下行速率的状况。With this embodiment, it is possible to greatly reduce the situation that the AT/DIAG/ADB and other ports occupy the USB bus resources when the data is downloaded at a high speed, and the network download rate is limited, and the 300M downlink rate cannot be satisfied.
实施例六Embodiment 6
本发明的技术方案并不局限应用与USB主机侧,同样可应用在USB模块/设备侧,达到提升USB复合设备接口通讯效率的效果。The technical solution of the present invention is not limited to the application and the USB host side, and can also be applied to the USB module/device side, thereby achieving the effect of improving the communication efficiency of the USB composite device interface.
如图8所示是Linux***USB主机/设备的***架构图,如图8所示,在本实施例中,在主机侧增加USB URB Scheduler,同样也可应用在设备侧,本例中在Gadget Client Driver Software(小工具用户驱动软件)和UDC(USB Device Controller)Driver(USB设备控制器驱动)之间增加USB IO request Scheduler(USB输入输出请求调度器)层,对每个client driver 产生的USB IO request进行重新调度,调度策略和算法和主机实施例相同,这里不再赘述。As shown in FIG. 8, the system architecture diagram of the USB host/device of the Linux system is shown in FIG. 8. In this embodiment, the USB URB Scheduler is added on the host side, and can also be applied to the device side. In this example, the Gadget is used. A USB IO request Scheduler layer is added between the Client Driver Software and the UDC (USB Device Controller) Driver, and the USB generated for each client driver is generated. The IO request is re-scheduled, and the scheduling policy and algorithm are the same as the host embodiment, and are not described here.
通过本实施例,可以在设备侧对每个client driver产生的USB IO request进行重新调度,达到提升USB复合设备某一接口通讯效率的方法。In this embodiment, the USB IO request generated by each client driver can be re-scheduled on the device side to improve the communication efficiency of an interface of the USB composite device.
例如,将本实施例的技术方案应用在USB接口连接的CPE类设备中,主机主板可以对无线通讯模块各端口的传输效率进行动态调节,以提升主要业务的通讯指标。For example, the technical solution of the embodiment is applied to a CPE device connected to a USB interface, and the host motherboard can dynamically adjust the transmission efficiency of each port of the wireless communication module to improve the communication index of the main service.
本实施例也可以应用在芯片互联技术HSIC(High-Speed Inter-Chip)***中,HISC***中的主机上可以采用本实施例的技术方案,对HISC***中从设备的各业务端口进行调度,提升芯片间的通讯效率。This embodiment can also be applied to the HSIC (High-Speed Inter-Chip) system. The host in the HISC system can use the technical solution of the embodiment to schedule the service ports of the slave devices in the HISC system. Improve communication efficiency between chips.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
在本实施例中还提供了一种USB接口的数据传输请求调度装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a data transmission request scheduling device of the USB interface is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图9是根据本发明实施例的USB接口请求调度装置的结构框图,如图9所示,该装置100包括接收模块10和调度模块20。其中,接收模块10设置为接收所述USB接口驱动下发的数据传输请求,并判断所述USB接口的类型。调度模块20设置为根据所述USB接口的类型,采用对应的调度频率对所述数据传输请求进行调度。FIG. 9 is a structural block diagram of a USB interface request scheduling apparatus according to an embodiment of the present invention. As shown in FIG. 9, the apparatus 100 includes a receiving module 10 and a scheduling module 20. The receiving module 10 is configured to receive a data transmission request sent by the USB interface driver, and determine a type of the USB interface. The scheduling module 20 is configured to schedule the data transmission request by using a corresponding scheduling frequency according to the type of the USB interface.
图10是根据本发明实施例的USB多接口复合设备结构框图,如图10所示,该USB多接口复合设备200除包括图9所示的USB接口请求调度装置100外,还包括多个不同类似USB接口。这些接口包括,例如用于发送AT命令的AT接口,用于调试的ADB接口、用于诊断log的DIAG接口和网络数据传输的NDIS接口。该复合设备的这些USB接口与数据传输请求调度装置100之间的数据交互同前文中的实施例,在此不再累述。FIG. 10 is a structural block diagram of a USB multi-interface composite device according to an embodiment of the present invention. As shown in FIG. 10, the USB multi-interface composite device 200 includes a plurality of different in addition to the USB interface request scheduling device 100 shown in FIG. Similar to the USB interface. These interfaces include, for example, an AT interface for transmitting AT commands, an ADB interface for debugging, a DIAG interface for diagnosing logs, and an NDIS interface for network data transmission. The data interaction between the USB interface of the composite device and the data transmission request scheduling device 100 is the same as the previous embodiment, and will not be described herein.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处理器中。It should be noted that each of the above modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple In the processor.
本发明的实施例还提供了一种存储介质。该存储介质中存储有计算机程序,这些计算机程序被运行可以执行前文中实施例中的步骤。Embodiments of the present invention also provide a storage medium. Computer programs are stored in the storage medium, and the computer programs are executed to perform the steps in the foregoing embodiments.
在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。In this embodiment, the foregoing storage medium may include, but not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk. A variety of media that can store program code.
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。Embodiments of the present invention also provide an electronic device comprising a memory and a processor having a computer program stored therein, the processor being arranged to execute a computer program to perform the steps of any of the method embodiments described above.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
通过本发明的上述实施例,与现有技术相比,具有如下技术效果:通过公式1可以具体设置每个接口的调度参数和调度时间;结合实际的应用场景,为不同的接口设定不同的权重***,达到降低其对USB总线影响的目的;针对CPE项目中遇到的由于AT/DIAG/ADB端口影响而导致NDIS网络下行无法到达LTE CAT6 300M下行速率的问题,本专利可以有效解决该问题并且不会对其它功能模块产生较大波及。本发明的实施可以大幅度的提升接口通讯效率,在一定情况下避免因为速率问题更换USB控制器硬件的情况,产生较大的经济效益;本发明实施提供的技术方案同样可以应用到USB 1.1、USB 3.0等其它设备上,提升用户体验;本发明提供的技术方案也可以应用到USB设备侧,同样可以提升USB复合设备中某一接口的通讯效率。Compared with the prior art, the foregoing technical solution has the following technical effects: the scheduling parameter and the scheduling time of each interface can be specifically set by using the formula 1. In combination with the actual application scenario, different interfaces are set for different interfaces. The weight system achieves the purpose of reducing its impact on the USB bus; this patent can effectively solve the problem that the NDIS network downlink cannot reach the LTE CAT6 300M downlink rate due to the impact of the AT/DIAG/ADB port encountered in the CPE project. And it will not cause a big impact on other functional modules. The implementation of the present invention can greatly improve the communication efficiency of the interface, and avoid the situation of replacing the USB controller hardware due to the speed problem under certain circumstances, thereby generating a large economic benefit; the technical solution provided by the implementation of the present invention can also be applied to the USB 1.1. On other devices such as USB 3.0, the user experience is improved; the technical solution provided by the present invention can also be applied to the USB device side, and the communication efficiency of an interface in the USB composite device can also be improved.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
如上所述,本发明实施例提供的一种USB接口请求调度方法、装置及设备具有以下有益效果:根据USB接口的不同类型,采用不同的频率对该接口的请求进行灵活调度,提高了USB接口的效率。As described above, the USB interface request scheduling method, apparatus, and device provided by the embodiments of the present invention have the following beneficial effects: according to different types of USB interfaces, flexible scheduling of requests for the interface is performed with different frequencies, and the USB interface is improved. s efficiency.

Claims (26)

  1. 一种通用串行总线USB接口请求调度方法,包括:A universal serial bus USB interface request scheduling method includes:
    接收所述USB接口的数据传输请求,并判断所述USB接口的类型;Receiving a data transmission request of the USB interface, and determining a type of the USB interface;
    根据所述USB接口的类型,采用对应的调度频率对所述数据传输请求进行调度。According to the type of the USB interface, the data transmission request is scheduled by using a corresponding scheduling frequency.
  2. 根据权利要求1所述的方法,其中,判断所述USB接口的类型,包括:The method of claim 1, wherein determining the type of the USB interface comprises:
    根据所述数据传输请求中携带的接口类型标识判断所述USB接口的类型。Determining the type of the USB interface according to the interface type identifier carried in the data transmission request.
  3. 根据权利要求1所述的方法,其中,采用对应的调度频率对所述数据传输请求进行调度之前,还包括:The method of claim 1, wherein before scheduling the data transmission request with a corresponding scheduling frequency, the method further comprises:
    根据所述USB接口的类型,确定是否需要对所述数据传输请求进行调度。Determining whether the data transmission request needs to be scheduled according to the type of the USB interface.
  4. 根据权利要求3所述的方法,其中,所述方法还包括:The method of claim 3, wherein the method further comprises:
    当确认不需要对所述数据传输请求进行调度时,将所述数据传输请求直接发送至USB物理层接口。When it is confirmed that the data transmission request does not need to be scheduled, the data transmission request is directly sent to the USB physical layer interface.
  5. 根据权利要求1所述的方法,其中,根据所述USB接口的类型,采用对应的调度频率对所述数据传输请求进行调度,包括:The method of claim 1, wherein scheduling the data transmission request by using a corresponding scheduling frequency according to the type of the USB interface comprises:
    针对不同的USB接口的类型设置对应的基准调度间隔时长,根据所述基准调度间隔时长对所述数据传输请求进行调度。Setting a corresponding reference scheduling interval duration for different types of USB interfaces, and scheduling the data transmission request according to the reference scheduling interval duration.
  6. 根据权利要求5所述的方法,其中,根据所述基准调度间隔时长对所述数据传输请求进行调度包括:The method of claim 5, wherein scheduling the data transmission request according to the reference scheduling interval duration comprises:
    在所述USB接口的调度时刻到来时,判断USB总线上是否有需要读取的数据,如果无,则增大所述USB接口的下一次调度间隔时长,如果有,则对所述数据进行调度,并将所述USB接口的下一次调度间隔时长恢复为所述基准调度间隔时长,。When the scheduling moment of the USB interface arrives, it is determined whether there is data to be read on the USB bus, and if not, the next scheduling interval duration of the USB interface is increased, and if so, the data is scheduled. And restoring the next scheduling interval duration of the USB interface to the reference scheduling interval duration.
  7. 根据权利要求6所述的方法,其中,如果所述USB总线上没有需要读取的数据,则按照t(2) x增大所述USB接口的下一次调度间隔时长,其中,t为基准调度间隔时长,X为空闲时段重新调度的次数。 The method according to claim 6, wherein if there is no data to be read on the USB bus, the next scheduling interval duration of the USB interface is increased according to t(2) x , wherein t is a reference schedule The interval duration, X is the number of times of rescheduling in the idle period.
  8. 根据权利要求1所述的方法,其中,所述USB接口的类型包括以下至少之一:The method of claim 1, wherein the type of the USB interface comprises at least one of the following:
    网卡接口、AT接口、诊断DIAG接口、安卓调试桥ADB接口。NIC interface, AT interface, diagnostic DIAG interface, Android debug bridge ADB interface.
  9. 根据权利要求1所述的方法,其中,所述数据传输为下行传输,所述数据传输请求为通用串行总线请求块URB;或者,所述数据传输为上行传输,所述数据传输请求为通用串行总线输入输出USB IO。The method of claim 1, wherein the data transmission is a downlink transmission, the data transmission request is a universal serial bus request block URB; or the data transmission is an uplink transmission, and the data transmission request is a universal Serial bus input and output USB IO.
  10. 一种通用串行总线USB接口请求调度装置,包括:A universal serial bus USB interface request scheduling device includes:
    接收模块,设置为接收所述USB接口的数据传输请求,并判断所述USB接口的类型;a receiving module, configured to receive a data transmission request of the USB interface, and determine a type of the USB interface;
    调度模块,设置为根据所述USB接口的类型,采用对应的调度频率对所述数据传输请求进行调度。The scheduling module is configured to schedule the data transmission request by using a corresponding scheduling frequency according to the type of the USB interface.
  11. 根据权利要求10所述的装置,其中,所述接收模块包括:The apparatus of claim 10, wherein the receiving module comprises:
    判断单元,设置为根据所述数据传输请求中携带的接口类型标识判断所述USB接口的类型。The determining unit is configured to determine the type of the USB interface according to the interface type identifier carried in the data transmission request.
  12. 根据权利要求11所述的装置,其中,The apparatus according to claim 11, wherein
    所述判断单元,还设置为根据所述USB接口的类型,确定是否需要对所述数据传输请求进行调度。The determining unit is further configured to determine, according to the type of the USB interface, whether the data transmission request needs to be scheduled.
  13. 根据权利要求10所述的装置,其中,The device according to claim 10, wherein
    所述调度模块,还设置为在确认不需要对所述数据传输请求进行调度情况下,将所述数据传输请求直接发送至USB物理层接口。The scheduling module is further configured to send the data transmission request directly to the USB physical layer interface if it is confirmed that the data transmission request is not required to be scheduled.
  14. 根据权利要求10所述的装置,其中,所述调度模块还包括:The apparatus of claim 10, wherein the scheduling module further comprises:
    设置单元,设置为针对不同的USB接口的类型设置对应的基准调度间隔时长。The setting unit is set to set a corresponding reference scheduling interval duration for different types of USB interfaces.
  15. 根据权利要求14所述的装置,其中,The device according to claim 14, wherein
    所述调度模块,还设置为在所述USB接口的调度时刻到来时,判断USB总线上是否有需要读取的数据,如果无,则增大所述USB接口的下一次调度间隔时长,如果有,则对所述数据进行调度,并将所述USB接口的下一次调度间隔时长恢复为所述基准调度间隔时长。The scheduling module is further configured to determine whether there is data to be read on the USB bus when the scheduling time of the USB interface arrives, and if not, increase the length of the next scheduling interval of the USB interface, if any And scheduling the data, and restoring the next scheduling interval duration of the USB interface to the reference scheduling interval duration.
  16. 根据权利要求15所述的装置,其中,在所述USB总线上没有需要读取的数据的情况下,所述调度模块按照t(2) x增大所述USB接口的下一次调度间隔时长,其中,t为基准调度间隔时长,X为空闲时段重新调度的次数。 The apparatus according to claim 15, wherein, in the case that there is no data to be read on the USB bus, the scheduling module increases the duration of the next scheduling interval of the USB interface according to t(2) x , Where t is the duration of the reference scheduling interval and X is the number of rescheduling of the idle period.
  17. 根据权利要求10所述的装置,其中,所述USB接口的类型包括以下至少之一:The apparatus of claim 10, wherein the type of the USB interface comprises at least one of the following:
    网卡接口、AT接口、诊断DIAG接口、安卓调试桥ADB接口。NIC interface, AT interface, diagnostic DIAG interface, Android debug bridge ADB interface.
  18. 根据权利要求10所述的装置,其中,所述数据传输为下行传输,所述数据传输请求为通用串行总线请求块URB;或者,所述数据传输为上行传输,所述数据传输请求为通用串行总线输入输出USB IO。The apparatus according to claim 10, wherein said data transmission is a downlink transmission, said data transmission request is a universal serial bus request block URB; or said data transmission is an uplink transmission, and said data transmission request is a general purpose Serial bus input and output USB IO.
  19. 一种通用串行总线USB多接口复合设备,包括中央处理器CPU和USB控制器,USB控制器通过外设部件互连标准PCI总线与所述CPU相连,其中,所述USB控制器包括USB 请求块调度器和USB物理层接口,其中A universal serial bus USB multi-interface composite device comprising a central processing unit CPU and a USB controller, wherein the USB controller is connected to the CPU through a peripheral component interconnecting a standard PCI bus, wherein the USB controller includes a USB request Block scheduler and USB physical layer interface, where
    所述USB请求块调度器,设置为接收USB多接口复合设备的用户驱动下发的URB请求,并根据所述USB URB请求中携带的接口类型,采用对应的调度频率将所述URB请求发送至所述USB物理层接口。The USB request block scheduler is configured to receive a URB request sent by a user driver of the USB multi-interface composite device, and send the URB request to the corresponding scheduling frequency according to the interface type carried in the USB URB request. The USB physical layer interface.
  20. 根据权利要求19所述的USB多接口复合设备,其中,所述接口类型包括以下至少之一:The USB multi-interface composite device according to claim 19, wherein the interface type comprises at least one of the following:
    网卡接口、AT接口、诊断DIAG接口、安卓调试桥ADB接口。NIC interface, AT interface, diagnostic DIAG interface, Android debug bridge ADB interface.
  21. 一种通用串行总线USB接口请求调度方法,包括:A universal serial bus USB interface request scheduling method includes:
    在所述USB接口的调度时刻到来时,判断USB总线上是否有需要读取的数据;When the scheduling moment of the USB interface arrives, it is determined whether there is data on the USB bus that needs to be read;
    根据判断结果动态地调整所述USB接口的下一次调度间隔时长。The next scheduling interval duration of the USB interface is dynamically adjusted according to the determination result.
  22. 根据权利要求21所述的方法,其中,根据判断结果动态地调整所述USB接口的下一次调度间隔时长,包括:The method of claim 21, wherein dynamically adjusting the next scheduling interval duration of the USB interface according to the determination result comprises:
    如果所述USB总线上没有需要读取的数据,则增大所述USB接口的下一次调度间隔时长。If there is no data to be read on the USB bus, the next scheduling interval duration of the USB interface is increased.
  23. 根据权利要求22所述的方法,其中,按照t(2) x增大所述USB接口的下一次调度间隔时长,其中,t为所述USB接口的基准调度间隔时长,X为空闲时段重新调度的次数。 The method according to claim 22, wherein the next scheduling interval duration of the USB interface is increased according to t(2) x , wherein t is a reference scheduling interval duration of the USB interface, and X is an idle period rescheduling The number of times.
  24. 根据权利要求22或23所述的方法,其中,所述方法还包括:The method of claim 22 or 23, wherein the method further comprises:
    在所述USB接口的下一次调度时刻到来时,继续判断USB总线上是否有需要读取的数据;When the next scheduling time of the USB interface arrives, it continues to determine whether there is data to be read on the USB bus;
    如果USB总线上有需要读取的数据,则对所述数据进行调度,并将所述USB接口的下一次调度间隔时长恢复为所述USB接口的基准调度间隔时长。If there is data to be read on the USB bus, the data is scheduled, and the next scheduling interval of the USB interface is restored to the reference scheduling interval duration of the USB interface.
  25. 一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至9任一项中所述的方法,或者执行所述权利要求21至24任一项中所述的方法。A storage medium having stored therein a computer program, wherein the computer program is configured to execute the method of any one of claims 1 to 9 at runtime or to perform the claim 21 The method described in any one of 24.
  26. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至9任一项中所述的方法,或者执行所述权利要求21至24任一项中所述的方法。An electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor being arranged to execute the computer program to perform the method of any one of claims 1 to 9, Or the method of any one of claims 21 to 24 is carried out.
PCT/CN2018/091791 2017-08-25 2018-06-19 Usb interface request scheduling method and apparatus, and device WO2019037527A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710743636.9A CN109426643A (en) 2017-08-25 2017-08-25 USB interface request scheduling method, device and equipment
CN201710743636.9 2017-08-25

Publications (1)

Publication Number Publication Date
WO2019037527A1 true WO2019037527A1 (en) 2019-02-28

Family

ID=65439776

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/091791 WO2019037527A1 (en) 2017-08-25 2018-06-19 Usb interface request scheduling method and apparatus, and device

Country Status (2)

Country Link
CN (1) CN109426643A (en)
WO (1) WO2019037527A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111090608B (en) * 2019-12-26 2021-07-09 深圳市优***科技股份有限公司 Data transmission method and system based on USB device
CN111221751B (en) * 2020-01-13 2023-10-27 中孚安全技术有限公司 Method and system for improving usb batch transmission speed in Linux system
CN114490489A (en) * 2020-11-13 2022-05-13 大唐联仪科技有限公司 Request processing method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020199053A1 (en) * 2001-04-10 2002-12-26 Kunihiro Kondoh USB interface device of peripheral device
CN101882116A (en) * 2010-06-13 2010-11-10 中兴通讯股份有限公司 Method for realizing audio transmission and mobile terminal
CN102306133A (en) * 2011-07-04 2012-01-04 珠海全志科技股份有限公司 USB (universal serial bus) host controller and data transfer method thereof
CN106897242A (en) * 2017-01-17 2017-06-27 建荣半导体(深圳)有限公司 A kind of USB equipment complexes and its method of work

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050028172A1 (en) * 2003-07-30 2005-02-03 Matsushita Electric Industrial Co., Ltd. Method and apparatus for installing software
CN101359303B (en) * 2007-08-03 2011-08-03 深圳艾科创新微电子有限公司 On-line debugging microcontroller and apparatus and debug method of external device thereof
CN106549729B (en) * 2015-09-21 2020-09-15 天地融科技股份有限公司 Data sending method and device and data receiving method and device
CN106844251B (en) * 2015-12-03 2022-03-22 中兴通讯股份有限公司 Data transmission method and device
CN106026232A (en) * 2016-06-01 2016-10-12 北京小米移动软件有限公司 Detecting method and apparatus for USB port type

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020199053A1 (en) * 2001-04-10 2002-12-26 Kunihiro Kondoh USB interface device of peripheral device
CN101882116A (en) * 2010-06-13 2010-11-10 中兴通讯股份有限公司 Method for realizing audio transmission and mobile terminal
CN102306133A (en) * 2011-07-04 2012-01-04 珠海全志科技股份有限公司 USB (universal serial bus) host controller and data transfer method thereof
CN106897242A (en) * 2017-01-17 2017-06-27 建荣半导体(深圳)有限公司 A kind of USB equipment complexes and its method of work

Also Published As

Publication number Publication date
CN109426643A (en) 2019-03-05

Similar Documents

Publication Publication Date Title
CN107924341B (en) Real-time local and global datacenter network optimization based on platform telemetry data
US8140704B2 (en) Pacing network traffic among a plurality of compute nodes connected using a data communications network
Ni et al. A distributed drafting algorithm for load balancing
US7895260B2 (en) Processing data access requests among a plurality of compute nodes
EP3255553B1 (en) Transmission control method and device for direct memory access
US9703595B2 (en) Multi-core system with central transaction control
US7958274B2 (en) Heuristic status polling
US20090019190A1 (en) Low Latency, High Bandwidth Data Communications Between Compute Nodes in a Parallel Computer
US9354952B2 (en) Application-driven shared device queue polling
WO2019037527A1 (en) Usb interface request scheduling method and apparatus, and device
US11520632B1 (en) Specifying behavior among a group of computing tasks
US20090204789A1 (en) Distributing parallel algorithms of a parallel application among compute nodes of an operational group in a parallel computer
JP2013530573A (en) Resource affinity through dynamic reconfiguration of multiqueue network adapters
CN107094119B (en) A kind of control method for equalizing load and system based on cloud computing and SDN network
CN112039722B (en) MQTT protocol simulation method and simulation equipment
US20130139156A1 (en) Application-driven shared device queue polling in a virtualized computing environment
JP2014120097A (en) Information processor, program, and information processing method
CN109284192B (en) Parameter configuration method and electronic equipment
WO2022060490A1 (en) Mechanism to automatically prioritize i/o for nfv workloads at platform overload
CN113032102A (en) Resource rescheduling method, device, equipment and medium
CN105487403A (en) Establishment of motion control system based on CAN and simulation modeling method
CN109062834B (en) DMA-based SPI communication method, electronic equipment, storage medium and device
CN109117247A (en) A kind of virtual resource management system and method based on heterogeneous polynuclear topology ambiguity
CN108009074B (en) Multi-core system real-time evaluation method based on model and dynamic analysis
CN113900791A (en) Job processing method and related equipment

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: 18848479

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18848479

Country of ref document: EP

Kind code of ref document: A1