CN111225240A - Method and device for automatically adjusting occupied bandwidth, storage medium and electronic equipment - Google Patents

Method and device for automatically adjusting occupied bandwidth, storage medium and electronic equipment Download PDF

Info

Publication number
CN111225240A
CN111225240A CN202010062416.1A CN202010062416A CN111225240A CN 111225240 A CN111225240 A CN 111225240A CN 202010062416 A CN202010062416 A CN 202010062416A CN 111225240 A CN111225240 A CN 111225240A
Authority
CN
China
Prior art keywords
video transmission
preset
bandwidth
frame rate
resolution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202010062416.1A
Other languages
Chinese (zh)
Inventor
朱玉荣
刘洪献
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Wenxiang Information Technology Co Ltd
Original Assignee
Anhui Wenxiang Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Wenxiang Information Technology Co Ltd filed Critical Anhui Wenxiang Information Technology Co Ltd
Priority to CN202010062416.1A priority Critical patent/CN111225240A/en
Publication of CN111225240A publication Critical patent/CN111225240A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2385Channel allocation; Bandwidth allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234363Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234381Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the temporal resolution, e.g. decreasing the frame rate by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • H04N21/26216Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints involving the channel capacity, e.g. network bandwidth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Communication Control (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a method and a device for automatically adjusting occupied bandwidth, a storage medium and electronic equipment, and relates to the technical field of data transmission. The method comprises the following steps: determining the current available bandwidth according to the real-time acquired packet loss rate and delay of video transmission; when the current available bandwidth is smaller than the bandwidth occupied by the current data transmission, gradually reducing the code rate of the video transmission to a first preset code rate; after the code rate of video transmission is reduced to a first preset code rate, when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, gradually reducing the frame rate of the video transmission to a first preset frame rate; after the frame rate of video transmission is reduced to a first preset frame rate, when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, gradually reducing the resolution of the video transmission to a first preset resolution. By using the method, the bandwidth occupied by the transmission parameters of the video data can be automatically adjusted when the bandwidth fluctuates, and further the quality of video information interaction can be maintained.

Description

Method and device for automatically adjusting occupied bandwidth, storage medium and electronic equipment
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a method and an apparatus for automatically adjusting an occupied bandwidth, a storage medium, and an electronic device.
Background
With the continuous progress of science and technology, the mode of video interaction through the network has gradually become an important interaction mode because of the characteristics of convenience, rapidness, low cost and the like.
When video interaction is performed through a network, a situation of data packet loss often occurs, and the data packet loss refers to that data of one or more data packets cannot reach a destination through the network. Data packet loss can cause the quality of video interaction to be poor, for example, video image mosaic, video local deformation, image blurring, image still with sound, image flicker and the like are caused when video interaction exists, and even the video interaction is interrupted when the conditions are serious. One important reason for packet loss is that the amount of data transmitted by the network is greater than the maximum amount of data that the bandwidth supports transmission when the network fluctuates.
Therefore, how to reduce the influence of bandwidth fluctuation on video information interaction in time plays an important role in maintaining the quality of video interaction.
Disclosure of Invention
In order to solve the technical problems in the prior art, the application provides a method, a device, a storage medium and an electronic device for automatically adjusting the occupied bandwidth, which can automatically adjust the occupied bandwidth of the transmission parameters of video data when the bandwidth fluctuates, and further can maintain the quality of video information interaction.
The application provides a method for automatically adjusting occupied bandwidth, which comprises the following steps:
determining the current available bandwidth according to the real-time acquired packet loss rate and delay of video transmission;
when the current available bandwidth is smaller than the bandwidth occupied by the current data transmission, gradually reducing the code rate of the video transmission to a first preset code rate;
after the code rate of the video transmission is reduced to a first preset code rate, when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, gradually reducing the frame rate of the video transmission to a first preset frame rate;
and after the frame rate of the video transmission is reduced to a first preset frame rate, gradually reducing the resolution of the video transmission to a first preset resolution when the current available bandwidth is determined to be still smaller than the bandwidth occupied by the current data transmission.
Optionally, the method further includes:
when the current available bandwidth is determined to be larger than the bandwidth occupied by the current data transmission, gradually increasing the resolution of the video transmission to a second preset resolution;
after the resolution of the video transmission is increased to a second preset resolution, gradually increasing the frame rate of the video transmission to a second preset frame rate when the current available bandwidth is still larger than the bandwidth occupied by the current data transmission;
after the frame rate of the video transmission is increased to a second preset frame rate, when the current available bandwidth is still larger than the bandwidth occupied by the current data transmission, gradually increasing the code rate of the video transmission to the second preset code rate.
Optionally, the gradually reducing the code rate of the video transmission to the first preset code rate specifically includes:
and gradually reducing the code rate of the video transmission to the first preset code rate according to a first reduction speed.
Optionally, gradually increasing the code rate of the video transmission to a second preset code rate specifically includes:
gradually increasing the code rate of the video transmission to the second preset code rate according to a first increasing speed, wherein the absolute value of the first increasing speed is smaller than the absolute value of the first decreasing speed.
Optionally, the gradually reducing the frame rate of video transmission to the first preset frame rate specifically includes:
and gradually reducing the frame rate of the video transmission to the first preset frame rate according to a second reduction speed.
Optionally, gradually increasing the frame rate of the video transmission to a second preset frame rate specifically includes;
gradually increasing the frame rate of the video transmission to the second preset frame rate according to a second increasing speed, wherein the absolute value of the second increasing speed is smaller than the absolute value of the second decreasing speed.
Optionally, gradually reducing the resolution of the video transmission to a first preset resolution includes:
and gradually reducing the resolution of the video transmission to the first preset resolution according to a third reduction speed.
Optionally, gradually increasing the resolution of the video transmission to a second preset resolution includes:
and gradually increasing the resolution of the video transmission to the second preset resolution according to a third increasing speed, wherein the absolute value of the third increasing speed is smaller than the absolute value of the third decreasing speed.
The present application further provides a device for automatically adjusting occupied bandwidth, the device comprising: the device comprises a determining unit, a first adjusting unit, a second adjusting unit and a third adjusting unit;
the determining unit is used for determining the current available bandwidth according to the real-time acquired packet loss rate and the real-time acquired delay of the video transmission;
the first adjusting unit is configured to gradually reduce the code rate of video transmission to a first preset code rate when the current available bandwidth is smaller than the bandwidth occupied by current data transmission;
the second adjusting unit is configured to gradually reduce the frame rate of video transmission to a first preset frame rate when it is determined that the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission after the code rate of the video transmission is reduced to the first preset code rate;
the third adjusting unit is configured to gradually reduce the resolution of video transmission to a first preset resolution when it is determined that the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission after the frame rate of the video transmission is reduced to a first preset frame rate.
The present application also provides a readable storage medium, on which a computer program is stored, which when executed by a processor implements the above-described method for automatically adjusting occupied bandwidth.
The application also provides an electronic device, which is used for running a program, wherein the method for automatically adjusting the occupied bandwidth is executed when the program runs.
The method of the present application has at least the following advantages:
determining a current available bandwidth according to the packet loss rate and the delay of the video transmission acquired in real time, and gradually reducing the code rate of the video transmission to a first preset code rate when the current available bandwidth is smaller than the bandwidth occupied by the current data transmission; after the code rate of video transmission is reduced to a first preset code rate, when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, gradually reducing the frame rate of the video transmission to a first preset frame rate; after the frame rate of video transmission is reduced to a first preset frame rate, when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, gradually reducing the resolution of the video transmission to a first preset resolution. According to the method, the bandwidth required to be occupied by video transmission is adjusted by adjusting the parameters of the video transmission, the adjustment sequence is the code rate, the frame rate and the resolution of the video transmission in sequence, wherein the first preset code rate, the first preset frame rate and the first preset resolution are preset limiting values and are used for guaranteeing the quality of the video transmission, and when one parameter is adjusted to the limiting value, the next parameter is adjusted.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for automatically adjusting occupied bandwidth according to an embodiment of the present application;
fig. 2 is a flowchart of another method for automatically adjusting occupied bandwidth according to an embodiment of the present application;
fig. 3 is a schematic diagram of an apparatus for automatically adjusting occupied bandwidth according to an embodiment of the present application;
fig. 4 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
When video interaction is performed through a network, uncontrollable bandwidth fluctuation of a user often occurs, so that actual bandwidth is reduced, and when the data volume transmitted by the network is larger than the maximum data volume supported and transmitted by the bandwidth when the network fluctuates, packet loss occurs in the video transmission process, and even video interaction is interrupted when the packet loss is serious.
At present, the quality of video transmission is generally maintained by a method of actively adjusting video transmission parameters by a user, but because bandwidth fluctuation is difficult to find in time by the user, the manual adjustment has obvious hysteresis, and the bandwidth fluctuation can be found only when the video interaction quality is seriously reduced, so the quality of video interaction cannot be well maintained by the manual adjustment method.
In order to solve the above technical problems, the present application provides a method, an apparatus, a storage medium, and an electronic device for automatically adjusting an occupied bandwidth, which can automatically adjust a bandwidth occupied by a transmission parameter of video data when the bandwidth fluctuates, determine a video transmission parameter adapted to a current bandwidth, and transmit data using the video transmission parameter, so that a packet loss during video transmission can be reduced, and further, quality of video information interaction can be maintained.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is to be understood that the terms "first," "second," and "third," etc. in the embodiments of the present application are used for convenience of description only, and do not limit the present application.
The first embodiment is as follows:
the embodiment of the application provides a method for automatically adjusting occupied bandwidth, which is used for improving the quality of video information interaction when the available bandwidth is reduced due to network fluctuation, and can be used for mobile phones, notebook computers, wearable electronic devices (such as smart watches), tablet computers, Augmented Reality (AR) devices, Virtual Reality (VR) devices, teleconference devices, special relay devices, vehicle-mounted devices and the like. The following detailed description is made with reference to the accompanying drawings.
Referring to fig. 1, the flowchart is a flowchart of a method for automatically adjusting occupied bandwidth according to an embodiment of the present application.
The method comprises the following steps:
s101: and determining the current available bandwidth according to the real-time acquired packet loss rate and the real-time acquired delay of the video transmission.
The Loss Rate (Loss Tolerance or Packet Loss Rate) is the ratio of the number of lost packets to the number of transmitted packets.
The delay comprises the sum of three times of sending and receiving processing time, electric signal response time and transmission time in a transmission medium, and the main reason for increasing the delay when the network fluctuates is the transmission time in the transmission medium.
When the available bandwidth is stable, the packet loss rate and the delay condition of video transmission are in a normal range, the video transmission state is relatively stable, and better video information interaction quality can be ensured.
When the available bandwidth is reduced, the packet loss rate and the delay of video transmission are relatively increased, which results in unstable video transmission state and thus leads to the reduction of video information interaction quality.
Therefore, the present application determines the current available bandwidth by using the packet loss rate and the delay of video transmission, and the method for acquiring the packet loss rate and the delay is a mature technology at present, and is not described herein again in the embodiments of the present application.
In practical application, a mapping relationship between the packet loss rate and the delay and the current available bandwidth may be pre-established, where the mapping relationship satisfies that the packet loss rate and the delay are negatively correlated with the current available bandwidth, that is, the larger the packet loss rate and the delay, the lower the current available bandwidth.
S102: and when the current available bandwidth is smaller than the bandwidth occupied by the current data transmission, gradually reducing the code rate of the video transmission to a first preset code rate.
The video code rate is the number of data bits transmitted per unit time during data transmission, and can be understood as a sampling rate, i.e., the higher the sampling rate per unit time is, the higher the precision is.
Since the transmitted data packets are proportional to the sampling rate, the higher the code rate, the greater the number of transmitted data packets, and the correspondingly greater the packet loss rate when the bandwidth decreases, resulting in easier interruption of video interaction.
In this step, the number of packets for video transmission is reduced by reducing the bit rate for video transmission, so that the number of occupied bandwidths can be reduced.
The first preset code rate may be set according to a requirement of actual video transmission, which is not specifically limited in the embodiment of the present application, and for example, the minimum code rate required by video transmission quality may be set, that is, it may be avoided that the video quality is seriously degraded due to an excessive reduction of the code rate, which affects viewing experience.
It can be understood that, in the process of reducing the bitrate, the current available bandwidth is still obtained in real time, and when the current available bandwidth is greater than or equal to the bandwidth occupied by the current data transmission, the bitrate reduction of the video transmission can be stopped.
Specifically, in practical application, the code rate of the video transmission may be gradually reduced to the first preset code rate according to a first reduction speed. The first reduction speed may be determined according to actual conditions, and the embodiment of the present application is not particularly limited.
S103: after the code rate of video transmission is reduced to a first preset code rate, when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, gradually reducing the frame rate of the video transmission to the first preset frame rate.
After the code rate of video transmission is reduced to a first preset code rate, if the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission at the moment, in order to avoid serious reduction of the video quality caused by excessive reduction of the code rate, the number of data packets of the video transmission is reduced by reducing the frame rate of the video at the moment, and then the number of occupied bandwidths is continuously reduced.
Frame rate (Frame rate) is the frequency with which bitmap images, called units of frames, appear continuously on a display.
The first preset frame rate may be set according to a requirement of actual video transmission, which is not specifically limited in the embodiment of the present application, for example, the minimum frame rate required by video transmission quality may be set, that is, it may be avoided that the video quality is seriously degraded due to an excessively reduced frame rate, which may affect viewing experience.
It can be understood that, in the process of reducing the frame rate, the current available bandwidth can still be obtained in real time, and when the current available bandwidth is greater than or equal to the bandwidth occupied by the current data transmission, the reduction of the frame rate of the video transmission can be stopped.
Specifically, in practical application, the frame rate of the video transmission may be gradually reduced to the first preset frame rate according to a second reduction speed. The second reduction speed may be determined according to actual conditions, and this is not particularly limited in the embodiment of the present application.
S104: after the frame rate of video transmission is reduced to a first preset frame rate, when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, gradually reducing the resolution of the video transmission to a first preset resolution.
After the frame rate of video transmission is reduced to a first preset frame rate, if the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, in order to avoid serious reduction of video quality caused by excessive reduction of the frame rate, the number of data packets of the video transmission is reduced by reducing the convenient rate of the video, and then the number of occupied bandwidths is continuously reduced.
Resolution refers to the resolution that a digital image has in a frame of video, which has a direct relationship to the pixels of the image. For example, a frame of picture with a resolution of 640 × 480 pixels has a resolution of 307200 pixels.
The first preset resolution may be set according to a requirement of actual video transmission, which is not specifically limited in the embodiment of the present application, for example, the minimum resolution required by video transmission quality may be set, that is, it may be avoided that the viewing experience is affected due to severe degradation of video quality caused by excessively reducing resolution.
It is understood that in the process of reducing the resolution, the current available bandwidth can still be obtained in real time, and when the current available bandwidth is larger than or equal to the bandwidth occupied by the current data transmission, the reduction of the resolution of the video transmission can be stopped.
Specifically, in practical applications, the resolution of the video transmission may be gradually reduced to the first preset resolution according to a third reduction speed. The value of the third reduction speed may be determined according to an actual situation, and the embodiment of the present application is not particularly limited.
In summary, by using the method provided in the embodiment of the present application, the bandwidth required to be occupied by video transmission is adjusted by adjusting the parameters of video transmission, and the adjustment sequence is the code rate, the frame rate, and the resolution of video transmission in turn, where the first preset code rate, the first preset frame rate, and the first preset resolution are preset limit values, which are used to ensure the quality of video transmission, and when one of the parameters is adjusted to the limit value, the next parameter is adjusted.
Example two:
the above embodiments provide methods for reducing the amount of bandwidth required by adjusting parameters that reduce video transmission when the available bandwidth should be reduced due to network fluctuations. In practical applications, after the network fluctuation is over, it is necessary to continue to adapt to the bandwidth and recover the parameters of video transmission to recover the video quality, which will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, the flowchart of another method for automatically adjusting occupied bandwidth according to the embodiment of the present application is shown.
The method comprises the following steps:
s201: and gradually increasing the resolution of the video transmission to a second preset resolution when the current available bandwidth is determined to be larger than the bandwidth occupied by the current data transmission.
Specifically, the resolution of the video transmission is gradually increased to the second preset resolution according to a third increasing speed, and an absolute value of the third increasing speed is smaller than an absolute value of the third decreasing speed.
The third lifting speed may be set according to an actual situation, and the embodiment of the present application is not particularly limited.
At this time, in the stage of improving the video quality, in order to avoid an increase in the packet loss rate due to an excessively fast increase in the resolution of video transmission, the speed of improving the resolution is slower than the speed of reducing the resolution.
Meanwhile, the larger absolute value of the third reduction speed can reduce the resolution of video transmission more quickly when the available bandwidth fluctuates, and the adjustment time is shortened.
S202: after the resolution of video transmission is increased to a second preset resolution, when the current available bandwidth is still larger than the bandwidth occupied by the current data transmission, gradually increasing the frame rate of the video transmission to the second preset frame rate.
Specifically, the frame rate of the video transmission is gradually increased to the second preset frame rate according to a second increasing speed, and an absolute value of the second increasing speed is smaller than an absolute value of the second decreasing speed.
The second lifting speed may be set according to an actual situation, and the embodiment of the present application is not particularly limited. In order to avoid increasing the frame rate of video transmission too fast and thus increasing the packet loss rate, the frame rate is increased at a slower rate than the frame rate is decreased.
Meanwhile, the larger absolute value of the second reduction speed can reduce the frame rate of video transmission more quickly when the available bandwidth fluctuates, and the adjustment time is shortened.
S203: after the frame rate of video transmission is increased to a second preset frame rate, when the current available bandwidth is still larger than the bandwidth occupied by the current data transmission, gradually increasing the code rate of the video transmission to the second preset code rate.
Specifically, the code rate of the video transmission is gradually increased to the second preset code rate according to a first increasing speed, and the absolute value of the first increasing speed is smaller than the absolute value of the first decreasing speed.
The first lifting speed may be set according to an actual situation, and the embodiment of the present application is not particularly limited. In order to avoid increasing the packet loss rate due to increasing the code rate of video transmission too fast, the rate is increased at a slower rate than the rate is decreased.
Meanwhile, the larger absolute value of the first reduction speed can reduce the code rate of video transmission more quickly when the available bandwidth fluctuates, and the adjustment time is shortened.
To sum up, the method provided in this embodiment of the present application can gradually increase the resolution of video transmission to a second preset resolution when it is determined that the current available bandwidth is greater than the bandwidth occupied by the current data transmission, and gradually increase the frame rate of video transmission to the second preset frame rate when it is determined that the current available bandwidth is still greater than the bandwidth occupied by the current data transmission after the resolution of video transmission is increased to the second preset resolution, and gradually increase the code rate of video transmission to the second preset code rate when it is determined that the current available bandwidth is still greater than the bandwidth occupied by the current data transmission after the frame rate of video transmission is increased to the second preset frame rate. That is, when the bandwidth state is good, the data transmitted by the video is recovered, and the video quality is gradually improved.
By combining the methods provided by the first embodiment and the second embodiment, the video transmission parameters can be adjusted according to the available bandwidth in the video information interaction process, so that the packet loss rate and the time delay are always in a relatively low state, the current bandwidth is fully utilized for video transmission, and the fluency and quality of video information interaction can be improved to the greatest extent.
Example three:
based on the method for automatically adjusting the occupied bandwidth provided by the above embodiment, the embodiment of the present application further provides a device for automatically adjusting the occupied bandwidth, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 3, the figure is a schematic diagram of an apparatus for automatically adjusting occupied bandwidth according to an embodiment of the present application.
The device of the embodiment of the application comprises: a determination unit 301, a first adjustment unit 302, a second adjustment unit 303 and a third adjustment unit 304.
The determining unit 301 is configured to determine a current available bandwidth according to a packet loss rate and a delay of video transmission acquired in real time.
The first adjusting unit 302 is configured to gradually reduce the bitrate of video transmission to a first preset bitrate when the current available bandwidth is smaller than a bandwidth occupied by current data transmission.
Specifically, the first adjusting unit 302 gradually reduces the code rate of the video transmission to the first preset code rate according to a first reduction speed.
The second adjusting unit 303 is configured to gradually decrease the frame rate of video transmission to a first preset frame rate when it is determined that the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission after the code rate of video transmission is decreased to the first preset code rate.
Specifically, the second adjusting unit 303 gradually reduces the frame rate of the video transmission to the first preset frame rate according to a second reduction speed.
The third adjusting unit 304 is configured to gradually decrease the resolution of video transmission to a first preset resolution when it is determined that the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission after the frame rate of the video transmission is decreased to the first preset frame rate.
Specifically, the third adjusting unit 304 gradually reduces the resolution of the video transmission to the first preset resolution according to a third reduction speed.
Further, the third adjusting unit 304 is further configured to gradually increase the resolution of the video transmission to a second preset resolution when it is determined that the current available bandwidth is greater than the bandwidth occupied by the current data transmission.
Specifically, the resolution of the video transmission is gradually increased to the second preset resolution according to a third increasing speed, and an absolute value of the third increasing speed is smaller than an absolute value of the third decreasing speed.
The second adjusting unit 303 is further configured to gradually increase the frame rate of video transmission to a second preset frame rate when it is determined that the current available bandwidth is still greater than the bandwidth occupied by the current data transmission after the resolution of video transmission is increased to the second preset resolution.
Specifically, the frame rate of the video transmission is gradually increased to the second preset frame rate according to a second increasing speed, and an absolute value of the second increasing speed is smaller than an absolute value of the second decreasing speed.
The first adjusting unit 302 is further configured to gradually increase the bit rate of the video transmission to a second preset bit rate when it is determined that the current available bandwidth is still greater than the bandwidth occupied by the current data transmission after the frame rate of the video transmission is increased to a second preset frame rate.
Specifically, the code rate of the video transmission is gradually increased to the second preset code rate according to a first increasing speed, and the absolute value of the first increasing speed is smaller than the absolute value of the first decreasing speed.
By using the device provided by the embodiment of the application, the determining unit can determine the current available bandwidth according to the real-time acquired packet loss rate and the real-time acquired delay of video transmission. When the current available bandwidth of the first adjusting unit is smaller than the bandwidth occupied by the current data transmission, the code rate of the video transmission is gradually reduced to a first preset code rate. The second adjusting unit can gradually reduce the frame rate of video transmission to a first preset frame rate when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission after the code rate of the video transmission is reduced to the first preset code rate. And the third adjusting unit can gradually reduce the resolution of the video transmission to the first preset resolution when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission after the frame rate of the video transmission is reduced to the first preset frame rate. The device adjusts the bandwidth required to be occupied by video transmission by adjusting the parameters of the video transmission, and the adjustment sequence is the code rate, the frame rate and the resolution of the video transmission in sequence, wherein the first preset code rate, the first preset frame rate and the first preset resolution are preset limit values for ensuring the quality of the video transmission, and when one parameter is adjusted to the limit value, the next parameter is adjusted.
The device for automatically adjusting the occupied bandwidth comprises a processor and a memory, wherein the determining unit, the first adjusting unit, the second adjusting unit, the third adjusting unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and the parameters of video transmission are automatically adjusted by adjusting the kernel parameters so as to automatically adjust the occupied bandwidth.
Example four:
an embodiment of the present invention provides a storage medium, on which a program is stored, where the program, when executed by a processor, implements the method for automatically adjusting occupied bandwidth.
The embodiment of the invention provides a processor, which is used for running a program, wherein the method for automatically adjusting the occupied bandwidth is executed when the program runs.
The embodiment of the invention also provides electronic equipment which is specifically described below by combining the attached drawings.
Referring to fig. 4, the figure is a schematic view of an electronic device provided in an embodiment of the present application.
The electronic device 40 includes at least one processor 401, and at least one memory 402, a bus 403, connected to the processor 401.
The processor 401 and the memory 402 complete communication with each other through the bus 403; the processor 401 is configured to call program instructions in the memory 402 to perform the above-described method for automatically adjusting the occupied bandwidth.
The embodiment of the present application does not specifically limit the types of the electronic devices of the transmitting end and the receiving end, and for example, the electronic devices may be a mobile phone, a notebook computer, a wearable electronic device (e.g., a smart watch), a tablet computer, an Augmented Reality (AR) device, a Virtual Reality (VR) device, a teleconference device, a dedicated relay device, an on-vehicle device, and the like.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
determining the current available bandwidth according to the real-time acquired packet loss rate and delay of video transmission;
when the current available bandwidth is smaller than the bandwidth occupied by the current data transmission, gradually reducing the code rate of the video transmission to a first preset code rate;
after the code rate of the video transmission is reduced to a first preset code rate, when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, gradually reducing the frame rate of the video transmission to a first preset frame rate;
and after the frame rate of the video transmission is reduced to a first preset frame rate, gradually reducing the resolution of the video transmission to a first preset resolution when the current available bandwidth is determined to be still smaller than the bandwidth occupied by the current data transmission.
Optionally, the method further includes:
when the current available bandwidth is determined to be larger than the bandwidth occupied by the current data transmission, gradually increasing the resolution of the video transmission to a second preset resolution;
after the resolution of the video transmission is increased to a second preset resolution, gradually increasing the frame rate of the video transmission to a second preset frame rate when the current available bandwidth is still larger than the bandwidth occupied by the current data transmission;
after the frame rate of the video transmission is increased to a second preset frame rate, when the current available bandwidth is still larger than the bandwidth occupied by the current data transmission, gradually increasing the code rate of the video transmission to the second preset code rate.
Optionally, the gradually reducing the code rate of the video transmission to the first preset code rate specifically includes:
and gradually reducing the code rate of the video transmission to the first preset code rate according to a first reduction speed.
Optionally, gradually increasing the code rate of the video transmission to a second preset code rate specifically includes:
gradually increasing the code rate of the video transmission to the second preset code rate according to a first increasing speed, wherein the absolute value of the first increasing speed is smaller than the absolute value of the first decreasing speed.
Optionally, the gradually reducing the frame rate of video transmission to the first preset frame rate specifically includes:
and gradually reducing the frame rate of the video transmission to the first preset frame rate according to a second reduction speed.
Optionally, gradually increasing the frame rate of the video transmission to a second preset frame rate specifically includes;
gradually increasing the frame rate of the video transmission to the second preset frame rate according to a second increasing speed, wherein the absolute value of the second increasing speed is smaller than the absolute value of the second decreasing speed.
Optionally, gradually reducing the resolution of the video transmission to a first preset resolution includes:
and gradually reducing the resolution of the video transmission to the first preset resolution according to a third reduction speed.
Optionally, gradually increasing the resolution of the video transmission to a second preset resolution includes:
and gradually increasing the resolution of the video transmission to the second preset resolution according to a third increasing speed, wherein the absolute value of the third increasing speed is smaller than the absolute value of the third decreasing speed.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (11)

1. A method for automatically adjusting occupied bandwidth, the method comprising:
determining the current available bandwidth according to the real-time acquired packet loss rate and delay of video transmission;
when the current available bandwidth is smaller than the bandwidth occupied by the current data transmission, gradually reducing the code rate of the video transmission to a first preset code rate;
after the code rate of the video transmission is reduced to a first preset code rate, when the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission, gradually reducing the frame rate of the video transmission to a first preset frame rate;
and after the frame rate of the video transmission is reduced to a first preset frame rate, gradually reducing the resolution of the video transmission to a first preset resolution when the current available bandwidth is determined to be still smaller than the bandwidth occupied by the current data transmission.
2. The method of claim 1, further comprising:
when the current available bandwidth is determined to be larger than the bandwidth occupied by the current data transmission, gradually increasing the resolution of the video transmission to a second preset resolution;
after the resolution of the video transmission is increased to a second preset resolution, gradually increasing the frame rate of the video transmission to a second preset frame rate when the current available bandwidth is still larger than the bandwidth occupied by the current data transmission;
after the frame rate of the video transmission is increased to a second preset frame rate, when the current available bandwidth is still larger than the bandwidth occupied by the current data transmission, gradually increasing the code rate of the video transmission to the second preset code rate.
3. The method of claim 2, wherein gradually decreasing the bitrate of the video transmission to the first preset bitrate comprises:
and gradually reducing the code rate of the video transmission to the first preset code rate according to a first reduction speed.
4. The method of claim 3, wherein gradually increasing the bitrate of the video transmission to a second preset bitrate comprises:
gradually increasing the code rate of the video transmission to the second preset code rate according to a first increasing speed, wherein the absolute value of the first increasing speed is smaller than the absolute value of the first decreasing speed.
5. The method according to claim 2, wherein gradually decreasing the frame rate of the video transmission to the first predetermined frame rate comprises:
and gradually reducing the frame rate of the video transmission to the first preset frame rate according to a second reduction speed.
6. The method according to claim 5, wherein gradually increasing the frame rate of the video transmission to a second predetermined frame rate comprises;
and gradually increasing the frame rate of the video transmission to the second preset frame rate according to a second increasing speed, wherein the absolute value of the second increasing speed is smaller than the absolute value of the second decreasing speed.
7. The method according to claim 2, wherein gradually reducing the resolution of the video transmission to the first predetermined resolution comprises:
and gradually reducing the resolution of the video transmission to the first preset resolution according to a third reduction speed.
8. The method of claim 7, wherein gradually increasing the resolution of the video transmission to a second predetermined resolution comprises:
and gradually increasing the resolution of the video transmission to the second preset resolution according to a third increasing speed, wherein the absolute value of the third increasing speed is smaller than the absolute value of the third decreasing speed.
9. An apparatus for automatically adjusting occupied bandwidth, the apparatus comprising: the device comprises a determining unit, a first adjusting unit, a second adjusting unit and a third adjusting unit;
the determining unit is used for determining the current available bandwidth according to the real-time acquired packet loss rate and the real-time acquired delay of the video transmission;
the first adjusting unit is configured to gradually reduce the code rate of video transmission to a first preset code rate when the current available bandwidth is smaller than the bandwidth occupied by current data transmission;
the second adjusting unit is configured to gradually reduce the frame rate of video transmission to a first preset frame rate when it is determined that the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission after the code rate of the video transmission is reduced to the first preset code rate;
the third adjusting unit is configured to gradually reduce the resolution of video transmission to a first preset resolution when it is determined that the current available bandwidth is still smaller than the bandwidth occupied by the current data transmission after the frame rate of the video transmission is reduced to a first preset frame rate.
10. A readable storage medium, on which a computer program is stored, which when executed by a processor implements the method of automatically adjusting occupied bandwidth of any one of claims 1-8.
11. An electronic device, wherein the electronic device is configured to run a program, and wherein the program is executed when running the method for automatically adjusting occupied bandwidth according to any one of claims 1 to 8.
CN202010062416.1A 2020-01-19 2020-01-19 Method and device for automatically adjusting occupied bandwidth, storage medium and electronic equipment Withdrawn CN111225240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010062416.1A CN111225240A (en) 2020-01-19 2020-01-19 Method and device for automatically adjusting occupied bandwidth, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010062416.1A CN111225240A (en) 2020-01-19 2020-01-19 Method and device for automatically adjusting occupied bandwidth, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111225240A true CN111225240A (en) 2020-06-02

Family

ID=70831276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010062416.1A Withdrawn CN111225240A (en) 2020-01-19 2020-01-19 Method and device for automatically adjusting occupied bandwidth, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111225240A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866586A (en) * 2020-07-28 2020-10-30 精英数智科技股份有限公司 Underground video data processing method and device, electronic equipment and storage medium
CN112203043A (en) * 2020-09-14 2021-01-08 中标慧安信息技术股份有限公司 Video transmission method and system
CN112468855A (en) * 2020-11-11 2021-03-09 西安万像电子科技有限公司 Data transmission method and device and nonvolatile storage medium
CN113132684A (en) * 2021-03-17 2021-07-16 浙江大华技术股份有限公司 Data transmission method, electronic equipment and storage medium
CN115118601A (en) * 2022-05-26 2022-09-27 广东跃昉科技有限公司 Transmission bandwidth allocation method and device for multi-path USB camera and computer equipment
WO2023174216A1 (en) * 2022-03-18 2023-09-21 百果园技术(新加坡)有限公司 Video resolution adaptive adjustment method, apparatus and device, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100226250A1 (en) * 2007-03-12 2010-09-09 Robert Plamondon Systems and methods for providing quality of service precedence in tcp congestion control
CN105025249A (en) * 2014-04-22 2015-11-04 中国移动通信集团江苏有限公司 Video monitoring data transmission control method, apparatus and video monitoring system
CN105306888A (en) * 2015-10-03 2016-02-03 上海大学 Mobile video monitoring bandwidth adaption method based on packet loss differentiation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100226250A1 (en) * 2007-03-12 2010-09-09 Robert Plamondon Systems and methods for providing quality of service precedence in tcp congestion control
CN105025249A (en) * 2014-04-22 2015-11-04 中国移动通信集团江苏有限公司 Video monitoring data transmission control method, apparatus and video monitoring system
CN105306888A (en) * 2015-10-03 2016-02-03 上海大学 Mobile video monitoring bandwidth adaption method based on packet loss differentiation

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866586A (en) * 2020-07-28 2020-10-30 精英数智科技股份有限公司 Underground video data processing method and device, electronic equipment and storage medium
CN112203043A (en) * 2020-09-14 2021-01-08 中标慧安信息技术股份有限公司 Video transmission method and system
CN112468855A (en) * 2020-11-11 2021-03-09 西安万像电子科技有限公司 Data transmission method and device and nonvolatile storage medium
CN112468855B (en) * 2020-11-11 2023-01-24 西安万像电子科技有限公司 Data transmission method and device and nonvolatile storage medium
CN113132684A (en) * 2021-03-17 2021-07-16 浙江大华技术股份有限公司 Data transmission method, electronic equipment and storage medium
WO2023174216A1 (en) * 2022-03-18 2023-09-21 百果园技术(新加坡)有限公司 Video resolution adaptive adjustment method, apparatus and device, and storage medium
CN115118601A (en) * 2022-05-26 2022-09-27 广东跃昉科技有限公司 Transmission bandwidth allocation method and device for multi-path USB camera and computer equipment

Similar Documents

Publication Publication Date Title
CN111225240A (en) Method and device for automatically adjusting occupied bandwidth, storage medium and electronic equipment
US10674078B2 (en) Image mapping and processing method, apparatus and machine-readable media
CN112312137A (en) Video transmission method and device, electronic equipment and storage medium
CN109729391B (en) Method and system for sending multi-path media streams
CN113676730B (en) Video coding method and device, electronic equipment and storage medium
US8867611B2 (en) Video transmitting method and system with image quality adjusting function
WO2022104754A1 (en) Network resource management method, management apparatus, electronic device, and storage medium
CN112312229A (en) Video transmission method and device, electronic equipment and storage medium
CN111225254B (en) Video transmission method, device, terminal equipment and storage medium
US20190391780A1 (en) Display method and device
CN107734300A (en) Image transfer method and equipment
CN108600783A (en) A kind of method of frame rate adjusting, device and terminal device
US20140118489A1 (en) Adaptive stereoscopic 3d streaming
CN115103210A (en) Information processing method, device, terminal and storage medium
JP4430596B2 (en) Receiving device of image data transmission / reception system and storage medium storing program thereof
US20210314664A1 (en) Method of Determining Video Resolution, Computing Device, and Computer-Program Product
CN115529300A (en) System and method for automatically adjusting key frame quantization parameter and frame rate
CN108206960B (en) Image compression ratio adjusting method in image transmission process and mobile terminal
US9813477B2 (en) Adjusting quality level of media streaming
JPH11215481A (en) Image data transmission/reception system, its transmitter side device, its receiver side device and medium for storing its program
CN114584826B (en) Video dynamic downloading method and device, electronic equipment and storage medium
EP3149912B1 (en) Communication device and data processing method
US8791981B2 (en) Bit rate control apparatus and method thereof
CN113612955A (en) Multi-interface conversion device
CN112636971A (en) Service degradation method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200602