CN114157911B - Method and device for controlling streaming media transmission rate, electronic equipment and storage medium - Google Patents

Method and device for controlling streaming media transmission rate, electronic equipment and storage medium Download PDF

Info

Publication number
CN114157911B
CN114157911B CN202111093111.8A CN202111093111A CN114157911B CN 114157911 B CN114157911 B CN 114157911B CN 202111093111 A CN202111093111 A CN 202111093111A CN 114157911 B CN114157911 B CN 114157911B
Authority
CN
China
Prior art keywords
transmission rate
real
noise ratio
current moment
time
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.)
Active
Application number
CN202111093111.8A
Other languages
Chinese (zh)
Other versions
CN114157911A (en
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202111093111.8A priority Critical patent/CN114157911B/en
Publication of CN114157911A publication Critical patent/CN114157911A/en
Application granted granted Critical
Publication of CN114157911B publication Critical patent/CN114157911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/25Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • H04N21/64738Monitoring network characteristics, e.g. bandwidth, congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Abstract

The method comprises the steps of monitoring a real-time signal-to-noise ratio when target streaming media data are transmitted in a target network; when the real-time signal-to-noise ratio changes, acquiring the transmission rate of the target streaming media data at the first current moment; acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation; and when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment. The timeliness and the speed of adjusting the data transmission rate are improved, and the media data transmission is more timely and smooth.

Description

Method and device for controlling streaming media transmission rate, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for controlling a streaming media transmission rate, an electronic device, and a storage medium.
Background
At present, in the fields of smart homes and the like, remote checking and real-time monitoring pictures are widely applied, and equipment connected by a wireless network is also very popular. In the process of real-time video transmission, the network state can change continuously, and the network speed can also change continuously. The data transmission rate is reduced due to the deterioration of the network state, and the real-time media transmission is sensitive to the rate, so that the phenomena of packet loss, jamming and the like are generated when the network rate is reduced, and the use experience is influenced.
The current solutions are:
(1) In the transmission process, a sender counts the sent data volume, a receiver counts the received data volume, the receiver sends the received data volume to the sender, and the sender evaluates the network state according to the data fed back by the receiver, so that the data transmission rate is adjusted.
(2) When the receiving party obtains the data rate too slow and the jamming occurs, the receiving party switches the media with other code stream rates to resist the jamming caused by low network speed.
Although the above two ways reduce the packet loss and pause phenomena in the media transmission process, both of the two schemes have a certain hysteresis, and both of the two schemes are adjusted after the packet loss and pause conditions occur for a period of time, which still causes the packet loss and pause of the media data to a certain extent, and affects the user experience.
Disclosure of Invention
In view of the above problems, the present application provides a method, an apparatus, an electronic device, and a storage medium for controlling a streaming media transmission rate, which solve the technical problem in the prior art that the user experience is affected due to the long-term packet loss and blocking during the transmission of media data in a wireless or mobile network.
In a first aspect, the present application provides a method for controlling a streaming media transmission rate, including:
monitoring a real-time signal-to-noise ratio during target streaming media data transmission in a target network;
when the absolute value of the difference value between the real-time signal-to-noise ratio at a first current moment and the real-time signal-to-noise ratio at a previous moment of the first current moment is greater than a first preset threshold value, acquiring the transmission rate of the target streaming media data at the first current moment;
acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation;
judging whether the transmission rate of the target streaming media data at the first current moment is in an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
and when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment.
According to an embodiment of the present application, optionally, in the method for controlling a streaming media transmission rate, the preset mapping relationship is constructed by the following steps:
acquiring the optimal network transmission rate of the target network under different signal-to-noise ratios;
giving corresponding rate allowance to the optimal network transmission rate under different signal-to-noise ratios to obtain the optimal network transmission rate range under different signal-to-noise ratios;
and obtaining a mapping relation between the signal-to-noise ratio and the optimal network transmission rate range according to the optimal network transmission rate range under different signal-to-noise ratios, thereby obtaining the preset mapping relation.
According to an embodiment of the present application, optionally, in the method for controlling a streaming media transmission rate, acquiring an optimal network transmission rate of the target network under different signal-to-noise ratios includes the following steps:
monitoring a real-time signal-to-noise ratio of the target network;
when the absolute value of the difference value between the real-time signal-to-noise ratio at the second current moment and the real-time signal-to-noise ratio at the previous moment of the second current moment is greater than a second preset threshold value, acquiring the optimal network transmission rate of the target network at the second current moment to acquire the optimal network transmission rate of the target network at the real-time signal-to-noise ratio at the second current moment, so as to acquire the optimal network transmission rate of the target network at different signal-to-noise ratios.
According to an embodiment of the present application, optionally, in the method for controlling a streaming media transmission rate, obtaining an optimal network transmission rate range matched with the real-time snr at the first current time according to a preset mapping relationship, includes the following steps:
judging whether the real-time signal-to-noise ratio of the first current moment is the same as each signal-to-noise ratio in the preset mapping relation or not according to the preset mapping relation;
when the real-time signal-to-noise ratio at the first current moment is different from each signal-to-noise ratio in the preset mapping relation, arranging the signal-to-noise ratios in the preset mapping relation according to a magnitude sequence so as to correct the preset mapping relation and obtain the corrected preset mapping relation;
when the real-time signal-to-noise ratio of the first current moment is between two adjacent signal-to-noise ratios in the preset mapping relation after correction, setting a reference value between the two adjacent signal-to-noise ratios, and comparing the real-time signal-to-noise ratio of the first current moment with the reference value;
when the real-time signal-to-noise ratio of the first current moment is smaller than the reference value, taking the optimal network transmission rate range matched with the smaller of the two adjacent signal-to-noise ratios as the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment;
and when the real-time signal-to-noise ratio of the first current moment is greater than or equal to the reference value, taking the optimal network transmission rate range matched with the larger of the two adjacent signal-to-noise ratios as the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment.
According to an embodiment of the present application, optionally, in the method for controlling a streaming media transmission rate, when the real-time snr at the first current time is different from each snr in the preset mapping relationship, the snrs in the preset mapping relationship are arranged according to a size sequence to correct the preset mapping relationship, and after the step of obtaining the corrected preset mapping relationship, the method further includes:
when the real-time signal-to-noise ratio at the first current moment is smaller than the minimum signal-to-noise ratio in the preset mapping relation after correction, taking the optimal network transmission rate range matched with the minimum signal-to-noise ratio in the preset mapping relation after correction as the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
and when the real-time signal-to-noise ratio of the first current moment is greater than the maximum signal-to-noise ratio in the preset mapping relation after correction, taking the optimal network transmission rate range matched with the maximum signal-to-noise ratio in the preset mapping relation after correction as the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment.
According to an embodiment of the present application, optionally, in the method for controlling a streaming media transmission rate, when a transmission rate of the target streaming media data at the first current time is outside an optimal network transmission rate range matched with the real-time snr of the first current time, the method adjusts the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time snr of the first current time, and includes the following steps:
when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data to any value in the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment.
According to an embodiment of the present application, optionally, in the method for controlling a streaming media transmission rate, when the transmission rate of the target streaming media data at the first current time is out of an optimal network transmission rate range matched with the real-time snr of the first current time, the method for controlling a streaming media transmission rate adjusts the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time snr of the first current time, and includes the following steps:
when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time by adjusting the code stream rate according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
and the code stream rate is less than or equal to the transmission capability of the target network.
In a second aspect, the present application provides an apparatus for controlling a streaming media transmission rate, including:
the monitoring module is used for monitoring the real-time signal-to-noise ratio of target streaming media data in a target network during transmission;
the acquisition module is used for acquiring the transmission rate of the target streaming media data at a first current moment when the absolute value of the difference value between the real-time signal-to-noise ratio at the first current moment and the real-time signal-to-noise ratio at the previous moment of the first current moment is greater than a first preset threshold;
the matching module is used for acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation;
the judging module is used for judging whether the transmission rate of the target streaming media data at the first current moment is in an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
and the adjusting module is used for adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment.
In a third aspect, the present application provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the electronic device executes the method for controlling a streaming media transmission rate according to any one of the first aspect.
In a fourth aspect, the present application provides a storage medium storing a computer program which, when executed by one or more processors, implements the method for controlling a streaming media transmission rate according to any one of the first aspect.
Compared with the prior art, one or more embodiments in the above scheme can have the following advantages or beneficial effects:
the method comprises the steps of monitoring a real-time signal-to-noise ratio when target streaming media data are transmitted in a target network; when the real-time signal-to-noise ratio changes, acquiring the transmission rate of the target streaming media data at the first current moment; acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation; and when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment. Under the condition that the signal-to-noise ratio (SNR) is monitored to be changed, the transmission rate of target data is actively adjusted according to the optimal network transmission rate corresponding to the real-time SNR, and the adjustment is not required to be carried out after a receiving party finds that the data is lost or jammed, so that the timeliness and the speed of adjusting the data transmission rate are improved, and the media data transmission is more timely and smooth.
Drawings
The present application will be described in more detail hereinafter on the basis of embodiments and with reference to the accompanying drawings:
fig. 1 is a schematic flowchart illustrating a method for controlling a streaming media transmission rate according to an embodiment of the present disclosure;
fig. 2 is another schematic flowchart of a method for controlling a streaming media transmission rate according to an embodiment of the present disclosure;
fig. 3 is another schematic flowchart of a method for controlling a streaming media transmission rate according to an embodiment of the present disclosure;
fig. 4 is another schematic flowchart of a method for controlling a streaming media transmission rate according to an embodiment of the present disclosure;
fig. 5 is a connection block diagram of a device for controlling a streaming media transmission rate according to an embodiment of the present application;
in the drawings, like parts are designated with like reference numerals, and the drawings are not drawn to scale.
Detailed Description
The following detailed description will be provided with reference to the accompanying drawings and embodiments, so that how to apply the technical means to solve the technical problems and achieve the corresponding technical effects can be fully understood and implemented. The embodiments and various features in the embodiments of the present application can be combined with each other without conflict, and the formed technical solutions are all within the scope of protection of the present application.
Example one
Referring to fig. 1, the present embodiment provides a method for controlling a streaming media transmission rate, including:
step S110: and monitoring the real-time signal-to-noise ratio of the target streaming media data in the target network during transmission.
The real-time Signal-to-Noise Ratio (SNR) is reported or actively obtained by a network device, and the network device detects and reports the SNR data in real time.
Step S120: and when the absolute value of the difference value between the real-time signal-to-noise ratio at the first current moment and the real-time signal-to-noise ratio at the last moment of the first current moment is greater than a first preset threshold value, acquiring the transmission rate of the target streaming media data at the first current moment.
When the absolute value of the difference between the real-time signal-to-noise ratio at the first current moment and the real-time signal-to-noise ratio at the previous moment of the first current moment is greater than a first preset threshold, it indicates that the real-time signal-to-noise ratio changes, the first preset threshold can be set according to actual needs, and when the real-time signal-to-noise ratio changes, the transmission rate of the target streaming media data at the first current moment is detected and acquired.
The transmission rate of the target streaming media data is acquired by a transmission rate detector.
The variation of the snr is caused by external conditions, such as signal strength variation, noise interference variation, etc., which affect the transmission rate of the target streaming media data.
Step S130: and acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation.
The preset mapping relationship (preset mapping table) is a corresponding relationship between different signal-to-noise ratios and corresponding optimal network transmission rate ranges.
According to the preset mapping relation, the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment can be searched.
That is to say, the optimal network transmission rate (optimum network transmission rate) of the target network is different under different SNR, and since the time taken for detecting the optimal network transmission rate of the target network is long (such as the existing network speed testing device, applet, browser, etc.), unlike the case where the transmission rate (real-time transmission rate) of the target streaming media data at the first current time is displayed in real time, in order to avoid the problem that the network speed cannot be adjusted in time and the data transmission is blocked or lost for a long time due to the fact that the corresponding optimal network transmission rate is detected again each time the SNR of the SNR changes, the mapping relationship between the SNR and the optimal network transmission rate is established in advance, when the SNR changes, the optimal network transmission rate range matched with the real-time SNR at the first current time is matched in time, the matching speed is fast, and the target streaming media data can respond and perform subsequent adjustment.
Wherein the preset mapping relationship is constructed by the following steps:
(1) Acquiring the optimal network transmission rate of the target network under different signal-to-noise ratios;
(2) Giving corresponding rate allowance to the optimal network transmission rate under different signal-to-noise ratios to obtain the optimal network transmission rate range under different signal-to-noise ratios;
(3) And obtaining a mapping relation between the signal-to-noise ratio and the optimal network transmission rate range according to the optimal network transmission rate range under different signal-to-noise ratios, thereby obtaining the preset mapping relation.
In the process of obtaining the optimal network transmission rates of the target network under different signal-to-noise ratios, the different optimal network transmission rates can be divided into different levels, for example, the levels are L1, L2, \8230;, ln, and the corresponding optimal network transmission rates are S1, S2, \8230;, sn, respectively. After the optimal network transmission rate is matched, the optimal network transmission rate is used for subsequent transmission rate regulation, but in the actual application process, due to the reason of network signal stability, the transmission rate is difficult to perfectly match the set rate Sn, so a rate margin needs to be set, and the regulation and control transmission rate can be matched within a certain range. The rate allowance (delta S) is set according to actual needs, and after the rate allowance (delta S) is set, the optimal network transmission rate ranges corresponding to all levels are S1-S1 + delta S, S2-S2 + delta S, \ 8230and Sn-Sn + delta S respectively. The rate allowance (Δ S) is set in such a way that the optimal network transmission rate ranges corresponding to the respective levels do not cover each other, and under the condition of a limited number of levels, all the optimal network transmission rate ranges in the preset mapping relationship can cover a larger range.
In the subsequent process, the signal-to-noise ratio and the optimal network transmission rate can be continuously detected under the condition of not influencing data transmission, and the preset mapping relation is updated and corrected in real time according to the collected data.
In some cases, Δ S may be 100kpbs.
Wherein, in the step of the preset mapping relationship, the optimal network transmission rate of the target network under different signal-to-noise ratios is obtained, and the method comprises the following steps:
(1) Monitoring a real-time signal-to-noise ratio of the target network;
(2) When the absolute value of the difference value between the real-time signal-to-noise ratio at the second current moment and the real-time signal-to-noise ratio at the previous moment of the second current moment is greater than a second preset threshold value, acquiring the optimal network transmission rate of the target network at the second current moment to acquire the optimal network transmission rate of the target network at the real-time signal-to-noise ratio at the second current moment, so as to acquire the optimal network transmission rate of the target network at different signal-to-noise ratios.
That is to say, as shown in fig. 2, the real-time snr of the target network is monitored, when the real-time snr changes, the current optimal network transmission rate is detected, so as to obtain the optimal network transmission rate of the target network at the real-time snr of the second current time, and by repeating this step, the optimal network transmission rate of the target network at different snrs can be obtained, so as to establish the mapping relationship between the snrs and the optimal network transmission rate range.
As shown in fig. 3, the matching process of step S130 includes the following steps:
s131: judging whether the real-time signal-to-noise ratio of the first current moment is the same as each signal-to-noise ratio in the preset mapping relation or not according to the preset mapping relation;
s133: when the real-time signal-to-noise ratio at the first current moment is different from each signal-to-noise ratio in the preset mapping relation, arranging the signal-to-noise ratios in the preset mapping relation according to a magnitude sequence so as to correct the preset mapping relation and obtain the corrected preset mapping relation;
s135: when the real-time signal-to-noise ratio of the first current moment is between two adjacent signal-to-noise ratios in the preset mapping relationship after correction, setting a reference value between the two adjacent signal-to-noise ratios, and comparing the real-time signal-to-noise ratio of the first current moment with the reference value;
s137: when the real-time signal-to-noise ratio at the first current moment is smaller than the reference value, taking the optimal network transmission rate range matched with the smaller of the two adjacent signal-to-noise ratios as the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
s139: and when the real-time signal-to-noise ratio of the first current moment is greater than or equal to the reference value, taking the optimal network transmission rate range matched with the larger of the two adjacent signal-to-noise ratios as the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment.
And when the real-time signal-to-noise ratio at the first current moment is the same as one signal-to-noise ratio in the preset mapping relation, taking the optimal network transmission rate range matched with the signal-to-noise ratio as the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment.
In addition, in order to avoid the situation that the real-time snr at the first current time does not match the corresponding relationship in the preset mapping relationship, the optimal network transmission rate range matched with the similar snr may be the optimal network transmission rate range matched with the real-time snr at the first current time as long as the difference between the real-time snr at the first current time and the similar snr is smaller than a certain value.
For example, after the SNRs in the preset mapping relationship are arranged according to the magnitude order, the real-time SNR (SNRnow) at the first current time is between SNRn and SRNn +1, a reference value of a reference value between the adjacent SNRn and SRNn +1 is set, where the reference value may be SNRn + Δ SNR, SNRn + Δ SNR is greater than SNRn and less than SRNn +1, if SNRnow < SNRn + Δ SNR, the optimal network transmission rate range matched with SNRn is the optimal network transmission rate range matched with SNRnow, and if SNRn + Δ SNR is greater than or equal to SNRn + Δ SNR, the optimal network transmission rate range matched with SNRn +1 is the optimal network transmission rate range matched with SNRn.
The Δ SNR may be set according to actual needs, and in some cases, the Δ SNR may be 0.5dbm.
In addition to the above situation, a situation may also occur that the real-time signal-to-noise ratio at the first current time is smaller than the minimum signal-to-noise ratio in the preset mapping relationship after the correction, or the real-time signal-to-noise ratio at the first current time is larger than the maximum signal-to-noise ratio in the preset mapping relationship after the correction, that is, when the real-time signal-to-noise ratio at the first current time is outside all signal-to-noise ratio ranges in the preset mapping relationship, the matching is performed in the following manner:
(1) When the real-time signal-to-noise ratio at the first current moment is smaller than the minimum signal-to-noise ratio in the preset mapping relation after correction, taking the optimal network transmission rate range matched with the minimum signal-to-noise ratio in the preset mapping relation after correction as the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
(2) And when the real-time signal-to-noise ratio at the first current moment is greater than the maximum signal-to-noise ratio in the preset mapping relationship after correction, taking the optimal network transmission rate range matched with the maximum signal-to-noise ratio in the preset mapping relationship after correction as the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment.
Step S140: and judging whether the transmission rate of the target streaming media data at the first current moment is in an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment.
After obtaining the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current time, according to the currently acquired data transmission rate (the transmission rate of the target streaming media data at the first current time), judging whether the currently acquired data transmission rate is within the corresponding optimal network transmission rate range, that is, judging whether the transmission rate of the target streaming media data needs to be adjusted, if so, indicating that the transmission rate of the target streaming media data does not need to be adjusted, and if so, indicating that the transmission rate of the target streaming media data needs to be adjusted.
Step S150: and when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment.
Specifically, when the transmission rate of the target streaming media data at the first current time is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current time, the transmission rate of the target streaming media data is adjusted in real time to any value in the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current time.
The transmission rate of the target streaming media data is adjusted by adjusting the code stream rate output by the encoder, the encoder can be adjusted by setting parameters, the output code stream rate changes, the transmission rate of the target streaming media data also changes, and the code stream rate and the transmission rate of the streaming media can be regarded as equal. And the code stream rate is less than or equal to the transmission capacity of the target network.
Referring to fig. 4, another flow chart of the streaming media transmission rate method is also provided in the present embodiment.
The embodiment provides a control method of streaming media transmission rate, which comprises the steps of monitoring the real-time signal-to-noise ratio of target streaming media data in a target network during transmission; when the real-time signal-to-noise ratio changes, acquiring the transmission rate of the target streaming media data at the first current moment; acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation; and when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment. Under the condition that the signal-to-noise ratio (SNR) is monitored to change, the transmission rate of target data is actively adjusted according to the optimal network transmission rate corresponding to the real-time SNR, and the adjustment is not needed after a receiving party finds that data is lost or blocked, so that the timeliness and the speed of adjusting the data transmission rate are improved, and the media data transmission is more timely and smooth.
Example two
Referring to fig. 5, the present embodiment provides a device for controlling a streaming media transmission rate, including: the system comprises a monitoring module 110, an obtaining module 120, a matching module 130, a judging module 140 and an adjusting module 150.
The monitoring module 110 is configured to monitor a real-time signal-to-noise ratio during target streaming media data transmission in a target network;
an obtaining module 120, configured to obtain a transmission rate of the target streaming media data at a first current time when an absolute value of a difference between a real-time signal-to-noise ratio at the first current time and a real-time signal-to-noise ratio at a previous time of the first current time is greater than a first preset threshold;
the matching module 130 is configured to obtain an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current time according to a preset mapping relationship;
a determining module 140, configured to determine whether a transmission rate of the target streaming media data at the first current time is within an optimal network transmission rate range matched with a real-time signal-to-noise ratio at the first current time;
an adjusting module 150, configured to adjust the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time snr of the first current moment when the transmission rate of the target streaming media data at the first current moment is outside the optimal network transmission rate range matched with the real-time snr of the first current moment.
The monitoring module 110 monitors a real-time signal-to-noise ratio of the target streaming media data in the target network during transmission; the obtaining module 120 obtains a transmission rate of the target streaming media data at a first current moment when an absolute value of a difference between a real-time signal-to-noise ratio at the first current moment and a real-time signal-to-noise ratio at a previous moment of the first current moment is greater than a first preset threshold; the matching module 130 obtains an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation; the determining module 140 determines whether the transmission rate of the target streaming media data at the first current time is within an optimal network transmission rate range matched with the real-time snr at the first current time; the adjusting module 150 adjusts the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time snr at the first current time when the transmission rate of the target streaming media data at the first current time is out of the optimal network transmission rate range matched with the real-time snr at the first current time.
The specific embodiment process of the above method steps can be referred to as embodiment one, and the details of this embodiment are not repeated herein.
EXAMPLE III
The embodiment provides an electronic device, which may be a mobile phone, a computer, a tablet computer, or the like, and includes a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, implements the method for controlling a streaming media transmission rate as described in the first embodiment. It is to be appreciated that the electronic device can also include input/output (I/O) interfaces, as well as communication components.
Wherein, the processor is used for executing all or part of the steps in the method for controlling the streaming media transmission rate as in the first embodiment. The memory is used to store various types of data, which may include, for example, instructions for any application or method in the electronic device, as well as application-related data.
The Processor may be an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components, and is configured to perform the method for controlling the transmission rate of the streaming media in the first embodiment.
The Memory may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically Erasable Programmable Read-Only Memory (EEPROM), erasable Programmable Read-Only Memory (EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk.
Example four
The present embodiments provide a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App, etc., having stored thereon a computer program that when executed by a processor may implement the method steps of:
step S110: monitoring a real-time signal-to-noise ratio during target streaming media data transmission in a target network;
step S120: when the absolute value of the difference value between the real-time signal-to-noise ratio at a first current moment and the real-time signal-to-noise ratio at a previous moment of the first current moment is greater than a first preset threshold value, acquiring the transmission rate of the target streaming media data at the first current moment;
step S130: acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation;
step S140: judging whether the transmission rate of the target streaming media data at the first current moment is in an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
step S150: and when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment.
The specific embodiment process of the above method steps can refer to embodiment one, and details are not described herein.
In summary, the present application provides a method, an apparatus, an electronic device and a storage medium for controlling a streaming media transmission rate, where the method includes monitoring a real-time signal-to-noise ratio during target streaming media data transmission in a target network; when the real-time signal-to-noise ratio changes, acquiring the transmission rate of the target streaming media data at the first current moment; acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation; and when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment. Under the condition that the signal-to-noise ratio (SNR) is monitored to be changed, the transmission rate of target data is actively adjusted according to the optimal network transmission rate corresponding to the real-time SNR, and the adjustment is not required to be carried out after a receiving party finds that the data is lost or jammed, so that the timeliness and the speed of adjusting the data transmission rate are improved, and the media data transmission is more timely and smooth.
In the embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The above-described method embodiments are merely illustrative.
It should be noted that, in this document, 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 phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
Although the embodiments disclosed in the present application are described above, the descriptions are only for the convenience of understanding the present application, and are not intended to limit the present application. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims.

Claims (10)

1. A method for controlling a transmission rate of a streaming media, comprising:
monitoring a real-time signal-to-noise ratio during target streaming media data transmission in a target network;
when the absolute value of the difference value between the real-time signal-to-noise ratio at a first current moment and the real-time signal-to-noise ratio at a previous moment of the first current moment is greater than a first preset threshold value, acquiring the transmission rate of the target streaming media data at the first current moment;
acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation;
judging whether the transmission rate of the target streaming media data at the first current moment is in an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
and when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment.
2. The method of claim 1, wherein the predetermined mapping relationship is constructed by:
acquiring the optimal network transmission rate of the target network under different signal-to-noise ratios;
giving corresponding rate allowance to the optimal network transmission rate under different signal-to-noise ratios to obtain the optimal network transmission rate range under different signal-to-noise ratios;
and obtaining a mapping relation between the signal-to-noise ratio and the optimal network transmission rate range according to the optimal network transmission rate range under different signal-to-noise ratios, thereby obtaining the preset mapping relation.
3. The method of claim 2, wherein obtaining the optimal network transmission rate of the target network at different signal-to-noise ratios comprises:
monitoring a real-time signal-to-noise ratio of the target network;
when the absolute value of the difference value between the real-time signal-to-noise ratio at the second current moment and the real-time signal-to-noise ratio at the previous moment of the second current moment is greater than a second preset threshold value, acquiring the optimal network transmission rate of the target network at the second current moment to acquire the optimal network transmission rate of the target network at the real-time signal-to-noise ratio at the second current moment, so as to acquire the optimal network transmission rate of the target network at different signal-to-noise ratios.
4. The method of claim 2, wherein obtaining the optimal network transmission rate range matching the real-time snr at the first current time according to a predetermined mapping relationship comprises:
judging whether the real-time signal-to-noise ratio of the first current moment is the same as each signal-to-noise ratio in the preset mapping relation or not according to the preset mapping relation;
when the real-time signal-to-noise ratio at the first current moment is different from each signal-to-noise ratio in the preset mapping relation, arranging the signal-to-noise ratios in the preset mapping relation according to a magnitude sequence so as to correct the preset mapping relation and obtain the corrected preset mapping relation;
when the real-time signal-to-noise ratio of the first current moment is between two adjacent signal-to-noise ratios in the preset mapping relation after correction, setting a reference value between the two adjacent signal-to-noise ratios, and comparing the real-time signal-to-noise ratio of the first current moment with the reference value;
when the real-time signal-to-noise ratio at the first current moment is smaller than the reference value, taking the optimal network transmission rate range matched with the smaller of the two adjacent signal-to-noise ratios as the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
and when the real-time signal-to-noise ratio of the first current moment is greater than or equal to the reference value, taking the optimal network transmission rate range matched with the larger of the two adjacent signal-to-noise ratios as the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment.
5. The method according to claim 4, wherein when the real-time snr at the first current time is different from the snrs in the preset mapping relationship, the snrs in the preset mapping relationship are arranged according to a magnitude order to modify the preset mapping relationship, and after the step of obtaining the modified preset mapping relationship, the method further comprises:
when the real-time signal-to-noise ratio at the first current moment is smaller than the minimum signal-to-noise ratio in the preset mapping relation after correction, taking the optimal network transmission rate range matched with the minimum signal-to-noise ratio in the preset mapping relation after correction as the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
and when the real-time signal-to-noise ratio of the first current moment is greater than the maximum signal-to-noise ratio in the preset mapping relation after correction, taking the optimal network transmission rate range matched with the maximum signal-to-noise ratio in the preset mapping relation after correction as the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment.
6. The method of claim 1, wherein when the transmission rate of the target streaming media data at the first current time is out of the optimal network transmission rate range matching the real-time snr at the first current time, adjusting the transmission rate of the target streaming media data in real-time according to the optimal network transmission rate range matching the real-time snr at the first current time comprises:
when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data to any value in the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment.
7. The method of claim 1, wherein when the transmission rate of the target streaming media data at the first current time is out of the optimal network transmission rate range matching the real-time snr of the first current time, adjusting the transmission rate of the target streaming media data in real-time according to the optimal network transmission rate range matching the real-time snr of the first current time comprises the following steps:
when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment, adjusting the transmission rate of the target streaming media data in real time by adjusting the code stream rate according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
and the code stream rate is less than or equal to the transmission capacity of the target network.
8. An apparatus for controlling a transmission rate of a streaming media, comprising:
the monitoring module is used for monitoring the real-time signal-to-noise ratio when target streaming media data in a target network are transmitted;
the acquisition module is used for acquiring the transmission rate of the target streaming media data at a first current moment when the absolute value of the difference value between the real-time signal-to-noise ratio at the first current moment and the real-time signal-to-noise ratio at the previous moment of the first current moment is greater than a first preset threshold value;
the matching module is used for acquiring an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment according to a preset mapping relation;
the judging module is used for judging whether the transmission rate of the target streaming media data at the first current moment is in an optimal network transmission rate range matched with the real-time signal-to-noise ratio at the first current moment;
and the adjusting module is used for adjusting the transmission rate of the target streaming media data in real time according to the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment when the transmission rate of the target streaming media data at the first current moment is out of the optimal network transmission rate range matched with the real-time signal-to-noise ratio of the first current moment.
9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the electronic device executes the method for controlling the transmission rate of streaming media according to any one of claims 1 to 7.
10. A storage medium storing a computer program which, when executed by one or more processors, implements the method of controlling a streaming media transmission rate according to any one of claims 1 to 7.
CN202111093111.8A 2021-09-17 2021-09-17 Method and device for controlling streaming media transmission rate, electronic equipment and storage medium Active CN114157911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111093111.8A CN114157911B (en) 2021-09-17 2021-09-17 Method and device for controlling streaming media transmission rate, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111093111.8A CN114157911B (en) 2021-09-17 2021-09-17 Method and device for controlling streaming media transmission rate, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114157911A CN114157911A (en) 2022-03-08
CN114157911B true CN114157911B (en) 2022-11-22

Family

ID=80462802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111093111.8A Active CN114157911B (en) 2021-09-17 2021-09-17 Method and device for controlling streaming media transmission rate, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114157911B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334584B (en) * 2022-10-09 2023-02-28 荣耀终端有限公司 Data transmission method and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027390A (en) * 2016-05-13 2016-10-12 湖南基石通信技术有限公司 Method and device for optimizing OLSR protocol through multiple parameters

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10659514B2 (en) * 2018-03-28 2020-05-19 Arlo Technologies, Inc. System for video monitoring with adaptive bitrate to sustain image quality

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027390A (en) * 2016-05-13 2016-10-12 湖南基石通信技术有限公司 Method and device for optimizing OLSR protocol through multiple parameters

Also Published As

Publication number Publication date
CN114157911A (en) 2022-03-08

Similar Documents

Publication Publication Date Title
EP1872537B1 (en) Technique for dynamically controlling data packet transmissions
Haratcherev et al. Automatic IEEE 802.11 rate control for streaming applications
CN114157911B (en) Method and device for controlling streaming media transmission rate, electronic equipment and storage medium
US5796778A (en) Receiver circuit having adaptive equalizer with characteristics determined by signal envelope measurement and method therefor
US9325458B2 (en) Backoff adaptation for digital communication systems with channel quality information
US20050132045A1 (en) Adaptive and configurable application sharing system using manual and automatic techniques
EP3503618B1 (en) Flow control method
CN104125429A (en) Video data transmission adjusting method and device
US9219925B2 (en) Video image coded data display method, device, and communications system
EP2658167A1 (en) Transmission control method of video-stream based on dual time scale
CN106330761A (en) Congestion control method and device based on queue delay
US8817195B2 (en) Apparatus, systems and methods utilizing adjacent-channel power dependent automatic gain control for digital television demodulation
CN108449232B (en) Network speed self-adaptive control method
CN106791575A (en) The control method and equipment of a kind of data is activation
KR20170076759A (en) Optimization method and system based on throughput rate and packet loss control cwnd
CN110336680B (en) Network broadcast control method, system, electronic equipment and storage medium
CN110649913B (en) Frequency adjustment method and device for crystal oscillator, storage medium and electronic equipment
CN114143271B (en) Bandwidth estimation method and device based on congestion detection
KR100640477B1 (en) Method and apparatus for outputting audio signal dependent on digital multimedia broadcasting channel
CN112866767B (en) Screen projection control method and device, electronic equipment and storage medium
US9633556B2 (en) Adjusting acknowledgement requests for remote control transmissions based on previous acknowledgements
CN105721252B (en) Method and system for measuring data packet disorder degree
US9998189B1 (en) Adaptive device and method for wireless network
CN111953978A (en) Frame rate control method, device and storage medium
CN114302025B (en) Transmission anti-interference method, device and timing control circuit applicable to P2P signals

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
GR01 Patent grant
GR01 Patent grant