CN112929201A - Bandwidth adjusting method and device, electronic equipment and storage medium - Google Patents

Bandwidth adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112929201A
CN112929201A CN202110052113.6A CN202110052113A CN112929201A CN 112929201 A CN112929201 A CN 112929201A CN 202110052113 A CN202110052113 A CN 202110052113A CN 112929201 A CN112929201 A CN 112929201A
Authority
CN
China
Prior art keywords
bandwidth
current
redundant
previous
media data
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.)
Pending
Application number
CN202110052113.6A
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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202110052113.6A priority Critical patent/CN112929201A/en
Publication of CN112929201A publication Critical patent/CN112929201A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets

Landscapes

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

Abstract

The disclosure provides a bandwidth adjusting method, a bandwidth adjusting device, electronic equipment and a storage medium, relates to the technical field of computers, and can solve the problem that the quality of output stream media data of a decoder is affected in the prior art. The specific technical scheme is as follows: acquiring the last transmission bandwidth of the previous stream media data and the last packet loss rate in the transmission process of the previous stream media data; if the last packet loss rate is equal to zero, determining the current coding bandwidth according to the last coding bandwidth and the last redundant bandwidth; acquiring a current redundant bandwidth; and determining the current transmission bandwidth of the current streaming media data according to the current coding bandwidth and the current redundant bandwidth. The invention is used for transmitting the streaming media data.

Description

Bandwidth adjusting method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a bandwidth adjustment method and apparatus, an electronic device, and a storage medium.
Background
In the network environment of the internet, the point-to-point network quality is dynamically changed. For some codecs of streaming media data such as audio and video, dynamic changes of network quality can be monitored and network parameters can be adjusted to better transmit the streaming media data. How to monitor the dynamic change of the network quality is very important for parameter adjustment.
The quality of the network is described by various parameters such as network bandwidth, delay, jitter, etc. Among them, the network bandwidth is a very important parameter. In the prior art, a streaming media after streaming media data is encoded is generally transmitted, and a threshold of a network bandwidth is detected by detecting a packet loss rate of encoded data of the streaming media data, which requires that encoded data of the streaming media in a transmission process is continuously increased. However, when the encoded data of the streaming media data is lost, the quality of the streaming media data output by the decoder is affected.
Disclosure of Invention
The disclosed embodiments provide a bandwidth adjusting method, apparatus, electronic device and storage medium, which have solved the problem that the prior art may affect the quality of the output stream media data of a decoder. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a bandwidth adjustment method, including:
acquiring a last transmission bandwidth of previous stream media data and a last packet loss rate in the transmission process of the previous stream media data, wherein the last transmission bandwidth comprises a last encoding bandwidth and a last redundant bandwidth, the previous stream media data comprises encoded data of the previous stream media data and redundant data of the previous stream media data, the last encoding bandwidth is a bandwidth for transmitting the encoded data of the previous stream media data, and the last redundant bandwidth is a bandwidth for transmitting the redundant data of the previous stream media data;
if the last packet loss rate is equal to zero, determining the current coding bandwidth according to the last coding bandwidth and the last redundant bandwidth;
acquiring a current redundant bandwidth;
and determining the current transmission bandwidth of the current streaming media data according to the current coding bandwidth and the current redundant bandwidth.
The bandwidth adjusting method provided by the embodiment of the present disclosure can obtain a previous transmission bandwidth of previous media data and a previous packet loss rate in a transmission process of the previous media data, where the previous transmission bandwidth includes a previous coding bandwidth and a previous redundant bandwidth, the previous media data includes coded data of the previous media data and redundant data of the previous media data, the previous coding bandwidth is coded data for transmitting the previous media data, and the previous redundant bandwidth is a bandwidth for transmitting the redundant data of the previous media data; if the last packet loss rate is equal to zero, determining the current coding bandwidth according to the last coding bandwidth and the last redundant bandwidth; acquiring a current redundant bandwidth; determining the current transmission bandwidth of the current streaming media data according to the current coding bandwidth and the current redundancy bandwidth, and increasing the transmission bandwidth of the streaming media data and the transmission rate of the streaming media data when packet loss does not occur; when packet loss occurs, the transmission bandwidth of the streaming media data is reduced, and the lost data can be recovered through redundant data recovery, so that the transmission quality of the streaming media data is ensured, the problem that the quality of the streaming media data output by a decoder is influenced by adopting the prior art is solved, and the safety in the transmission process of the streaming media data is improved.
In one embodiment, the obtaining the current redundant bandwidth includes:
using a preset bandwidth step length as the current redundant bandwidth or obtaining a first difference value between a preset bandwidth threshold value and the last transmission bandwidth, and determining the current redundant bandwidth according to the first difference value
In one embodiment, after determining the current transmission bandwidth according to the current coding bandwidth and the current redundant bandwidth, the method further includes:
acquiring the current packet loss rate of the current streaming media data in the transmission process;
if the current packet loss rate is equal to zero, determining the next coding bandwidth according to the current coding bandwidth and the current redundancy bandwidth;
acquiring the next redundant bandwidth;
and determining the next transmission bandwidth according to the current coding bandwidth and the current redundancy bandwidth.
Determining a next encoding bandwidth according to the current encoding bandwidth and the current redundancy bandwidth when the current packet loss rate is equal to zero; acquiring the next redundant bandwidth; and determining that the next transmission bandwidth is increased according to the current coding bandwidth and the current redundant bandwidth, so that the transmission bandwidth of the next streaming media data can be increased under the condition that the current streaming media data are not lost, and the transmission rate of the streaming media data is improved under the condition that the transmission quality of the streaming media data is not influenced.
In one embodiment, the obtaining the next redundant bandwidth comprises:
and taking the preset bandwidth step as the next redundant bandwidth or acquiring a second difference value between the preset bandwidth threshold and the current transmission bandwidth and determining the next redundant bandwidth according to the second difference value.
In one embodiment, the method further comprises:
and if the last packet loss rate is greater than zero, determining the current transmission bandwidth according to the packet loss rate.
In an embodiment, the determining the current transmission bandwidth according to the last packet loss rate includes:
acquiring the ratio of the redundant data of the previous stream media data to the previous stream media data;
if the last packet loss rate is less than or equal to the ratio, reducing the last redundant bandwidth according to the last packet loss rate and taking the reduced last redundant bandwidth as the current redundant bandwidth;
and taking the last coding bandwidth as the current coding bandwidth and determining the last coding bandwidth as the current transmission bandwidth according to the current coding bandwidth and the current redundant bandwidth.
When the last packet loss rate is greater than 0 and less than or equal to the ratio of the redundant data of the previous stream media data to the previous stream media data, the current redundant bandwidth is reduced according to the last packet loss rate, the current redundant bandwidth can be accurately reduced, and the lost stream media data is recovered through the redundant data without affecting the transmission of the stream media data.
In one embodiment, the method further comprises:
if the last packet loss rate is greater than the ratio, reducing the last redundant bandwidth and the last encoding bandwidth according to the last packet loss rate;
taking the reduced last redundant bandwidth as the current redundant bandwidth and taking the reduced last coding bandwidth as the current coding bandwidth;
and determining the current transmission bandwidth according to the current coding bandwidth and the current redundant bandwidth.
When the last packet loss rate is greater than 0 and greater than the ratio of the redundant data of the previous stream media data to the previous stream media data, the current transmission bandwidth is reduced according to the last packet loss rate, so that the transmission redundant bandwidth can be accurately reduced, and the lost stream media data is recovered through the redundant data, so that the transmission of the stream media data is not influenced.
According to a second aspect of the embodiments of the present disclosure, there is provided a bandwidth adjusting apparatus, including:
a previous packet loss rate obtaining module, configured to obtain a previous transmission bandwidth of previous media data and a previous packet loss rate in a transmission process of the previous media data, where the previous transmission bandwidth includes a previous coding bandwidth and a previous redundant bandwidth, the previous media data includes coded data of the previous media data and redundant data of the previous media data, the previous coding bandwidth is a bandwidth for transmitting the coded data of the previous media data, and the previous redundant bandwidth is a bandwidth for transmitting the redundant data of the previous media data;
a current coding bandwidth determining module, configured to determine a current coding bandwidth according to a previous coding bandwidth and a previous redundant bandwidth if the previous packet loss rate is equal to zero;
the current redundant bandwidth obtaining module is used for obtaining the current redundant bandwidth;
and the current transmission bandwidth determining module is used for determining the current transmission bandwidth of the current streaming media data according to the current coding bandwidth and the current redundant bandwidth.
In one embodiment, the current redundant bandwidth acquisition module is configured to:
and taking a preset bandwidth step as the current redundant bandwidth or acquiring a first difference value between a preset bandwidth threshold and the last transmission bandwidth, and determining the current redundant bandwidth according to the first difference value.
In one embodiment, the apparatus further comprises:
a next transmission bandwidth determination module to:
acquiring the current packet loss rate of the current streaming media data in the transmission process;
if the current packet loss rate is equal to zero, determining the next coding bandwidth according to the current coding bandwidth and the current redundancy bandwidth;
acquiring the next redundant bandwidth;
and determining the next transmission bandwidth according to the current coding bandwidth and the current redundancy bandwidth.
In one embodiment, the next transmission bandwidth determination module is further to:
and taking the preset bandwidth step as the next redundant bandwidth or acquiring a second difference value between the preset bandwidth threshold and the current transmission bandwidth and determining the next redundant bandwidth according to the second difference value.
In one embodiment, the current transmission bandwidth determining module is further configured to:
and if the last packet loss rate is greater than zero, determining the current transmission bandwidth according to the packet loss rate.
In one embodiment, the current transmission bandwidth determining module is further configured to:
acquiring the ratio of the redundant data of the previous stream media data to the previous stream media data;
if the last packet loss rate is less than or equal to the ratio, reducing the last redundant bandwidth according to the last packet loss rate and taking the reduced last redundant bandwidth as the current redundant bandwidth;
and taking the last coding bandwidth as the current coding bandwidth and determining the last coding bandwidth as the current transmission bandwidth according to the current coding bandwidth and the current redundant bandwidth.
In one embodiment, the current transmission bandwidth determining module is further configured to:
if the last packet loss rate is greater than the ratio, reducing the last redundant bandwidth and the last encoding bandwidth according to the last packet loss rate;
taking the reduced last redundant bandwidth as the current redundant bandwidth and taking the reduced last coding bandwidth as the current coding bandwidth;
and determining the current transmission bandwidth according to the current coding bandwidth and the current redundant bandwidth.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, which includes a processor and a memory, where at least one computer instruction is stored, and the instruction is loaded and executed by the processor to implement the steps executed in the bandwidth adjusting method according to any one of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, having at least one computer instruction stored therein, the instruction being loaded and executed by a processor to implement the steps performed in the bandwidth adjusting method according to any one of the first aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a first flowchart of a bandwidth adjustment method provided by an embodiment of the present disclosure;
fig. 2 is a flowchart ii of a bandwidth adjustment method provided in the embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a bandwidth adjusting apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a bandwidth adjusting apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a first flowchart of a bandwidth adjustment method provided in an embodiment of the present disclosure. As shown in fig. 1, the method includes:
s101, obtaining a previous transmission bandwidth of previous media data and a previous packet loss rate in the previous media data transmission process, where the previous transmission bandwidth includes a previous coding bandwidth and a previous redundant bandwidth, the previous media data includes coded data of the previous media data and redundant data of the previous media data, the previous coding bandwidth is the coded data for transmitting the previous media data, and the previous redundant bandwidth is a bandwidth for transmitting the redundant data of the previous media data.
Illustratively, at the first transmission of the first streaming media data, the first encoding bandwidth is set to a first preset bandwidth threshold value and the first redundancy bandwidth is set to zero, the first preset bandwidth threshold value is a minimum encoding bandwidth required by the encoder to transmit the streaming media encoding data. That is, when the first streaming media data is transmitted for the first time, only the encoded data of the first streaming media data is transmitted, and the redundant data of the first streaming media data is not transmitted. The first transmission bandwidth of the first streaming media data is the sum of the first coding bandwidth and the first redundancy bandwidth, which is the first preset bandwidth threshold. The redundant data can be a forward error correction code or a backward error correction code, and is used for recovering lost data when packet loss occurs in the transmission process of the streaming media data.
Further, after the first streaming media data is transmitted by using the first preset bandwidth threshold, a first packet loss rate of the first streaming media data in the transmission process is obtained, and if the first packet loss rate is zero, it indicates that the network bandwidth at this time is greater than the first transmission bandwidth, and when the second streaming media data is transmitted for the second time, the second transmission bandwidth of the second streaming media data may be increased.
In one embodiment, the preset bandwidth step may be used as a second redundant bandwidth, the first transmission bandwidth may be used as a second encoding bandwidth, a sum of the second redundant bandwidth and the second encoding bandwidth may be used as a second transmission bandwidth, and the second streaming media data may be transmitted according to the second transmission bandwidth. The second encoding bandwidth is a bandwidth for transmitting encoded data of the second streaming media data, and the second redundant bandwidth is a bandwidth for transmitting redundant data of the second streaming media data.
In another embodiment, a difference between a second preset bandwidth threshold and the first transmission bandwidth may be obtained, and then a half of the difference is used as a second redundant bandwidth, where the second preset bandwidth threshold is a maximum encoding bandwidth required by the encoder to transmit the streaming media encoded data, and the second preset bandwidth threshold is greater than the first bandwidth threshold. And taking the first transmission bandwidth as a second coding bandwidth, taking the sum of the second redundant bandwidth and the second coding bandwidth as a second transmission bandwidth, and transmitting the second streaming media data according to the second transmission bandwidth.
Further, after the second streaming media data with the second transmission bandwidth is adopted, a second packet loss rate of the second streaming media data in the transmission process is obtained, and if the second packet loss rate is zero, it indicates that the network bandwidth at this time is greater than the second transmission bandwidth, and when third streaming media data is transmitted for the third time, a third transmission bandwidth of the third streaming media data is increased.
In one embodiment, if the second redundant bandwidth is a preset bandwidth step size, the preset bandwidth step size is used as a third redundant bandwidth, the second transmission bandwidth is used as a third encoding bandwidth, the sum of the third redundant bandwidth and the third encoding bandwidth is used as a third transmission bandwidth, and third streaming media data is transmitted according to the third transmission bandwidth. The third encoding bandwidth is a bandwidth for transmitting the encoded data of the third streaming media data, and the third redundant bandwidth is a bandwidth for transmitting the redundant data of the third streaming media data.
In another embodiment, if the second redundant bandwidth is half of the difference between the second preset bandwidth threshold and the first transmission bandwidth, the difference between the second transmission bandwidth and the second preset bandwidth threshold is obtained, and then half of the difference is used as the third redundant bandwidth. And taking the second transmission bandwidth as a third coding bandwidth, taking the sum of the third redundant bandwidth and the third coding bandwidth as a third transmission bandwidth, and transmitting third streaming media data according to the third transmission bandwidth.
And repeating the process of adjusting the bandwidth in the transmission process of transmitting the second streaming media data and the third streaming media data until the last transmission bandwidth of the previous streaming media data and the last packet loss rate in the transmission process of the previous streaming media data are obtained before the current streaming media data are transmitted, wherein the last transmission bandwidth is the sum of the last coding bandwidth and the last redundancy bandwidth.
And S102, if the last packet loss rate is equal to zero, determining the current coding bandwidth according to the last coding bandwidth and the last redundant bandwidth.
For example, the last packet loss rate is equal to zero, which indicates that the network bandwidth at this time is greater than the last transmission bandwidth, and when the current streaming media data is transmitted, the current transmission bandwidth of the current streaming media data may be increased.
In this embodiment, the sum of the last coding bandwidth and the last redundant bandwidth is used as the current coding bandwidth, i.e. the last transmission bandwidth is used as the current coding bandwidth.
And S103, acquiring the current redundant bandwidth.
In this step, a preset bandwidth step is used as the current redundant bandwidth or a first difference between a second preset bandwidth threshold and the last transmission bandwidth is obtained, and the current redundant bandwidth is determined according to the first difference.
In one implementation, if the previous redundant bandwidth is a preset bandwidth step, the preset bandwidth step is used as the current redundant bandwidth.
In another embodiment, if the previous redundant bandwidth is half of the difference between the second predetermined bandwidth threshold and the previous transmission bandwidth, a first difference between the second predetermined bandwidth threshold and the previous transmission bandwidth is obtained, and then half of the first difference is used as the current redundant bandwidth.
And S104, determining the current transmission bandwidth of the current streaming media data according to the current coding bandwidth and the current redundancy bandwidth.
In this embodiment, the sum of the current coding bandwidth and the current redundancy bandwidth is taken as the current transmission bandwidth of the current streaming media data.
Further, after determining the current transmission bandwidth according to the current coding bandwidth and the current redundancy bandwidth, the method further includes: acquiring the current packet loss rate of the current streaming media data in the transmission process; if the current packet loss rate is equal to zero, determining a next coding bandwidth according to the current coding bandwidth and the current redundancy bandwidth; acquiring the next redundant bandwidth; determining a next transmission bandwidth according to the current coding bandwidth and the current redundancy bandwidth.
Illustratively, the preset bandwidth step is used as a next redundant bandwidth or a second difference value between a second preset bandwidth threshold and the current transmission bandwidth is obtained, and the next redundant bandwidth is determined according to the second difference value.
In one implementation, if the current redundant bandwidth is a preset bandwidth step, the preset bandwidth step is used as the next redundant bandwidth.
In another embodiment, if the current redundant bandwidth is half of the difference between the second preset bandwidth threshold and the last transmission bandwidth, a second difference between the second preset bandwidth threshold and the current transmission bandwidth is obtained, and then half of the second difference is used as the next redundant bandwidth.
Similarly, after determining the next redundant bandwidth and the next encoding bandwidth, the sum of the next redundant bandwidth and the next encoding bandwidth is used as the next transmission bandwidth and the next streaming media data is transmitted according to the next transmission bandwidth, specifically, the encoded data of the next streaming media data is transmitted by using the next encoding bandwidth, and the redundant data of the next streaming media data is transmitted by using the next redundant bandwidth.
Next, how to adjust the transmission bandwidth of the current streaming media data during transmission when the previous packet loss rate is greater than zero is described.
Illustratively, if the last packet loss rate is greater than zero, the current transmission bandwidth is determined according to the packet loss rate.
How to determine the current transmission bandwidth according to the last packet loss rate is described below.
In one embodiment, a ratio of redundant data of the previous streaming media data to the previous streaming media data is obtained; if the last packet loss rate is less than or equal to the ratio, reducing the last redundant bandwidth according to the last packet loss rate and taking the reduced last redundant bandwidth as the current redundant bandwidth; and taking the last coding bandwidth as the current coding bandwidth and determining the current coding bandwidth and the current redundancy bandwidth as the current transmission bandwidth.
For example, when the previous packet loss rate is 3% and the redundant data of the previous stream media data accounts for 5% of the previous stream media data, the lost data can be recovered through the redundant data, so that the encoded data of the stream media data does not need to be reduced, that is, the encoded data size of the current stream media data is not changed, that is, the previous encoded bandwidth is kept consistent as the current encoded bandwidth. Reducing the previous redundant bandwidth by 3%, and taking the previous redundant bandwidth after the previous redundant bandwidth is reduced by 3% as the current redundant bandwidth; and taking the last coding bandwidth as the current coding bandwidth and taking the sum of the current coding bandwidth and the current redundancy bandwidth as the current transmission bandwidth.
In another embodiment, if the last packet loss rate is greater than the ratio, the last redundant bandwidth and the last encoding bandwidth are decreased according to the last packet loss rate; taking the reduced last redundant bandwidth as the current redundant bandwidth and taking the reduced last coding bandwidth as the current coding bandwidth; and determining the current transmission bandwidth according to the current coding bandwidth and the current redundancy bandwidth.
For example, when the previous packet loss rate is 8% and the redundant data of the previous stream media data accounts for 5% of the previous stream media data, the lost data cannot be recovered through the redundant data, so that the encoded data of the stream media data needs to be reduced, that is, the current encoding bandwidth is smaller than the previous encoding bandwidth. And reducing the previous redundant bandwidth by 8%, reducing the previous coding bandwidth by 8%, taking the previous redundant bandwidth reduced by 8% as the current redundant bandwidth, taking the previous coding bandwidth reduced by 8% as the current coding bandwidth, and taking the sum of the current coding bandwidth and the current redundant bandwidth as the current transmission bandwidth.
It should be noted here that a bandwidth adjustment method of streaming media data after the current streaming media data in the transmission process is similar to the bandwidth adjustment method of the current streaming media data in the transmission process, and details of this embodiment are not repeated here.
The bandwidth adjusting method provided by the embodiment of the present disclosure can obtain a previous transmission bandwidth of previous media data and a previous packet loss rate in a transmission process of the previous media data, where the previous transmission bandwidth includes a previous coding bandwidth and a previous redundant bandwidth, the previous media data includes coded data of the previous media data and redundant data of the previous media data, the previous coding bandwidth is coded data for transmitting the previous media data, and the previous redundant bandwidth is a bandwidth for transmitting the redundant data of the previous media data; if the last packet loss rate is equal to zero, determining the current coding bandwidth according to the last coding bandwidth and the last redundant bandwidth; acquiring a current redundant bandwidth; determining the current transmission bandwidth of the current streaming media data according to the current coding bandwidth and the current redundancy bandwidth, and increasing the transmission bandwidth of the streaming media data and the transmission rate of the streaming media data when packet loss does not occur; when packet loss occurs, the transmission bandwidth of the streaming media data is reduced, and the lost data can be recovered through redundant data recovery, so that the transmission quality of the streaming media data is ensured, the problem that the quality of the streaming media data output by a decoder is influenced by adopting the prior art is solved, and the safety in the transmission process of the streaming media data is improved.
The following describes the bandwidth adjustment method provided in the embodiment of the present disclosure in further detail with reference to the embodiment of fig. 2. Fig. 2 is a flowchart ii of a bandwidth adjustment method provided in the implementation of the present disclosure. The following explains the related terms appearing in the present embodiment.
Coding bandwidth: bandwidth occupied by data output by the encoder;
redundant bandwidth: additional bandwidth of redundant data added for data reliability;
transmission bandwidth: coding bandwidth + redundancy bandwidth;
network bandwidth: maximum bandwidth for error-free transmission between two data terminals in the network.
S201, setting initial parameters;
if the minimum bandwidth required by the session is Min, the maximum bandwidth is Max, and the redundant bandwidth is d;
s202, coding according to the bandwidth Min under the initial condition without redundant bandwidth;
at this time, no packet should be lost, otherwise, the network condition is considered not to meet the basic requirement.
S203, adding redundant data and redundant bandwidth d, wherein the transmission bandwidth is Min + d;
the redundant data may be a forward error correction code or a backward error correction code. The size of d is not limited, and may be set according to actual needs, for example, if it is desired to reach the network bandwidth quickly, it may be set larger. Otherwise the settings may be smaller. d may also be set to the value of one binary search. That is, the value of d is set to make the transmission bandwidth half of the current transmission bandwidth to the maximum bandwidth. The network bandwidth is judged rapidly by continuously dividing into two parts. d may also be a fixed bandwidth step.
S204, if no packet loss is detected, if the network bandwidth is considered to be greater than Min + d, setting the coding bandwidth to be Min + d and the redundancy bandwidth to be d, and at the moment, setting the transmission bandwidth to be Min +2 d; and if packet loss is detected, the network bandwidth is considered to be smaller than Min + d. Because the lost data can be recovered through the redundant data, the obtained data with the bandwidth of Min and no packet loss has no influence on a decoder;
s205, under the condition of no packet loss, if the current transmission bandwidth does not reach the maximum bandwidth, incremental superposition can be continuously carried out according to the mode of S204. I.e. keeping the redundant bandwidth d constant, the coding bandwidth plus d achieves a gradual increase of the bandwidth. And if the packet loss is detected, judging whether to decrease the coding bandwidth according to a specific condition.
Specifically, when the packet loss rate is greater than 0, the bandwidth reduction processing may be performed, that is, the current transmission bandwidth is decreased according to the packet loss rate.
The scheme provides a convenient mode for detecting the effective bandwidth, and because the bandwidth is reserved for the redundant data, even if packet loss occurs under the condition that the bandwidth cannot meet the transmission requirement, the effective data in the transmission process can be found back through the redundant data without influencing decoding, so that the scheme of the invention can detect the effective bandwidth, and meanwhile, a detection mechanism has no influence on a decoder.
Based on the bandwidth adjusting method described in the corresponding embodiment, the following is an embodiment of the apparatus of the present disclosure, which can be used to execute the embodiment of the method of the present disclosure.
The embodiment of the present disclosure provides a bandwidth adjusting apparatus, and fig. 3 is a schematic structural diagram of the bandwidth adjusting apparatus provided in the embodiment of the present disclosure, and as shown in fig. 3, the software application configuring apparatus 30 includes:
a previous packet loss rate obtaining module 301, configured to obtain a previous transmission bandwidth of previous media data and a previous packet loss rate in a transmission process of the previous media data, where the previous transmission bandwidth includes a previous coding bandwidth and a previous redundant bandwidth, the previous media data includes coded data of the previous media data and redundant data of the previous media data, the previous coding bandwidth is a bandwidth for transmitting the coded data of the previous media data, and the previous redundant bandwidth is a bandwidth for transmitting the redundant data of the previous media data;
a current coding bandwidth determining module 302, configured to determine a current coding bandwidth according to a previous coding bandwidth and a previous redundant bandwidth if the previous packet loss rate is equal to zero;
a current redundant bandwidth obtaining module 303, configured to obtain a current redundant bandwidth;
a current transmission bandwidth determining module 304, configured to determine a current transmission bandwidth of current streaming media data according to the current coding bandwidth and the current redundant bandwidth.
In one embodiment, the current redundant bandwidth obtaining module 303 is configured to:
and taking a preset bandwidth step as the current redundant bandwidth or acquiring a first difference value between a preset bandwidth threshold and the last transmission bandwidth, and determining the current redundant bandwidth according to the first difference value.
In one embodiment, as shown in fig. 4, the apparatus 30 further comprises:
a next transmission bandwidth determination module 305 to:
acquiring the current packet loss rate of the current streaming media data in the transmission process;
if the current packet loss rate is equal to zero, determining the next coding bandwidth according to the current coding bandwidth and the current redundancy bandwidth;
acquiring the next redundant bandwidth;
and determining the next transmission bandwidth according to the current coding bandwidth and the current redundancy bandwidth.
In one embodiment, the next transmission bandwidth determination module 305 is further configured to:
and taking the preset bandwidth step as the next redundant bandwidth or acquiring a second difference value between the preset bandwidth threshold and the current transmission bandwidth and determining the next redundant bandwidth according to the second difference value.
In one embodiment, the current transmission bandwidth determining module 304 is further configured to:
and if the last packet loss rate is greater than zero, determining the current transmission bandwidth according to the packet loss rate.
In one embodiment, the current transmission bandwidth determining module 304 is further configured to:
acquiring the ratio of the redundant data of the previous stream media data to the previous stream media data;
if the last packet loss rate is less than or equal to the ratio, reducing the last redundant bandwidth according to the last packet loss rate and taking the reduced last redundant bandwidth as the current redundant bandwidth;
and taking the last coding bandwidth as the current coding bandwidth and determining the last coding bandwidth as the current transmission bandwidth according to the current coding bandwidth and the current redundant bandwidth.
In one embodiment, the current transmission bandwidth determining module 304 is further configured to:
if the last packet loss rate is greater than the ratio, reducing the last redundant bandwidth and the last encoding bandwidth according to the last packet loss rate;
taking the reduced last redundant bandwidth as the current redundant bandwidth and taking the reduced last coding bandwidth as the current coding bandwidth;
and determining the current transmission bandwidth according to the current coding bandwidth and the current redundant bandwidth.
The implementation process and technical effects of the software application configuration device provided in the embodiment of the present disclosure can be seen in the embodiments of fig. 1 to 2, which are not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 5, the electronic device 50 includes:
a processor 501 and a memory 502, wherein the memory 502 stores at least one computer instruction, and the instruction is loaded and executed by the processor 501 to implement the bandwidth adjusting method described in the above method embodiment.
Based on the bandwidth adjustment configuration method described in the embodiments corresponding to fig. 2 to fig. 3, the embodiments of the present disclosure further provide a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the bandwidth adjusting method described in the embodiment corresponding to fig. 2 to fig. 3, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A bandwidth adjustment method, comprising:
acquiring a last transmission bandwidth of previous stream media data and a last packet loss rate in the transmission process of the previous stream media data, wherein the last transmission bandwidth comprises a last encoding bandwidth and a last redundant bandwidth, the previous stream media data comprises encoded data of the previous stream media data and redundant data of the previous stream media data, the last encoding bandwidth is a bandwidth for transmitting the encoded data of the previous stream media data, and the last redundant bandwidth is a bandwidth for transmitting the redundant data of the previous stream media data;
if the last packet loss rate is equal to zero, determining the current coding bandwidth according to the last coding bandwidth and the last redundant bandwidth;
acquiring a current redundant bandwidth;
and determining the current transmission bandwidth of the current streaming media data according to the current coding bandwidth and the current redundant bandwidth.
2. The method of claim 1, wherein obtaining the current redundant bandwidth comprises:
and taking a preset bandwidth step as the current redundant bandwidth or acquiring a first difference value between a preset bandwidth threshold and the last transmission bandwidth, and determining the current redundant bandwidth according to the first difference value.
3. The method of claim 1, wherein after determining a current transmission bandwidth according to the current coding bandwidth and the current redundancy bandwidth, the method further comprises:
acquiring the current packet loss rate of the current streaming media data in the transmission process;
if the current packet loss rate is equal to zero, determining the next coding bandwidth according to the current coding bandwidth and the current redundancy bandwidth;
acquiring the next redundant bandwidth;
and determining the next transmission bandwidth according to the current coding bandwidth and the current redundancy bandwidth.
4. The method of claim 3, wherein obtaining the next redundant bandwidth comprises:
and taking the preset bandwidth step as the next redundant bandwidth or acquiring a second difference value between the preset bandwidth threshold and the current transmission bandwidth and determining the next redundant bandwidth according to the second difference value.
5. The method of claim 1, further comprising:
and if the last packet loss rate is greater than zero, determining the current transmission bandwidth according to the packet loss rate.
6. The method of claim 5, wherein the determining the current transmission bandwidth according to the last packet loss ratio comprises:
acquiring the ratio of the redundant data of the previous stream media data to the previous stream media data;
if the last packet loss rate is less than or equal to the ratio, reducing the last redundant bandwidth according to the last packet loss rate and taking the reduced last redundant bandwidth as the current redundant bandwidth;
and taking the last coding bandwidth as the current coding bandwidth and determining the last coding bandwidth as the current transmission bandwidth according to the current coding bandwidth and the current redundant bandwidth.
7. The method of claim 6, further comprising:
if the last packet loss rate is greater than the ratio, reducing the last redundant bandwidth and the last encoding bandwidth according to the last packet loss rate;
taking the reduced last redundant bandwidth as the current redundant bandwidth and taking the reduced last coding bandwidth as the current coding bandwidth;
and determining the current transmission bandwidth according to the current coding bandwidth and the current redundant bandwidth.
8. A bandwidth adjustment apparatus, comprising:
a previous packet loss rate obtaining module, configured to obtain a previous transmission bandwidth of previous media data and a previous packet loss rate in a transmission process of the previous media data, where the previous transmission bandwidth includes a previous coding bandwidth and a previous redundant bandwidth, the previous media data includes coded data of the previous media data and redundant data of the previous media data, the previous coding bandwidth is a bandwidth for transmitting the coded data of the previous media data, and the previous redundant bandwidth is a bandwidth for transmitting the redundant data of the previous media data;
a current coding bandwidth determining module, configured to determine a current coding bandwidth according to a previous coding bandwidth and a previous redundant bandwidth if the previous packet loss rate is equal to zero;
the current redundant bandwidth obtaining module is used for obtaining the current redundant bandwidth;
and the current transmission bandwidth determining module is used for determining the current transmission bandwidth of the current streaming media data according to the current coding bandwidth and the current redundant bandwidth.
9. An electronic device, comprising a processor and a memory, wherein at least one computer instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the steps performed in the bandwidth adjusting method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon at least one computer instruction, which is loaded and executed by a processor to perform the steps performed in the bandwidth adjustment method of any one of claims 1 to 7.
CN202110052113.6A 2021-01-15 2021-01-15 Bandwidth adjusting method and device, electronic equipment and storage medium Pending CN112929201A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110052113.6A CN112929201A (en) 2021-01-15 2021-01-15 Bandwidth adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110052113.6A CN112929201A (en) 2021-01-15 2021-01-15 Bandwidth adjusting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112929201A true CN112929201A (en) 2021-06-08

Family

ID=76163221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110052113.6A Pending CN112929201A (en) 2021-01-15 2021-01-15 Bandwidth adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112929201A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726562A (en) * 2021-08-19 2021-11-30 中国电子科技集团公司第二十八研究所 Method for evaluating network communication bandwidth required by monitoring information transmission between air traffic control systems

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726562A (en) * 2021-08-19 2021-11-30 中国电子科技集团公司第二十八研究所 Method for evaluating network communication bandwidth required by monitoring information transmission between air traffic control systems

Similar Documents

Publication Publication Date Title
US9060178B2 (en) Dynamic encode setting adjustment
US6910175B2 (en) Encoder redundancy selection system and method
US8964115B2 (en) Transmission capacity probing using adaptive redundancy adjustment
US10917668B1 (en) Live to video on demand normalization
US8732326B2 (en) Dynamic adjustments of video streams
US20110205427A1 (en) Method and apparatus for controlling video-audio data playing
US8612819B2 (en) Systems, methods, and media for checking available bandwidth using forward error correction
JP5094546B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, PROGRAM
CN112511782B (en) Video conference method, first terminal, MCU, system and storage medium
WO2017053154A1 (en) Speech encoding
CN112929201A (en) Bandwidth adjusting method and device, electronic equipment and storage medium
CN116208771A (en) Video code rate adjusting method, device and equipment
US9484040B2 (en) Audio decoding method and associated apparatus
US11812036B2 (en) Method for image transmitting, transmitting device and receiving device
CN112187817A (en) Streaming media data transmission method, device, equipment and storage medium
US20210075843A1 (en) Quality Metadata Signaling for Dynamic Adaptive Streaming of Video
CN110875906A (en) Image recovery method and encoding end
CN115378832A (en) Congestion detection method and device, streaming media transmission system, electronic equipment and medium
CN111970578B (en) Method and device for repairing audio and video data transmission
CN109672887B (en) Video coding method and device
JP4459660B2 (en) Error correction apparatus and error correction method
CN113422958B (en) Method, system and medium for controlling size of video coding frame layer code stream
CN116866322A (en) Cloud desktop data processing method, device, equipment and readable storage medium
CN111954002A (en) Image coding method, device, coding end equipment and storage medium
CN115633149A (en) Conference data transmission 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