A video streaming method, apparatus, device and storage medium
By determining device priorities in a remote USB control system and combining layered coding technology and transmission control strategies, the problem of uneven bandwidth allocation in video stream transmission in a remote USB control system is solved, achieving efficient video stream transmission and resource utilization, and improving the stability and flexibility of the system.
Patent Information
- Application Number
- CN202510252320.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-03-05
AI Technical Summary
Existing remote USB control systems lack prioritization of near-end devices in video streaming transmission. This results in critical devices' video streaming transmission not being prioritized when bandwidth is limited, affecting system performance and critical task execution. Furthermore, they are difficult to adapt to complex multi-device scenarios and dynamic network environments.
By determining the control commands and device priorities of the remote control terminal, and combining layered coding technology and transmission control strategies, bandwidth resources are preferentially allocated to high-priority devices to ensure the quality of video stream transmission and to respond flexibly to network changes, thereby achieving the rational utilization of resources.
It improves the overall operating efficiency and video stream transmission quality of the system, ensures that the video stream of critical equipment remains stable under various network environments and equipment combinations, avoids bandwidth waste and excessive occupation, and achieves efficient utilization of network resources.
Smart Images

Figure CN119766793B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data transmission, and in particular to a video stream transmission method, device, equipment and storage medium. BACKGROUND
[0002] In today's digital age, remote control technology is increasingly widely used in various fields. In particular, in scenarios involving remote USB control of multiple proximal devices, efficient and stable video stream transmission is crucial.
[0003] However, existing remote USB control systems face many challenges in video stream transmission. Traditional transmission methods often lack priority differentiation for proximal devices, resulting in the video stream transmission of critical devices not being prioritized in the case of limited bandwidth, affecting the overall performance of the system and the execution of critical tasks. In addition, existing transmission methods lack adaptability and flexibility in dealing with complex multi-device scenarios and dynamically changing network environments, making it difficult to meet the growing demand for remote control. SUMMARY
[0004] The present application provides a video stream transmission method, device, equipment and storage medium to ensure the orderly transmission of data in a remote USB control system, avoiding the problems of stuttering caused by the video quality of remote manual control requests or the inability to achieve perfect video experience, and ensuring the adaptive transmission of user video data.
[0005] According to an aspect of the present application, a video stream transmission method is provided, applied to a remote USB control system, including a remote control end and each proximal device, the method comprising:
[0006] obtaining a control instruction of the remote control end, determining a target proximal device and its corresponding device priority based on the control instruction, wherein the device priority includes high priority and low priority;
[0007] determining a target bandwidth corresponding to the target proximal device, and determining a bandwidth sufficient condition according to the target bandwidth, wherein the bandwidth sufficient condition includes sufficient bandwidth and insufficient bandwidth;
[0008] performing video stream transmission according to the bandwidth sufficient condition and the device priority.
[0009] Optionally, the determining the target near-end device and the device priority corresponding to the target near-end device based on the control instruction comprises: determining a target device identifier in the control instruction; determining the target near-end device from the near-end devices according to the target device identifier; determining a device type corresponding to the target near-end device, wherein the device type comprises a video device and a non-video device; when the device type is the video device, determining that the device priority of the target near-end device is a high priority; and when the device type is the non-video device, determining that the device priority of the target near-end device is a low priority.
[0010] Optionally, the determining the target bandwidth corresponding to the target near-end device comprises: when the target near-end device is the high priority device, determining a bandwidth required for transmitting a base layer of a video stream of the target near-end device as the target bandwidth; and when the target near-end device is the low priority device, determining a bandwidth required for transmitting communication data of the target near-end device as the target bandwidth.
[0011] Optionally, the determining the bandwidth sufficiency condition according to the target bandwidth comprises: determining a residual bandwidth of a current transmission network; and determining whether the target bandwidth is less than or equal to the residual bandwidth, wherein if yes, the bandwidth sufficiency condition is determined as bandwidth sufficient; otherwise, the bandwidth sufficiency condition is determined as bandwidth insufficient.
[0012] Optionally, the performing the video stream transmission according to the bandwidth sufficiency condition and the device priority comprises: when the bandwidth sufficiency condition is bandwidth sufficient and the device priority is the high priority, determining a bandwidth required for a refinement layer of the target near-end device, determining a target refinement layer number of the target near-end device according to the residual bandwidth and the bandwidth required for the refinement layer, and performing the video stream transmission between the remote control terminal and the target near-end device; and when the bandwidth sufficiency condition is bandwidth sufficient and the device priority is the low priority, directly performing data transmission between the remote control terminal and the target near-end device.
[0013] Optionally, the performing the video stream transmission according to the bandwidth sufficiency condition and the device priority comprises: when the bandwidth sufficiency condition is bandwidth insufficient, polling high priority devices being in transmission in sequence to determine access times; arranging the high priority devices in sequence according to the access times from far to near to generate a high priority transmission queue; determining target high priority devices from the high priority transmission queue in sequence, reducing refinement layers of the target high priority devices, and obtaining corresponding updated bandwidths; and when the updated bandwidths are greater than or equal to the target bandwidth, starting data transmission between the remote control terminal and the target near-end device.
[0014] Optionally, after the corresponding updated bandwidths are obtained, the method further comprises: determining refinement layer numbers of the high priority devices in the high priority transmission queue; and when the refinement layer numbers are all 0 and the updated bandwidths are less than the target bandwidth, adding the target near-end device to a tail of a corresponding high priority to-be-scheduled queue or a low priority to-be-scheduled queue.
[0015] Optionally, the method further comprises: when the stop-transmitting instruction of the remote control terminal is acquired, determining the idle bandwidth based on the stop-transmitting instruction; determining whether there is a high-priority device to be scheduled in the high-priority to-be-scheduled queue, and if yes, determining a target scheduled device from the high-priority to-be-scheduled queue based on the idle bandwidth to perform the video stream transmission; or if not, determining a target scheduled device from the low-priority to-be-scheduled queue based on the idle bandwidth to perform the data transmission.
[0016] According to another aspect of the present application, there is provided an electronic device comprising:
[0017] at least one processor;
[0018] and a memory connected to the at least one processor in communication;
[0019] wherein the memory stores a computer program capable of being executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the video stream transmission method according to any one of the embodiments of the present application.
[0020] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for enabling a processor to perform the video stream transmission method according to any one of the embodiments of the present application when executed by the processor.
[0021] The technical solution of the embodiments of the present application can allocate the limited bandwidth resources to the target near-end device with high priority first, ensure the video stream transmission quality of the device, and improve the overall operation efficiency of the system. The combination of the layered encoding technology and the transmission control strategy can ensure that the system can respond flexibly in the case of network burst, delay, etc., so that the system can maintain good performance under various network environments and device combinations, and maximize the orderly communication of the system. Precise transmission according to the bandwidth condition and the device priority can avoid the waste and excessive occupation of bandwidth, and realize the rational use of network resources.
[0022] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0024] Figure 1 is a flow chart of a video streaming method according to an embodiment of the present application;
[0025] Figure 2 is a flow chart of another video streaming method according to another embodiment of the present application;
[0026] Figure 3 is a structural schematic diagram of a video streaming device according to an embodiment of the present application;
[0027] Figure 4 is a structural schematic diagram of an electronic device implementing a video streaming method according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by the personnel in the art without creative labor should belong to the protection scope of the present application.
[0029] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to the clearly listed steps or units, but can include other steps or units not clearly listed or inherent to the process, method, product or device.
[0030] Embodiment One
[0031] Figure 1 A flow chart of a video streaming method according to an embodiment of the present application is provided, and the present embodiment can be applied to a remote USB control system. The method can be executed by a video streaming device, which can be implemented in the form of hardware and / or software, and can be configured in a computer controller. As shown in the figure, the method comprises: Figure 1
[0032] S110, acquire a control instruction of the remote control terminal, determine a target near-end device and a device priority corresponding to the target near-end device based on the control instruction, wherein the device priority comprises a high priority and a low priority.
[0033] The remote USB control system refers to a system in which a user controls a near-end connected USB device from a remote location, and includes a remote control terminal and near-end devices. The remote control terminal can give instructions to the near-end devices as if the operation is local, break through the distance limit, and realize remote device management, which is common in remote office and remote monitoring scenarios. The remote control terminal is located at a remote location and is a device or software platform for the user to issue various operation instructions, which can be a computer, a mobile phone APP, etc. The near-end devices are located at a local end and are close to the actual business scenario. The near-end devices are connected to the system through a USB interface, accept instructions from the remote control terminal, and perform corresponding actions, such as a camera and a printer. The control instruction refers to instruction information issued by the remote control terminal, which carries the user's operation intention and informs the near-end device of the specific operation to be performed, such as starting video recording or adjusting the camera angle. The target near-end device refers to a specific device selected according to the control instruction among the near-end devices, which is about to perform a corresponding operation. The device priority refers to the priority of the near-end device in the allocation of transmission resources, which is divided into a high priority and a low priority. The transmission demand of the high priority device is often given priority, which usually involves critical business and real-time video transmission, and the low priority follows.
[0034] Optionally, determining the target near-end device and the device priority corresponding to the target near-end device based on the control instruction comprises: determining a target device identifier in the control instruction, determining the target near-end device from the near-end devices according to the target device identifier; determining a device type corresponding to the target near-end device, wherein the device type comprises a video device and a non-video device; when the device type is a video device, determining that the device priority of the target near-end device is a high priority; and when the device type is a non-video device, determining that the device priority of the target near-end device is a low priority.
[0035] Specifically, the control instruction contains a target device identifier, which is a unique identity of each near-end device. The system can quickly screen among the near-end devices based on the target device identifier to determine the corresponding target near-end device. The device type is divided into two types: a video device and a non-video device.
[0036] It can be known that video devices often undertake the task of real-time picture capture and transmission, such as cameras, monitoring probes used in security monitoring scenes, or live cameras in remote teaching, and the video stream output by them has very high requirements for timeliness and continuity, so the video devices will be determined as high priority. Non-video devices, such as ordinary USB printers and mobile hard drives, are mainly used for storage and printing tasks and do not involve critical video transmission tasks, and the demand for transmission immediacy is low, so non-video devices will be considered as low priority. By determining the device priority, the bandwidth and transmission resources can be more reasonably allocated according to different priorities in the subsequent video stream transmission link.
[0037] In S120, a target bandwidth corresponding to the target near-end device is determined, and a bandwidth sufficiency condition is determined according to the target bandwidth, where the bandwidth sufficiency condition includes bandwidth sufficiency and bandwidth insufficiency.
[0038] The target bandwidth is a network bandwidth value required by the target near-end device to stably and smoothly complete a transmission task. The bandwidth sufficiency condition refers to a determination result of whether the available bandwidth under the current network environment can meet the demand of the target near-end device, and includes bandwidth sufficiency and bandwidth insufficiency.
[0039] Optionally, the target bandwidth corresponding to the target near-end device is determined, including: when the target near-end device is a high-priority device, a bandwidth required for transmitting a base layer of a video stream of the target near-end device is taken as the target bandwidth; and when the target near-end device is a low-priority device, a bandwidth required for transmitting communication data of the target near-end device is taken as the target bandwidth.
[0040] It should be noted that the Scalable Video Coding (SVC) technology is added in the data transmission of the high-priority device in the embodiment, that is, the USB data stream is subjected to scalable coding at the near end, and is divided into one base layer and multiple enhancement layers. The base layer can be independently decoded and display the most basic video picture, and the enhancement layer can optimize the base layer video picture and increase the experience of video quality. That is, for the high-priority device, the base layer carries the core information such as the most critical outline and main color of the picture, and the video cannot be normally watched if the base layer data is lost, so the bandwidth required for transmitting the base layer of the video stream of the target near-end device is taken as the target bandwidth, which can ensure that the basic video picture is maintained even when the network condition is poor, and the most basic viewing demand of the user is met. For the low-priority device, the bandwidth required for transmitting the communication data of the target near-end device is taken as the target bandwidth, so as to avoid excessive occupation of network resources, because the low-priority device does not need the bandwidth of the order of high-definition video.
[0041] It can be known that the SVC layered coding technology can efficiently compress the video stream data, and the compression ratio can generally reach 1:50 or even 1:100, and only the basic layer or a small amount of enhanced layer video data is transmitted when the network bandwidth is limited, which ensures that the number of remote controllable USB devices is greatly increased under the same Ethernet bandwidth limitation, and even under a small capacity network port, the transmission of a variety of video devices can be effectively supported, and the application scene of the remote USB control system is expanded.
[0042] Optionally, the bandwidth sufficient condition is determined according to the target bandwidth, including: determining the residual bandwidth of the current transmission network; determining whether the target bandwidth is less than or equal to the residual bandwidth, if yes, determining that the bandwidth sufficient condition is bandwidth sufficient; otherwise, determining that the bandwidth sufficient condition is bandwidth insufficient.
[0043] Specifically, the controller determines the residual bandwidth of the current transmission network, and compares the target bandwidth with the residual bandwidth. If the target bandwidth is less than or equal to the residual bandwidth, it indicates that the current network resources are sufficient to support the video stream transmission of the target near-end device, so it is determined that the bandwidth sufficient condition is bandwidth sufficient. If the target bandwidth exceeds the residual bandwidth, it indicates that the existing network resources cannot meet the demand, so it is determined that the bandwidth sufficient condition is bandwidth insufficient.
[0044] S130, video stream transmission is performed according to the bandwidth sufficient condition and the device priority.
[0045] Optionally, the video stream transmission is performed according to the bandwidth sufficient condition and the device priority, including: when the bandwidth sufficient condition is bandwidth sufficient and the device priority is high priority, determining the required bandwidth of the enhanced layer corresponding to the target near-end device, determining the target enhanced layer number of the target near-end device according to the residual bandwidth and the required bandwidth of the enhanced layer, to perform the video stream transmission between the remote control end and the target near-end device; when the bandwidth sufficient condition is bandwidth sufficient and the device priority is low priority, directly performing the data transmission between the remote control end and the target near-end device.
[0046] Specifically, when the bandwidth is sufficient and the device priority is high priority, the system further determines the required bandwidth of the enhanced layer corresponding to the target near-end device. Then, the residual bandwidth of the current transmission network is compared with the required bandwidth of the enhanced layer, and the target enhanced layer number is determined. For example, when the residual bandwidth is large, several layers of enhanced layers can be added to present super high definition and smooth video pictures to the user, and to realize high-quality video stream transmission between the remote control end and the target near-end device. The main function of the non-video device is not video transmission, and the demand for picture quality improvement is small, so when the bandwidth is sufficient and the device priority is low priority, the system skips the picture quality optimization process and directly carries out the data transmission between the remote control end and the target near-end device, so as to quickly interact the state information and operation feedback of the device, save resources, and meet the basic use scene demand of the non-video device.
[0047] Optionally, the video streaming according to the bandwidth sufficient condition and the device priority comprises: when the bandwidth sufficient condition is bandwidth insufficient, polling each high-priority device being transmitted in sequence to determine an access time; arranging each high-priority device according to the access time from far to near to generate a high-priority transmission queue; determining a target high-priority device from the high-priority transmission queue in sequence, reducing the enhancement layer of the target high-priority device, and obtaining a corresponding updated bandwidth; and when the updated bandwidth is greater than or equal to the target bandwidth, starting data transmission between the remote control terminal and the target near-end device.
[0048] Specifically, in the bandwidth insufficient condition, in order to guarantee the transmission of critical video streams as much as possible, the system will take resource regulation means. First, the system will poll each high-priority device being transmitted to determine an access time, through which the length of time that the device occupies the transmission link, i.e., the occupation of bandwidth resources by each high-priority device, can be determined. Then, the system will arrange according to the access time from far to near to generate a high-priority transmission queue. The high-priority transmission queue is a kind of priority reordering, and the devices with long access times are arranged in the front, indicating that they will be given priority consideration in subsequent adjustment, because from the perspective of resource balanced utilization, they have long occupied the link and need to be adjusted first. Then, the system will take each high-priority device in the high-priority transmission queue as a target high-priority device in sequence, and try to reduce its enhancement layer, i.e., the system will reduce the enhancement layer of each high-priority device in the high-priority transmission queue in sequence, and the enhancement layer can be reduced to 0 at most. After the enhancement layer is reduced, the bandwidth required by the device decreases, and the corresponding updated bandwidth is generated. When the updated bandwidth is greater than or equal to the target bandwidth, the bandwidth condition for new device access is met, i.e., at this time the updated bandwidth can meet the bandwidth required for the transmission of the base layer of the high-priority device or the transmission of the communication data of the low-priority device, and the system can start data transmission between the remote control terminal and the target near-end device.
[0049] Optionally, after the corresponding updated bandwidth is obtained, the method further comprises: determining the number of enhancement layers of each high-priority device in the high-priority transmission queue; and when the number of enhancement layers is all 0 and the updated bandwidth is less than the target bandwidth, adding the target near-end device to the tail of the corresponding high-priority to-be-scheduled queue or low-priority to-be-scheduled queue.
[0050] Specifically, if the entire high-priority transmission queue is traversed and it is found that the number of enhancement layers of all devices has been reduced to 0, and the updated bandwidth is still less than the target bandwidth, it indicates that even if the high-priority device being transmitted is reduced to the maximum extent, it is still unable to free up enough bandwidth for the target near-end device. At this time, the system will add the target near-end device to the corresponding to-be-scheduled queue according to the priority of the target near-end device. That is, if the target near-end device itself is a high-priority device, it is put into the tail of the high-priority to-be-scheduled queue, and the high-priority device can obtain the bandwidth preferentially and quickly restore the high-quality video stream transmission as soon as the bandwidth is released. If the target near-end device belongs to a low-priority device, it is added to the tail of the low-priority to-be-scheduled queue, and waits for its turn to use the bandwidth to carry out a relatively basic data transmission task.
[0051] The technical scheme of the embodiment of the application can allocate limited bandwidth resources to high-priority target near-end devices preferentially, ensure the video stream transmission quality of the devices, and improve the overall operation efficiency of the system. The combination of layered encoding technology and transmission control strategy can ensure flexible response to network burst, delay and other situations, so that the system can maintain good performance under various network environments and device combinations, and maximize the orderly communication of the system. Precise transmission according to the bandwidth condition and the device priority avoids waste and excessive occupation of bandwidth, and realizes reasonable utilization of network resources.
[0052] Embodiment Two
[0053] Figure 2 A flowchart of a video stream transmission method provided by Embodiment Two of the application is added to the specific process when a stop transmission instruction of a remote control terminal is acquired. As shown in Figure 2 , the method comprises:
[0054] S210, when a stop transmission instruction of a remote control terminal is acquired, determining the idle bandwidth based on the stop transmission instruction.
[0055] The stop transmission instruction is used to stop the data transmission of a certain USB near-end device in communication by the remote control terminal, at this time, a part of the originally occupied bandwidth is released, that is, the idle bandwidth. That is, after the remote control terminal issues the stop transmission instruction, the system has a re-allocation opportunity of bandwidth resources.
[0056] S220, determining whether there is a to-be-scheduled high-priority device in the high-priority to-be-scheduled queue, if yes, executing S230, otherwise, executing S240.
[0057] S230, determining a target scheduling device for video stream transmission from the high-priority to-be-scheduled queue based on the idle bandwidth.
[0058] S240, determining a target scheduling device for data transmission from the low-priority to-be-scheduled queue based on the idle bandwidth.
[0059] Specifically, the system first pays attention to the high-priority to-be-scheduled queue, and if there is a high-priority to-be-scheduled device in the queue, the system traverses from the head to the tail of the queue to find a device that can be supported by the basic layer transmission of the idle bandwidth of the existing system, and takes the device as the target scheduling device for video stream transmission. If there is no high-priority to-be-scheduled device, the system further determines the low-priority to-be-scheduled queue, traverses from the head to the tail of the queue, finds a device that can be supported by the remaining bandwidth of the existing system, and takes the device as the target scheduling device for data transmission.
[0060] Further, if there is no to-be-scheduled device in the high-priority to-be-scheduled queue and the low-priority to-be-scheduled queue, at this time, the system can check whether there is a high-priority device being transmitted, and according to the order of accessing the system, the system gradually polls whether the device can increase a strengthened layer video transmission, until all the remaining bandwidth is used as much as possible.
[0061] The technical scheme of the embodiment of the application can timely respond to the stop transmission instruction of the remote control end, quickly adjust the transmission strategy, and embodies the high flexibility and controllability of the system. The idle bandwidth generated by the stop transmission is used for new scheduling, which avoids the waste of bandwidth and maximizes the bandwidth utilization. The dynamic scheduling strategy can optimize the transmission according to the real-time situation, thereby improving the working efficiency and performance of the remote USB control system as a whole.
[0062] Embodiment three
[0063] Figure 3 A structural schematic diagram of a video stream transmission device provided by the embodiment three of the application is shown in FIG. 3. Figure 3 As shown in the figure, the device comprises: a device priority determination module 310, configured to acquire a control instruction of a remote control end, determine a target near-end device and a corresponding device priority of the target near-end device based on the control instruction, wherein the device priority comprises a high priority and a low priority; a bandwidth sufficiency condition determination module 320, configured to determine a target bandwidth corresponding to the target near-end device, and determine a bandwidth sufficiency condition according to the target bandwidth, wherein the bandwidth sufficiency condition comprises bandwidth sufficiency and insufficient bandwidth; and a video stream transmission module 330, configured to perform video stream transmission according to the bandwidth sufficiency condition and the device priority.
[0064] Optionally, the device priority determination module 310 is specifically configured to: determine a target device identifier in the control instruction, and determine a target near-end device from the near-end devices according to the target device identifier; determine a device type corresponding to the target near-end device, wherein the device type includes a video device and a non-video device; when the device type is the video device, determine that a device priority of the target near-end device is a high priority; and when the device type is the non-video device, determine that the device priority of the target near-end device is a low priority.
[0065] Optionally, the bandwidth sufficiency determination module 320 specifically includes a target bandwidth determination unit, which is configured to: when the target near-end device is the high priority device, determine a bandwidth required for transmitting a base layer of a video stream of the target near-end device as the target bandwidth; and when the target near-end device is the low priority device, determine a bandwidth required for transmitting communication data of the target near-end device as the target bandwidth.
[0066] Optionally, the bandwidth sufficiency determination module 320 specifically includes a bandwidth sufficiency determination unit, which is configured to: determine a residual bandwidth of a current transmission network; and determine whether the target bandwidth is less than or equal to the residual bandwidth, and if yes, determine that the bandwidth sufficiency is bandwidth sufficient, or if not, determine that the bandwidth sufficiency is bandwidth insufficient.
[0067] Optionally, the video stream transmission module 330 specifically includes a bandwidth sufficient transmission unit, which is configured to: when the bandwidth sufficiency is bandwidth sufficient and the device priority is the high priority, determine a bandwidth required for an enhancement layer corresponding to the target near-end device, determine a target enhancement layer number of the target near-end device according to the residual bandwidth and the bandwidth required for the enhancement layer, and perform video stream transmission between the remote control terminal and the target near-end device; and when the bandwidth sufficiency is bandwidth sufficient and the device priority is the low priority, directly perform data transmission between the remote control terminal and the target near-end device.
[0068] Optionally, the video stream transmission module 330 specifically includes a bandwidth insufficient transmission unit, which is configured to: when the bandwidth sufficiency is bandwidth insufficient, poll high priority devices being transmitted in sequence to determine access times; arrange the high priority devices in a high priority transmission queue according to the access times from far to near; determine target high priority devices from the high priority transmission queue in sequence, reduce the enhancement layers of the target high priority devices, and obtain corresponding updated bandwidths; and when the updated bandwidths are greater than or equal to the target bandwidth, start data transmission between the remote control terminal and the target near-end device.
[0069] Optionally, the apparatus further includes a to-be-scheduled queue generation module, which is configured to: after obtaining the corresponding updated bandwidths, determine enhancement layer numbers of the high priority devices in the high priority transmission queue; and when the enhancement layer numbers are all 0 and the updated bandwidths are less than the target bandwidth, add the target near-end device to a tail of a corresponding high priority to-be-scheduled queue or a low priority to-be-scheduled queue.
[0070] Optionally, the device further comprises a stop transmission module configured to: when a stop transmission instruction of the remote control terminal is acquired, determine the idle bandwidth based on the stop transmission instruction; determine whether there is a high-priority device to be scheduled in the high-priority to-be-scheduled queue, if yes, determine a target scheduled device from the high-priority to-be-scheduled queue based on the idle bandwidth to perform video stream transmission; or if not, determine a target scheduled device from the low-priority to-be-scheduled queue based on the idle bandwidth to perform data transmission.
[0071] The technical scheme of the embodiment of the application can allocate limited bandwidth resources to high-priority target near-end devices, ensure the video stream transmission quality of the devices, and improve the overall operation efficiency of the system.
[0072] The video stream transmission device provided by the embodiment of the application can perform the video stream transmission method provided by any embodiment of the application, and has the corresponding function modules and beneficial effects of the execution method.
[0073] Embodiment Four
[0074] Figure 4 A structural diagram of an electronic device 10 that can be used to implement embodiments of the application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the applications described and / or claimed in this document.
[0075] As Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected to the at least one processor 11 in communication. The memory stores a computer program executable by the at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0076] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0077] The processor 11 can be various general and / or special-purpose processing components having processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as a video streaming method.
[0078] In some embodiments, a video streaming method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of a video streaming method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform a video streaming method by any other appropriate means, such as by means of firmware.
[0079] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0080] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program
[0081] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0082] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0083] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0084] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0085] It should be understood that various forms of flow shown above can be used, with steps reordered, added, or removed. For example, the steps recited in the present invention can be performed in parallel, in series, or in a different order, without limitation herein, as long as the desired results of the technical solutions of the present invention can be achieved.
[0086] The specific embodiments described above are not intended to be limiting, but rather to illustrate a few possible forms in which the application can be implemented. Many modifications, combinations, sub-combinations and alternatives are possible in light of the above teachings. Any and all such modifications, variations, and alternatives are intended to fall within the scope of the present application.
Claims
1. A method of video streaming, the method comprising: The application is applied to a remote USB control system, comprising a remote control terminal and a plurality of near-end devices, and the method comprises the following steps: obtaining a control instruction of the remote control terminal, determining a target near-end device and a corresponding device priority based on the control instruction, wherein the device priority comprises a high priority and a low priority, a video device is the high priority, and a non-video device is the low priority; determining a target bandwidth corresponding to the target near-end device, and determining a bandwidth sufficient condition according to the target bandwidth, wherein the bandwidth sufficient condition comprises bandwidth sufficient and bandwidth insufficient; performing video stream transmission according to the bandwidth sufficient condition and the device priority; wherein the determination of the target bandwidth corresponding to the target near-end device comprises: when the target near-end device is a high-priority device, taking the bandwidth required for transmitting a basic layer of a video stream of the target near-end device as the target bandwidth; when the target near-end device is a low-priority device, taking the bandwidth required for transmitting communication data of the target near-end device as the target bandwidth; the method further comprises: when data transmission of the target near-end device with the high priority is performed, a layered encoding technology is used, and the data transmission is divided into a basic layer and a plurality of enhancement layers, the basic layer is used for independent decoding and displays a basic video picture, and the enhancement layers are used for optimizing the basic video picture; wherein the video stream transmission according to the bandwidth sufficient condition and the device priority comprises: when the bandwidth sufficient condition is bandwidth insufficient, sequentially polling each high-priority device being transmitted to determine an access time; arranging each high-priority device in a high-priority transmission queue according to the access time from far to near to generate the high-priority transmission queue; sequentially determining a target high-priority device from the high-priority transmission queue, reducing an enhancement layer of the target high-priority device, and obtaining a corresponding updated bandwidth, wherein the enhancement layer can be reduced to 0 at most; until the updated bandwidth is greater than or equal to the target bandwidth, starting data transmission between the remote control terminal and the target near-end device; wherein after the corresponding updated bandwidth is obtained, the method further comprises: determining a number of enhancement layers of each high-priority device in the high-priority transmission queue; when the number of enhancement layers is 0 and the updated bandwidth is less than the target bandwidth, adding the target near-end device to the tail of a corresponding high-priority to-be-scheduled queue or a low-priority to-be-scheduled queue; wherein the method further comprises: when a stop transmission instruction of the remote control terminal is obtained, determining an idle bandwidth based on the stop transmission instruction, wherein the stop transmission instruction is used to stop data transmission of a USB near-end device being communicated by the remote control terminal; judging whether there is a high-priority device to be scheduled in a high-priority to-be-scheduled queue, if yes, determining a target scheduling device from the high-priority to-be-scheduled queue based on the idle bandwidth to perform video stream transmission; otherwise, determining a target scheduling device from a low-priority to-be-scheduled queue based on the idle bandwidth to perform data transmission.
2. The method of claim 1, wherein, the determination of the target near-end device and the corresponding device priority based on the control instruction comprises: determining a target device identifier in the control instruction, and determining the target near-end device from the near-end devices according to the target device identifier; determining a device type corresponding to the target near-end device, wherein the device type comprises a video device and a non-video device; when the device type is the video device, determining that a device priority of the target near-end device is a high priority; when the device type is the non-video device, determining that the device priority of the target near-end device is a low priority.
3. The method of claim 1, wherein, The determining the bandwidth sufficiency condition according to the target bandwidth comprises: determining a residual bandwidth of a current transmission network; judging whether the target bandwidth is less than or equal to the residual bandwidth, if yes, determining that the bandwidth sufficiency condition is bandwidth sufficiency; otherwise, determining that the bandwidth sufficiency condition is bandwidth insufficiency.
4. The method of claim 3, wherein, The video streaming according to the bandwidth sufficiency condition and the device priority comprises: when the bandwidth sufficiency condition is bandwidth sufficiency and the device priority is the high priority, determining a required bandwidth of an enhancement layer corresponding to the target near-end device, and determining a target enhancement layer number of the target near-end device according to the residual bandwidth and the required bandwidth of the enhancement layer, so as to perform the video streaming between the remote control terminal and the target near-end device; when the bandwidth sufficiency condition is bandwidth sufficiency and the device priority is the low priority, directly performing data transmission between the remote control terminal and the target near-end device.
5. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores a computer program capable of being executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the method in any one of claims 1-4.
6. A computer storage medium, characterized in that The computer storage medium stores computer instructions, and the computer instructions are used to enable the processor to implement the method in any one of claims 1-4 when executed.
Citation Information
Patent Citations
Coding and forwarding methods and devices of video data, equipment and storage medium
CN109618188A
USB redirection system and method for realizing network sharing of USB equipment
CN117555829A