WO2023155747A1 - 数据编码码率自适应调节方法、装置、设备和存储介质 - Google Patents

数据编码码率自适应调节方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2023155747A1
WO2023155747A1 PCT/CN2023/075654 CN2023075654W WO2023155747A1 WO 2023155747 A1 WO2023155747 A1 WO 2023155747A1 CN 2023075654 W CN2023075654 W CN 2023075654W WO 2023155747 A1 WO2023155747 A1 WO 2023155747A1
Authority
WO
WIPO (PCT)
Prior art keywords
code rate
gear
state
switching
condition
Prior art date
Application number
PCT/CN2023/075654
Other languages
English (en)
French (fr)
Inventor
邱丹青
邓勇
陈胤亨
Original Assignee
百果园技术(新加坡)有限公司
邱丹青
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百果园技术(新加坡)有限公司, 邱丹青 filed Critical 百果园技术(新加坡)有限公司
Publication of WO2023155747A1 publication Critical patent/WO2023155747A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/23805Controlling the feeding rate to the network, e.g. by controlling the video pump
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2402Monitoring of the downstream path of the transmission network, e.g. bandwidth available
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44209Monitoring of downstream path of the transmission network originating from a server, e.g. bandwidth variations of a wireless network
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4621Controlling the complexity of the content stream or additional data, e.g. lowering the resolution or bit-rate of the video stream for a mobile client with a small screen

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a data coding rate adaptive adjustment method, device, device, and storage medium.
  • the data sender receives the RTCP (Real-time Control Protocol, real-time transmission control protocol) message, or receives the REMB (Receiver Estimated Max Bitrate) carrying the estimated code rate of the data receiver. ) message, the data sending end executes the corresponding code rate control algorithm to calculate the final data encoding code rate, and then encodes according to the determined code rate value through the encoder to achieve the purpose of changing the data encoding code rate.
  • this method is less flexible and highly dependent on the accuracy of the estimated bit rate value.
  • there may be misjudgment of congestion which makes the calculated target bit rate unreasonable.
  • the embodiment of the present application provides a data coding rate adaptive adjustment method, device, device and storage medium, which solves the problem of poor accuracy in determining the data coding rate in the related art, and can effectively realize the adjustment of the data coding rate. Reasonable adjustment.
  • the embodiment of the present application provides a method for adaptively adjusting the code rate of data encoding, the method comprising:
  • the code rate adjustment policy corresponding to the pre-switching state determine whether the pre-switching state satisfies the switching condition, and switch the code rate gear in response to the judgment result of satisfying the switching condition, and based on the code rate after switching
  • the code rate corresponding to the gear is used to encode and send data.
  • the embodiment of the present application also provides a data coding code rate adaptive adjustment device, including:
  • the gear pre-switching module is configured to determine whether the pre-switching condition of the code rate gear is satisfied during the data transmission process
  • the gear state switching module is configured to adjust the current code rate gear state to the pre-switching state in response to the judgment result that the pre-switching condition is satisfied;
  • the gear switching module is configured to determine whether the pre-switching state satisfies the switching condition according to the code rate adjustment strategy corresponding to the pre-switching state, and switch the code rate gear in response to the judgment result of satisfying the switching condition;
  • the code rate switching module is configured to encode and send data based on the code rate corresponding to the switched code rate gear.
  • the embodiment of the present application also provides a data coding rate adaptive adjustment device, the device includes:
  • processors one or more processors
  • the one or more processors are made to implement the method for adaptively adjusting the data coding rate described in the embodiment of the present application.
  • the embodiment of the present application also provides a storage medium storing computer-executable instructions, and the computer-executable instructions are used to execute the data encoding code rate automatic encoding described in the embodiment of the present application when executed by a computer processor.
  • Adapt adjustment method Adapt adjustment method.
  • the embodiment of the present application further provides a program for adaptive adjustment of the data encoding rate.
  • the program When the program is executed, operations related to the method for adaptive adjustment of the data encoding rate as described in the first aspect can be realized.
  • the pre-switching condition of the code rate gear in the process of data transmission, it is determined whether the pre-switching condition of the code rate gear is satisfied, and in response to the judgment result of satisfying the pre-switching condition, the current code rate gear state is adjusted to the pre-switching condition. Switch the state, and then determine whether the pre-switching state meets the switching conditions according to the code rate adjustment strategy corresponding to the pre-switching state, and switch the code rate gear in response to the judgment result of satisfying the switching condition, and based on the code rate gear after switching
  • the corresponding code rate is used to encode and send data, which can better adapt to changes in the network environment and provide users with a better audio and video service experience.
  • FIG. 1 is a flow chart of a method for adaptively adjusting a data coding code rate provided in an embodiment of the present application
  • FIG. 2 is a flow chart of another data coding rate adaptive adjustment method provided by the embodiment of the present application.
  • FIG. 3 is a flow chart of another data coding rate adaptive adjustment method provided by an embodiment of the present application.
  • FIG. 4 is a flow chart of another data coding rate adaptive adjustment method provided by the embodiment of the present application.
  • FIG. 5 is a flow chart of another data encoding code rate adaptive adjustment method provided by the embodiment of the present application.
  • FIG. 6 is a flow chart of another data coding rate adaptive adjustment method provided by the embodiment of the present application.
  • FIG. 7 is a structural block diagram of a data coding rate adaptive adjustment device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a data coding rate adaptive adjustment device provided by an embodiment of the present application.
  • Fig. 1 is a flow chart of a method for adaptively adjusting the code rate of data encoding provided by the embodiment of the present application, which can be used in the scenario where the data sending end controls the code rate of the sent data during the data transmission process, and the method can be implemented by a computing device Such as servers, smart terminals, notebooks, tablets, etc. to execute, specifically including Include the following steps:
  • Step S101 During the data transmission process, determine whether the pre-switching condition of the code rate gear is satisfied.
  • a plurality of different code rate gears are set, wherein different code rate gears correspond to different code rate values, and data encoding code rates are different under different code rate gear settings.
  • different code rate gears correspond to different code rate values
  • data encoding code rates are different under different code rate gear settings.
  • the code rate value corresponding to the high code rate gear is greater than the code rate value corresponding to the low code rate gear.
  • the code rate of the data encoding can be changed by switching between different code rate gears, and then the adaptive adjustment of the code rate gear can be realized.
  • the pre-switching condition is a set condition for whether the pre-switching of the code rate gear can be performed.
  • the pre-switching conditions include pre-upshift conditions and pre-downshift conditions.
  • meeting the pre-upshift condition indicates that the current code rate gear can be pre-upshifted
  • meeting the pre-downshift condition indicates that the current code rate gear can be pre-downshifted. If the pre-switching condition of the code rate gear is not satisfied, the code rate value corresponding to the current code rate gear will continue to be coded and sent.
  • Step S102 in response to the judging result that the pre-switching condition is met, adjusting the current code rate gear state to the pre-switching state.
  • the current code rate gear state is correspondingly adjusted to the pre-switch state, wherein the current code rate gear state may be a set code rate steady state.
  • the corresponding pre-switching state includes a code rate upshift state and a code rate downshift state. That is, in response to the judgment result of meeting the pre-upshift condition, the current code rate gear state is adjusted to the code rate upshift state; in response to the judgment result of meeting the pre-downshift condition, the current code rate gear state is adjusted to Bit rate downshift state.
  • three code rate gear states are provided, which are code rate steady state, code rate upshift state and code rate downshift state.
  • the code rate steady state is when the code rate is not adjusted during the data transmission process, the state of stable data encoding and transmission according to the determined code rate value
  • the code rate upshift state is the determined need to increase the data encoding code rate
  • the code rate downshift state is the determined state when the data encoding code rate needs to be lowered.
  • different processing logics are executed for different pre-switching states to realize adaptive adjustment of code rate.
  • Step S103 according to the code rate adjustment strategy corresponding to the pre-switching state, determine whether the pre-switching state satisfies the switching condition, and respond to the judgment result of satisfying the switching condition, perform a check on the code rate gear switch, and encode and send data based on the code rate corresponding to the switched code rate gear.
  • different pre-handover states correspond to code rate adjustment policies.
  • the code rate upshift state and the code rate downshift state correspond to the specific code rate adjustment strategy for whether the code rate gear is upshifted; the code rate downshift state corresponds to the specific execution The bit rate adjustment strategy of whether the bit rate gear is downshifted.
  • Different bit rate adjustment strategies are used to determine whether to perform the final gear switching in different pre-switching states.
  • the pre-switching state is the code rate upshift state
  • the pre-switching state is the code rate downshift state, based on the corresponding code rate adjustment strategy, it is determined whether the code rate in the downshift state The downshift condition is met, and if the downshift condition is met, the code rate gear is downshifted, and data is encoded and sent based on the code rate corresponding to the downshifted code rate gear.
  • Fig. 2 is the flow chart of another kind of data coding code rate self-adaptive adjustment method that the embodiment of the present application provides, has provided the judging process of the pre-switching condition of a kind of code rate gear, as shown in Fig. 2, comprises:
  • Step S201 during the data transmission process, acquire network congestion information, if it is determined according to the network congestion information that the network does not appear congested within a preset interval, then it is determined that the pre-upshift condition of the code rate gear is satisfied.
  • the network congestion information may be determined by the data sending end according to the received data feedback information, or may be the network congestion information calculated and generated by the bandwidth detection module.
  • the bandwidth detection module generates a network congestion information every 20 milliseconds. Congestion information. The network congestion information is used to indicate whether the network is congested. For example, if it is marked as 1, it means it is congested, and if it is marked as 0, it means it is not congested.
  • determining that the pre-upshift condition is met is specifically: if it is determined according to the network congestion information that the network does not appear congested within a preset interval, for example, the preset interval may be 5 seconds, that is, within 5 seconds If there is no network congestion within seconds, it is determined that the pre-upshift condition is met.
  • Step S202 in response to the judging result that the pre-upshift condition is satisfied, adjust the current code rate gear state to the code rate upshift state.
  • Step S203 according to the code rate adjustment strategy corresponding to the code rate upshift state, determine whether the code rate upshift state satisfies the upshift condition, and in response to the judgment result that the upshift condition is met, set the code rate downshift Bits are upshifted, and data is encoded and sent based on the code rate corresponding to the upshifted code rate gear.
  • satisfying the upshift condition at least includes: during the data transmission process, the microphone is in a non-mute state, and the current bit rate gear is not the highest gear, and the time interval from the last bit rate downshift greater than the set interval threshold.
  • the current microphone state can be obtained in real time or when determining whether the upshift condition is met, and it is in a non-mute state as one of the upshift conditions; at the same time, the current code rate gear is not the highest gear. Then it is determined that the upshift condition is not satisfied, and no upshift is performed; if the time interval from the last code rate downshift is greater than the set interval threshold, it is also determined that the upshift condition is not satisfied.
  • the interval threshold is dynamically adjusted according to whether the final upshift is successful or not. If the upshift fails, the interval threshold is increased accordingly, such as adding 2 seconds, until the upshift is successful, and the interval threshold returns to the initial setting value , or when accumulated to the maximum interval threshold, no longer increases.
  • the bit rate gear is timely increased according to the network congestion to increase the data encoding bit rate.
  • the network condition is good, it can provide data with higher definition and sound quality, and improve the user's service experience.
  • Fig. 3 is the flow chart of another kind of data coding code rate self-adaptive adjustment method that the embodiment of the present application provides, has provided the judging process of the pre-switching condition of another kind of code rate gear, as shown in Fig. 3, comprises:
  • Step S301 during the data transmission process, acquire network congestion information, and if it is determined according to the network congestion information that the network is in a congested state, it is determined that the pre-downshift condition of the code rate gear is satisfied.
  • the network congestion information may be determined by the data sending end according to the received data feedback information, or may be the network congestion information calculated and generated by the bandwidth detection module.
  • the bandwidth detection module generates a network congestion information every 20 milliseconds. Congestion information. The network congestion information is used to indicate whether the network is congested. For example, if it is marked as 1, it means it is congested, and if it is marked as 0, it means it is not congested.
  • determining that the pre-downshift condition is met is specifically: if it is determined according to the network congestion information that the network is in a congested state, then it is determined that the pre-downshift condition of the code rate gear is met, and then the code rate gear state is adjusted to It is used to reduce the data encoding rate subsequently.
  • Step S302 in response to the judgment result that the pre-downshift condition is satisfied, adjust the current code rate gear state to a code rate downshift state.
  • Step S303 according to the code rate adjustment policy corresponding to the code rate downshift state, determine whether the code rate downshift state meets the downshift condition, and in response to the judgment result that the downshift condition is met, block the code rate The bit is downshifted, and the data is encoded and sent based on the code rate corresponding to the downshifted code rate gear.
  • meeting the downshift condition includes: during the data transmission process, the microphone is in a non-mute state, and the current bit rate gear is not the lowest gear, and the time interval from the last bit rate downshift is greater than The base interval threshold to set. Wherein, if the microphone is in the mute state, or the code rate gear is the lowest gear, or the time interval from the last code rate downshift is not greater than the set basic interval threshold, it is determined that the downshift condition is not met.
  • An exemplary setting of the basic interval threshold is 5 seconds or 10 seconds.
  • bit rate gear is reduced in a timely manner according to the network congestion to reduce the data encoding bit rate.
  • a smoother audio and video experience can be provided.
  • Fig. 4 is a flow chart of another adaptive adjustment method for data encoding code rate provided by the embodiment of the present application, which provides a method for encoding and sending data based on the code rate corresponding to the code rate gear after the upshift, As shown in Figure 4, specifically include:
  • Step S401 During the data transmission process, determine whether the pre-upshift condition of the code rate gear is satisfied.
  • Step S402 in response to the judging result that the pre-upshift condition is satisfied, adjust the current code rate gear state to the code rate upshift state.
  • Step S403 according to the code rate adjustment policy corresponding to the code rate upshift state, determine whether the code rate upshift state satisfies the upshift condition.
  • Step S404 in response to the judgment result of satisfying the upshift condition, within the congestion interval threshold, add a stuffing packet for transmission, so as to satisfy the code rate corresponding to the upshifted code rate gear for data encoding and transmission.
  • the data coding rate is increased by adding padding packets for transmission.
  • the filler packet may be an original packet that has been sent or a retransmitted packet that has been retransmitted.
  • the congestion interval threshold can be, for example, 5 seconds or 10 seconds, which can be preset according to specific test conditions.
  • Step S405 if it is not detected that the network is in a congested state within the congestion interval threshold, set the gear value of the encoder so that data is encoded and sent based on the code rate corresponding to the code rate gear after the upshift.
  • the data coding rate is improved by adding padding packets for sending, If it is not detected that the network is in a congested state within the congestion interval threshold, correspondingly set the gear value of the encoder to increase the encoding bit rate of the encoder, so that the data is processed based on the code rate corresponding to the code rate gear after the upshift. code sent.
  • the exemplary addition of filling packets is correspondingly stopped.
  • the standard code rate can be set to 16k, and the standard code rate can be used as the initial code rate for data encoding and transmission during the data transmission process. Every time a code rate gear is increased, the corresponding code rate value is increased accordingly.
  • the increased code rate value can be set according to the specific number of code rate gears. When there are many bit rate gears, the increased bit rate value is relatively small, such as 4K or 8K, and when there are few bit rate gears, the increased bit rate value is relatively large, such as 16K or 32K.
  • Fig. 5 is a flow chart of another adaptive adjustment method for data encoding code rate provided by the embodiment of the present application, which provides a method for encoding and sending data based on the code rate corresponding to the downshifted code rate gear, As shown in Figure 5, specifically include:
  • Step S501 During the data transmission process, determine whether the pre-downshift condition of the code rate gear is satisfied.
  • Step S502 in response to the judgment result that the pre-downshift condition is satisfied, adjust the current code rate gear state to a code rate downshift state.
  • Step S503 according to the code rate adjustment policy corresponding to the code rate downshift state, determine whether the code rate downshift state meets the downshift condition.
  • Step S504 in response to the judgment result of satisfying the downshift condition, determine the code rate value corresponding to the code rate gear after the downshift, according to the code rate value, the set standard code rate value and the obtained estimated code rate The value determines the target bitrate value.
  • multiple different code rate gears are set, and different code rate gears correspond to different code rate values.
  • the code rate value of the downshift gear is obtained, and the target code rate value is determined according to the code rate value, the set standard code rate value and the obtained estimated code rate value.
  • the standard bit rate value of this setting takes an audio scene as an example, which may be 16K.
  • the estimated code rate value obtained can be bandwidth detection
  • the code rate value that the module predicts should be set by the encoder.
  • the process of determining the target code rate value according to the code rate value, the set standard code rate value, and the obtained estimated code rate value may be: if the code rate value is less than the set standard code rate value, then reduce the The code rate value corresponding to the code rate gear after the gear is determined as the target code rate value; if the code rate value is greater than or equal to the set standard code rate value, and the obtained estimated code rate value is less than the standard code rate value, the standard code rate value will be set to The code rate value is determined as the target code rate value; if the code rate value and the obtained estimated code rate value are both greater than or equal to the set standard code rate value, then the corresponding The code rate value is determined as the target code rate value.
  • Step S505. Perform encoding and sending of data by setting the gear position value of the encoder to the target code rate value.
  • Fig. 6 is a flow chart of another method for adaptively adjusting the code rate of data encoding provided by the embodiment of the present application, and provides a flow of a method for adaptively adjusting the code rate of data encoding, as shown in Fig. 6 , specifically including:
  • Step S601 during the data transmission process, perform data encoding and transmission according to the determined data encoding rate.
  • the determined data encoding code rate may be an initially set encoding code rate, which is an adjusted data encoding code rate after the code rate upshift processing or code rate downshift processing is performed on it.
  • Step S602 obtain network congestion information, determine whether a network congestion state occurs according to the network congestion information, and execute step S603 in response to the judgment result that the network congestion state occurs, and execute step S604 in response to the judgment result that the network congestion state does not occur.
  • Step S603 adjust the current code rate gear state to the code rate downshift state, and execute step S606.
  • Step S604 judging whether the congestion state does not occur at the preset interval time, in response to the judgment result that the congestion state does not occur at the preset interval time, execute step S605, and execute step S605 in response to the judgment result that the congestion state occurs at the preset interval time S601.
  • Step S605. Adjust the current code rate shift state to the code rate upshift state, and execute step S608.
  • Step S606 according to the code rate adjustment strategy corresponding to the code rate downshift state, determine whether the code rate downshift state meets the downshift condition, and execute step S607 in response to the judgment result that the downshift condition is met, and respond to the condition that the downshift condition is not satisfied As a result of the judgment, step S601 is executed.
  • Step S607 determine the code rate value corresponding to the code rate gear after downshifting, determine the target code rate value according to the code rate value, the set standard code rate value, and the obtained estimated code rate value, and set the encoder gear If the value is the target code rate value, the coded transmission of the data is performed, and step S601 is continued.
  • Step S608 according to the code rate adjustment strategy corresponding to the code rate upshift state, determine whether the code rate upshift state meets the upshift condition, and in response to the judgment result that the upshift condition is satisfied, step S609 is executed, and in response to the upshift condition not being satisfied As a result of the judgment, step S601 is executed.
  • Step S609 within the congestion interval threshold, add a stuffing packet for transmission, so as to satisfy the coding and transmission of data based on the code rate corresponding to the upshifted code rate gear.
  • Step S610 Determine whether the network is in a congested state within the congestion interval threshold, and execute step S601 in response to the judgment result that the network is congested, and execute step S611 in response to the judgment result that the network is not detected in a congested state.
  • Step S611 by setting the gear position value of the encoder so that data is encoded and sent based on the code rate corresponding to the code rate gear after the upshift, and continue to execute step S601 .
  • the code rate is adjusted adaptively according to the network congestion.
  • the code rate adjustment method is more efficient and reasonable, which can better adapt to changes in the network environment and provide users with better audio quality. Video service experience.
  • Fig. 7 is a structural block diagram of a data encoding code rate adaptive adjustment device provided by the embodiment of the present application.
  • the device is used to execute the data encoding code rate adaptive adjustment method provided in the above embodiment, and has corresponding functional modules and functions for executing the method. Beneficial effect.
  • the device specifically includes: a gear pre-switching module 101, a gear state switching module 102, a gear switching module 103 and a code rate switching module 104, wherein,
  • the gear pre-switching module 101 is configured to determine whether the pre-switching condition of the code rate gear is satisfied during the data transmission process
  • the gear state switching module 102 is configured to adjust the current code rate gear state to a pre-switching state in response to the judgment result that the pre-switching condition is satisfied;
  • the gear switching module 103 is configured to determine whether the pre-switching state satisfies the switching condition according to the code rate adjustment strategy corresponding to the pre-switching state, and switch the code rate gear in response to the judgment result of satisfying the switching condition ;
  • the code rate switching module 104 is configured to encode and send data based on the code rate corresponding to the switched code rate gear.
  • the current code rate gear state is adjusted to the pre-switching condition.
  • Switch the state and then determine whether the pre-switching state meets the switching conditions according to the code rate adjustment strategy corresponding to the pre-switching state, and switch the code rate gear in response to the judgment result of satisfying the switching condition, and based on the code rate gear after switching
  • the corresponding code rate is used to encode and send data, which can better adapt to changes in the network environment and provide users with a better audio and video service experience.
  • the gear pre-switching module 101 is specifically configured as:
  • the gear state switching module 102 is specifically configured as:
  • the current code rate gear state is adjusted to the code rate upshift state.
  • the gear pre-switching module 101 is specifically configured as:
  • Acquiring network congestion information if it is determined according to the network congestion information that the network does not appear congested within a preset interval, it is determined that the pre-upshift condition of the code rate gear is met.
  • the gear switching module 103 is specifically configured as:
  • the code rate adjustment strategy corresponding to the code rate upshift state determine whether the code rate upshift state satisfies the upshift condition, and in response to the judgment result of satisfying the upshift condition, upgrade the code rate gear file processing;
  • the code rate switching module 104 is specifically configured as:
  • Data is encoded and sent based on the code rate corresponding to the code rate gear after the upshift.
  • the meeting the upshift condition includes:
  • the microphone is unmuted.
  • the current bit rate gear is not the highest gear
  • the time interval from the last code rate downshift is greater than the set interval threshold.
  • the code rate switching module 104 is specifically configured as:
  • the gear value of the encoder is set so that the coded transmission of data is performed based on the code rate corresponding to the code rate gear after the upshift.
  • the gear pre-switching module 101 is specifically configured as:
  • the gear state switching module 102 is specifically configured as:
  • the current code rate gear state is adjusted to the code Rate downshift state.
  • the gear pre-switching module 101 is specifically configured as:
  • Acquiring network congestion information if it is determined according to the network congestion information that the network is in a congested state, it is determined that the pre-downshift condition of the code rate gear is met.
  • the gear switching module 103 is specifically configured as:
  • the code rate adjustment strategy corresponding to the code rate downshift state determine whether the code rate downshift state meets the downshift condition, and in response to the judgment result that the downshift condition is met, downgrade the code rate gear file processing;
  • the code rate switching module 104 is specifically configured as:
  • Data is encoded and sent based on the code rate corresponding to the downshifted code rate gear.
  • the meeting the downshift condition includes:
  • the microphone is unmuted.
  • the current bit rate gear is not the lowest gear.
  • the time interval since the last code rate downshift is greater than the set basic interval threshold.
  • the code rate switching module 104 is specifically configured as:
  • Encoding and sending of data is performed by setting the gear position value of the encoder to the target code rate value.
  • the code rate switching module 104 is specifically configured as:
  • the code rate value is less than the set standard code rate value, then the code rate value corresponding to the code rate gear after the downshift is determined as the target code rate value;
  • code rate value is greater than or equal to the set standard code rate value, and the obtained estimated code rate value is smaller than the standard code rate value, then determine the standard code rate value as the target code rate value;
  • both the code rate value and the obtained estimated code rate value are greater than or equal to the set standard code rate value, then determine the code rate value corresponding to the downshift gear closest to the estimated code rate value as the target code rate value.
  • Fig. 8 is a schematic structural diagram of a data coding rate adaptive adjustment device provided by the embodiment of the present application.
  • the device includes a processor 201, a memory 202, an input device 203 and an output device 204; the processing in the device
  • the number of processors 201 can be one or more, and one processor 201 is taken as an example in FIG. Take connection via bus as an example.
  • memory 202 as a The computer-readable storage medium can be used to store software programs, computer-executable programs and modules, such as the program instructions/modules corresponding to the method for adaptively adjusting the data coding rate in the embodiment of the present application.
  • the processor 201 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 202, that is, implements the above-mentioned method for adaptively adjusting the data coding rate.
  • the input device 203 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the device.
  • the output device 204 may include a display device such as a display screen.
  • the embodiment of the present application also provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a data coding rate adaptive adjustment method described in the above-mentioned embodiments when executed by a computer processor, specifically include:
  • the code rate adjustment policy corresponding to the pre-switching state determine whether the pre-switching state satisfies the switching condition, and switch the code rate gear in response to the judgment result of satisfying the switching condition, and based on the code rate after switching
  • the code rate corresponding to the gear is used to encode and send data.
  • the included units and modules are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized. Yes; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
  • various aspects of the method provided in this application can also be implemented in the form of a program product, which includes program code, and when the program product is run on a computer device, the program code is configured to
  • the computer device is made to execute the steps in the methods described above in this specification according to various exemplary implementations of the present application.
  • the computer device may execute the method for adaptively adjusting the data coding rate described in the embodiments of the present application.
  • the program product can be implemented using any combination of one or more readable media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Communication Control (AREA)
  • Control Of Transmission Device (AREA)

Abstract

本申请实施例提供了一种数据编码码率自适应调节方法、装置、设备和存储介质,该方法包括:在数据发送过程中,确定是否满足码率挡位的预切换条件;响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态;根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行切换,并基于切换后的码率挡位对应的码率进行数据的编码发送。本方案提供的数据编码码率的调整方式,灵活性更强,为用户提供更优的音视频服务体验。

Description

数据编码码率自适应调节方法、装置、设备和存储介质
本申请要求在2022年02月18日提交中国专利局,申请号为202210165470.8的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,尤其涉及一种数据编码码率自适应调节方法、装置、设备和存储介质。
背景技术
随着流媒体技术的发展以及智能终端设备的普及,各类基于实时音视频的数据传输场景,正成为人与人之间重要的交流方式。虽然如今4G、5G网络飞速发展,网络状况得到大幅改善,但对于实时音视频的传输而言,网络随机产生的丢包或延迟所触发的拥塞控制机制,严重影响了用户的实时性的服务体验。
相关技术中,通过丢包情况和链路时延对链路是否拥塞进行判断,再基于判断结果进行码率的相应调整。如数据发送端在接收到RTCP(Real-time Control Protocol,实时传输控制协议)报文,或是接收到携带数据接收端预估码率的REMB(Receiver Estimated Max Bitrate,接收端预估最大码率)报文时,数据发送端执行对应的码率控制算法,计算出最终的数据编码码率,之后通过编码器按照该确定出的码率值进行编码进而达到改变数据编码码率的目的。然而,该种方式灵活性较差,对预估码率值的准确性依赖较高。除此之外,对于不同的网络场景尤其是随机丢包等场景下会出现误判拥塞情况,使得计算得到的目标码率合理性差。
发明内容
本申请实施例提供了一种数据编码码率自适应调节方法、装置、设备和存储介质,解决了相关技术中确定数据编码码率准确度差的问题,可以有效的实现对数据编码码率的合理调整。
第一方面,本申请实施例提供了一种数据编码码率自适应调节方法,该方法包括:
在数据发送过程中,确定是否满足码率挡位的预切换条件;
响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态;
根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行切换,并基于切换后的码率挡位对应的码率进行数据的编码发送。
第二方面,本申请实施例还提供了一种数据编码码率自适应调节装置,包括:
挡位预切换模块,配置为在数据发送过程中,确定是否满足码率挡位的预切换条件;
挡位状态切换模块,配置为响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态;
挡位切换模块,配置为根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行切换;
码率切换模块,配置为基于切换后的码率挡位对应的码率进行数据的编码发送。
第三方面,本申请实施例还提供了一种数据编码码率自适应调节设备,该设备包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本申请实施例所述的数据编码码率自适应调节方法。
第四方面,本申请实施例还提供了一种存储计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行本申请实施例所述的数据编码码率自适应调节方法。
第五方面,本申请实施例还提供一种数据编码码率自适应调节的程序,该程序被执行时,可以实现如第一方面所述的数据编码码率自适应调节方法有关的操作。
本申请实施例中,在数据发送过程中,确定是否满足码率挡位的预切换条件,响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预 切换状态,再根据预切换状态对应的码率调整策略,确定预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对码率挡位进行切换,并基于切换后的码率挡位对应的码率进行数据的编码发送,可以更好的适应网络环境的变化,为用户提供更优的音视频服务体验。
附图说明
图1为本申请实施例提供的一种数据编码码率自适应调节方法的流程图;
图2为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图;
图3为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图;
图4为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图;
图5为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图;
图6为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图;
图7为本申请实施例提供的一种数据编码码率自适应调节装置的结构框图;
图8为本申请实施例提供的一种数据编码码率自适应调节设备的结构示意图。
具体实施方式
下面结合附图和实施例对本申请实施例作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请实施例,而非对本申请实施例的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请实施例相关的部分而非全部结构。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
图1为本申请实施例提供的一种数据编码码率自适应调节方法的流程图,可用于数据传输过程中,数据发送端对发送数据的码率进行控制的场景,该方法可以由计算设备如服务器、智能终端、笔记本、平板电脑等来执行,具体包 括如下步骤:
步骤S101、在数据发送过程中,确定是否满足码率挡位的预切换条件。
在一个实施例中,设置有多个不同的码率挡位,其中不同的码率挡位对应不同的码率值,在不同的码率挡位设置下,数据编码码率不同。示例性的,如由高到低设置多个码率挡位,高码率挡位对应的码率值大于低码率挡位对应的码率值。可通过对不同码率挡位的切换以改变数据编码码率,进而实现码率挡位的自适应调节。
在一个实施例中,在数据发送过程中,实时或每隔预设时长进行是否满足码率挡位的预切换条件的判断。或者可以由设置的触发条件触发是否满足码率挡位的预切换条件的判断。该预切换条件为设置的是否可进行码率挡位的预切换的条件。其中,针对设置有多个码率挡位的情况,该预切换的条件包括预升档条件和预降档条件。其中,满足预升档条件表征可以对当前的码率挡位进行预升档,满足预降档条件表征可以对当前的码率挡位进行预降档。如果不满足码率挡位的预切换条件,则继续保持当前的码率挡位对应的码率值进行数据的编码发送。
步骤S102、响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态。
在一个实施例中,当确定出满足预切换条件时,相应的将将当前的码率挡位状态调整为预切换状态,其中,当前的码率挡位状态可以是设置的码率稳态。可选的,以预切换条件包括预升档条件和预降档条件为例,对应的预切换状态包括码率升档态和码率降档态。即,响应于满足预升档条件的判断结果,将当前的码率挡位状态调整为码率升档态;响应于满足预降档条件的判断结果,将当前的码率挡位状态调整为码率降档态。
在一个实施例中,设置有三种码率挡位状态,分别为码率稳态、码率升档态和码率降档态。其中,码率稳态为数据发送过程中不进行码率调整时,按照确定出的码率值进行平稳的数据编码发送的状态,码率升档态为确定出的需要进行调高数据编码码率时的状态,码率降档态为确定出的需要进行调低数据编码码率时的状态。其中,针对不同的预切换状态执行不同的处理逻辑以实现码率的自适应调整。
步骤S103、根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行 切换,并基于切换后的码率挡位对应的码率进行数据的编码发送。
在一个实施例中,不同的预切换状态对应的码率调整策略。以预切换状态包括码率升档态和码率降档态为例,码率升档态对应具体的进行码率挡位是否升档的码率调整策略;码率降档态对应具体的进行码率挡位是否降档的码率调整策略。通过不同的码率调整策略以确定处于不同的预切换状态下,是否进行最终的挡位切换。
针对预切换状态为码率升档态而言,基于对应的码率调整策略确定该码率升档态下是否满足升档条件,如果满足升档条件,则对码率挡位进行升档处理,并基于升档后的码率挡位对应的码率进行数据的编码发送;针对预切换状态为码率降档态而言,基于对应的码率调整策略确定该码率降档态下是否满足降档条件,如果满足降档条件,则对码率挡位进行降档处理,并基于降档后的码率挡位对应的码率进行数据的编码发送。
由上述方案可知,在数据发送过程中,确定是否满足码率挡位的预切换条件,响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态,再根据预切换状态对应的码率调整策略,确定预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对码率挡位进行切换,并基于切换后的码率挡位对应的码率进行数据的编码发送,可以更好的适应网络环境的变化,为用户提供更优的音视频服务体验。
图2为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图,给出了一种码率挡位的预切换条件的判断过程,如图2所示,包括:
步骤S201、在数据发送过程中,获取网络拥塞信息,如果根据所述网络拥塞信息确定出网络在预设间隔时间未出现拥塞状态,则判定满足码率挡位的预升档条件。
在一个实施例中,根据获取到的网络拥塞信息确定是否满足预升档条件。可选的,该网络拥塞信息可以是数据发送端根据接收到的数据反馈信息确定,也可以是获取带宽探测模块计算生成的网络拥塞信息,示例性的,带宽探测模块每隔20毫秒生成一次网络拥塞信息,该网络拥塞信息用于指示网络是否拥塞的状态,如标识为1表示处于拥塞,标识为0表示不拥塞。
在一个实施例中,确定满足预升档条件具体为:如果根据网络拥塞信息确定出网络在预设间隔时间未出现拥塞状态,示例性的,该预设间隔时间可以是5秒,即在5秒内未出现过网络拥塞情况,则判定满足预升档条件。
步骤S202、响应于满足所述预升档条件的判断结果,将当前的码率挡位状态调整为码率升档态。
步骤S203、根据所述码率升档态对应的码率调整策略,确定所述码率升档态是否满足升档条件,响应于满足所述升档条件的判断结果,对所述码率挡位进行升档处理,并基于升档后的码率挡位对应的码率进行数据的编码发送。
在一个实施例中,满足升档条件至少包括:在数据发送过程中,麦克风处于非静音状态,同时当前的码率挡位不为最高挡位,且距离上一次进行码率降档的时间间隔大于设置的间隔阈值。其中,在数据发送过程中,可实时或者在确定是否满足升档条件时,获取当前的麦克风状态,处于非静音状态作为满足升档条件之一;同时,当前的码率挡位未最高挡位则判定不满足升档条件,不进行升档;当距离上一次进行码率降档的时间间隔若大于设置的间隔阈值,则也判定其不满足升档条件。可选的,该间隔阈值随着最终升档成功与否进行动态调整,如果升档失败,则该间隔阈值相应增加,如增加2秒,直到升档成功后,该间隔阈值恢复至初始设置值,或者在累加到最大间隔阈值时,不再增加。
由上述可知,在数据发送过程中,根据网络拥塞情况适时的进行码率挡位的提升以增加数据编码码率,在网络状况良好的情况下,可以提供更高清晰度和音质的数据,提升了用户的服务使用体验。
图3为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图,给出了另一种码率挡位的预切换条件的判断过程,如图3所示,包括:
步骤S301、在数据发送过程中,获取网络拥塞信息,如果根据所述网络拥塞信息确定出网络处于拥塞状态,则判定满足码率挡位的预降档条件。
在一个实施例中,根据获取到的网络拥塞信息确定是否满足预降档条件。可选的,该网络拥塞信息可以是数据发送端根据接收到的数据反馈信息确定,也可以是获取带宽探测模块计算生成的网络拥塞信息,示例性的,带宽探测模块每隔20毫秒生成一次网络拥塞信息,该网络拥塞信息用于指示网络是否拥塞的状态,如标识为1表示处于拥塞,标识为0表示不处于拥塞。
在一个实施例中,确定满足预降档条件具体为:如果根据网络拥塞信息确定出网络处于拥塞状态,则判定满足码率挡位的预降档条件,进而进行码率挡位状态调整,以用于后续降低数据编码码率。
步骤S302、响应于满足所述预降档条件的判断结果,将当前的码率挡位状态调整为码率降档态。
步骤S303、根据所述码率降档态对应的码率调整策略,确定所述码率降档态是否满足降档条件,响应于满足所述降档条件的判断结果,对所述码率挡位进行降档处理,并基于降档后的码率挡位对应的码率进行数据的编码发送。
在一个实施例中,满足降档条件包括:在数据发送过程中,麦克风处于非静音状态,同时当前的码率挡位不为最低挡位,且距离上一次进行码率降档的时间间隔大于设置的基础间隔阈值。其中,如果麦克风处于静音状态,或者码率挡位为最低挡位,或者距离上一次进行码率降档的时间间隔不大于设置的基础间隔阈值,则判定不满足降档条件。该基础间隔阈值示例性的设置为5秒或10秒。
由上述可知,在数据发送过程中,根据网络拥塞情况适时的进行码率挡位的降低以减少数据编码码率,在网络状况较差的情况下,可以提供较为流畅的音视频体验。
图4为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图,给出了一种基于升档后的码率挡位对应的码率进行数据的编码发送的方法,如图4所示,具体包括:
步骤S401、在数据发送过程中,确定是否满足码率挡位的预升档条件。
步骤S402、响应于满足所述预升档条件的判断结果,将当前的码率挡位状态调整为码率升档态。
步骤S403、根据所述码率升档态对应的码率调整策略,确定所述码率升档态是否满足升档条件。
步骤S404、响应于满足所述升档条件的判断结果,在拥塞间隔阈值内,添加填充包进行发送,以满足基于升档后的码率挡位对应的码率进行数据的编码发送。
在一个实施例中,在进行升档处理时,在拥塞间隔阈值内,通过添加填充包进行发送的方式以提升数据编码码率。该填充包可以是已经发送过的原始包或者进行重传过的重传包。该拥塞间隔阈值示例性的可以是5秒或10秒,其可根据具体测试情况进行预置。
步骤S405、如果在所述拥塞间隔阈值内未检测到网络处于拥塞状态,则通过设置编码器的挡位值使得基于升档后的码率挡位对应的码率进行数据的编码发送。
在一个实施例中,通过添加填充包进行发送的方式以提升数据编码码率, 在塞间隔阈值内未检测到网络处于拥塞状态,则相应的通过设置编码器的挡位值,以提高编码器的编码码率,使得基于升档后的码率挡位对应的码率进行数据的编码发送。此时,相应的停止示例性的添加填充包。以音频场景为例,可设置16k码率为标准码率,在数据发送过程中可以以该标准码率作为初始码率进行数据的编码发送。每上升一档码率挡位,其对应的码率值相应提升,在一实施例中,提升的码率值可根据具体的码率挡位数量设定。当码率挡位较多时,其提升的码率值相对较小,如4K或8K等,当码率挡位较少时,其提升的码率值相对较大,如16K或32K等。
由上述可知,在数据编码码率自适应调节过程中,当确定出需要进行升档处理时,首先在拥塞间隔阈值内,添加填充包进行发送,以满足基于升档后的码率挡位对应的码率进行数据的编码发送,如果在塞间隔阈值内未检测到网络处于拥塞状态,则通过设置编码器的挡位值使得基于升档后的码率挡位对应的码率进行数据的编码发送,避免了直接调整编码码率不能及时的提升实际发送码率,由此带来的相对较慢的挡位反馈的问题,通过添加填充包配合码率挡位的上探,以扩充发送流量到达目标流量,从而更快的获取现实网络对于该流量的拥塞反馈状况。
图5为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图,给出了一种基于降档后的码率挡位对应的码率进行数据的编码发送的方法,如图5所示,具体包括:
步骤S501、在数据发送过程中,确定是否满足码率挡位的预降档条件。
步骤S502、响应于满足所述预降档条件的判断结果,将当前的码率挡位状态调整为码率降档态。
步骤S503、根据所述码率降档态对应的码率调整策略,确定所述码率降档态是否满足降档条件。
步骤S504、响应于满足所述降档条件的判断结果,确定降档后的码率挡位对应的码率值,根据所述码率值、设置的标准码率值以及获取的预估码率值确定目标码率值。
在一个实施例中,设置有多个不同的码率挡位,不同的码率挡位对应不同的码率值。当确定降档后的,获取该降档挡位的码率值,根据该码率值、设置的标准码率值以及获取的预估码率值确定目标码率值。其中,该设置的标准码率值以音频场景为例,可以是16K。其中,获取的预估码率值可以是带宽探测 模块预测的编码器应该设置的码率值。
在一实施例中,根据码率值、设置的标准码率值以及获取的预估码率值确定目标码率值的过程可以是:如果码率值小于设置的标准码率值,则将降档后的码率挡位对应的码率值确定为目标码率值;如果码率值大于或等于设置的标准码率值,且获取的预估码率值小于标准码率值,则将标准码率值确定为目标码率值;如果码率值和获取到的预估码率值均大于或等于设置的标准码率值,则将预估码率值最接近的降档挡位对应的码率值确定为目标码率值。
步骤S505、通过设置编码器的挡位值为所述目标码率值进行数据的编码发送。
由上述可知,在数据编码码率自适应调节过程中,当确定出需要进行降档处理时,确定降档后的码率挡位对应的码率值,根据码率值、设置的标准码率值以及获取的预估码率值确定目标码率值,通过设置编码器的挡位值为目标码率值进行数据的编码发送,可以更加合理的确定降档后使用的码率值,调整效果更佳。
图6为本申请实施例提供的另一种数据编码码率自适应调节方法的流程图,给出了一种进行数据编码码率自适应调节方法的流程,如图6所示,具体包括:
步骤S601、在数据发送过程中,根据确定出的数据编码码率进行数据的编码发送。
其中,该确定出的数据编码码率可以是初始设置的编码码率,当对其进行码率升档处理或码率降档处理后,为调整后的数据编码码率。
步骤S602、获取网络拥塞信息,根据网络拥塞信息确定是否出现网络拥塞状态,响应于出现网络拥塞状态的判断结果,执行步骤S603,响应于未出现网络拥塞状态的判断结果,执行步骤S604。
步骤S603、将当前的码率挡位状态调整为码率降档态,执行步骤S606。
步骤S604、判断是否在预设间隔时间未出现拥塞状态,响应于在预设间隔时间未出现拥塞状态的判断结果,执行步骤S605,响应于在预设间隔时间出现拥塞状态的判断结果,执行步骤S601。
步骤S605、将当前的码率挡位状态调整为码率升档态,执行步骤S608。
步骤S606、根据码率降档态对应的码率调整策略,确定码率降档态是否满足降档条件,响应于满足降档条件的判断结果,执行步骤S607,响应于不满足降档条件的判断结果,执行步骤S601。
步骤S607、确定降档后的码率挡位对应的码率值,根据码率值、设置的标准码率值以及获取的预估码率值确定目标码率值,通过设置编码器的挡位值为目标码率值进行数据的编码发送,并继续执行步骤S601。
步骤S608、根据码率升档态对应的码率调整策略,确定码率升档态是否满足升档条件,响应于满足升档条件的判断结果,执行步骤S609,响应于不满足升档条件的判断结果,执行步骤S601。
步骤S609、在拥塞间隔阈值内,添加填充包进行发送,以满足基于升档后的码率挡位对应的码率进行数据的编码发送。
步骤S610、确定在拥塞间隔阈值内是否检测到网络处于拥塞状态,响应于检测到网络处于拥塞状态的判断结果,执行步骤S601,响应于未检测到网络处于拥塞状态判断结果,执行步骤S611。
步骤S611、通过设置编码器的挡位值使得基于升档后的码率挡位对应的码率进行数据的编码发送,并继续执行步骤S601。
由上述方案可知,在数据发送过程中,根据网络拥塞情况自适应的进行码率调节,码率调节方式更佳高效、合理,可以更好的适应网络环境的变化,为用户提供更优的音视频服务体验。
图7为本申请实施例提供的一种数据编码码率自适应调节装置的结构框图,该装置用于执行上述实施例提供的数据编码码率自适应调节方法,具备执行方法相应的功能模块和有益效果。如图7所示,该装置具体包括:挡位预切换模块101、挡位状态切换模块102、挡位切换模块103和码率切换模块104,其中,
挡位预切换模块101,配置为在数据发送过程中,确定是否满足码率挡位的预切换条件;
挡位状态切换模块102,配置为响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态;
挡位切换模块103,配置为根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行切换;
码率切换模块104,配置为基于切换后的码率挡位对应的码率进行数据的编码发送。
由上述方案可知,在数据发送过程中,确定是否满足码率挡位的预切换条件,响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预 切换状态,再根据预切换状态对应的码率调整策略,确定预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对码率挡位进行切换,并基于切换后的码率挡位对应的码率进行数据的编码发送,可以更好的适应网络环境的变化,为用户提供更优的音视频服务体验。
在一个可能的实施例中,所述挡位预切换模块101具体被配置为:
确定是否满足码率挡位的预升档条件;
所述挡位状态切换模块102具体被配置为:
响应于满足所述预升档条件的判断结果,将当前的码率挡位状态调整为码率升档态。
在一个可能的实施例中,所述挡位预切换模块101具体被配置为:
获取网络拥塞信息,如果根据所述网络拥塞信息确定出网络在预设间隔时间未出现拥塞状态,则判定满足码率挡位的预升档条件。
在一个可能的实施例中,所述挡位切换模块103被具体配置为:
根据所述码率升档态对应的码率调整策略,确定所述码率升档态是否满足升档条件,响应于满足所述升档条件的判断结果,对所述码率挡位进行升档处理;
所述码率切换模块104被具体配置为:
基于升档后的码率挡位对应的码率进行数据的编码发送。
在一个可能的实施例中,所述满足升档条件包括:
在数据发送过程中,麦克风处于非静音状态;和,
当前的码率挡位不为最高挡位;和,
距离上一次进行码率降档的时间间隔大于设置的间隔阈值。
在一个可能的实施例中,所述码率切换模块104被具体配置为:
在拥塞间隔阈值内,添加填充包进行发送,以满足基于升档后的码率挡位对应的码率进行数据的编码发送;
如果在所述拥塞间隔阈值内未检测到网络处于拥塞状态,则通过设置编码器的挡位值使得基于升档后的码率挡位对应的码率进行数据的编码发送。
在一个可能的实施例中,所述挡位预切换模块101被具体配置为:
确定是否满足码率挡位的预降档条件;
所述挡位状态切换模块102被具体配置为:
响应于满足所述预降档条件的判断结果,将当前的码率挡位状态调整为码 率降档态。
在一个可能的实施例中,所述挡位预切换模块101被具体配置为:
获取网络拥塞信息,如果根据所述网络拥塞信息确定出网络处于拥塞状态,则判定满足码率挡位的预降档条件。
在一个可能的实施例中,所述挡位切换模块103被具体配置为:
根据所述码率降档态对应的码率调整策略,确定所述码率降档态是否满足降档条件,响应于满足所述降档条件的判断结果,对所述码率挡位进行降档处理;
所述码率切换模块104被具体配置为:
基于降档后的码率挡位对应的码率进行数据的编码发送。
在一个可能的实施例中,所述满足降档条件包括:
在数据发送过程中,麦克风处于非静音状态;和,
当前的码率挡位不为最低挡位;和,
距离上一次进行码率降档的时间间隔大于设置的基础间隔阈值。
在一个可能的实施例中,所述码率切换模块104被具体配置为:
确定降档后的码率挡位对应的码率值;
根据所述码率值、设置的标准码率值以及获取的预估码率值确定目标码率值;
通过设置编码器的挡位值为所述目标码率值进行数据的编码发送。
在一个可能的实施例中,所述码率切换模块104被具体配置为:
如果所述码率值小于设置的标准码率值,则将降档后的码率挡位对应的码率值确定为目标码率值;
如果所述码率值大于或等于设置的标准码率值,且获取的预估码率值小于所述标准码率值,则将所述标准码率值确定为目标码率值;
如果所述码率值和获取到的预估码率值均大于或等于设置的标准码率值,则将所述预估码率值最接近的降档挡位对应的码率值确定为目标码率值。
图8为本申请实施例提供的一种数据编码码率自适应调节设备的结构示意图,如图8所示,该设备包括处理器201、存储器202、输入装置203和输出装置204;设备中处理器201的数量可以是一个或多个,图8中以一个处理器201为例;设备中的处理器201、存储器202、输入装置203和输出装置204可以通过总线或其他方式连接,图8中以通过总线连接为例。存储器202作为一种计 算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例中的数据编码码率自适应调节方法对应的程序指令/模块。处理器201通过运行存储在存储器202中的软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现上述的数据编码码率自适应调节方法。输入装置203可用于接收输入的数字或字符信息,以及产生与设备的用户设置以及功能控制有关的键信号输入。输出装置204可包括显示屏等显示设备。
本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种上述实施例描述的数据编码码率自适应调节方法,具体包括:
在数据发送过程中,确定是否满足码率挡位的预切换条件;
响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态;
根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行切换,并基于切换后的码率挡位对应的码率进行数据的编码发送。
值得注意的是,上述数据编码码率自适应调节装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请实施例的保护范围。
在一些可能的实施方式中,本申请提供的方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在计算机设备上运行时,所述程序代码配置为使所述计算机设备执行本说明书上述描述的根据本申请各种示例性实施方式的方法中的步骤,例如,所述计算机设备可以执行本申请实施例所记载的数据编码码率自适应调节方法。所述程序产品可以采用一个或多个可读介质的任意组合实现。

Claims (15)

  1. 数据编码码率自适应调节方法,其中,包括:
    在数据发送过程中,确定是否满足码率挡位的预切换条件;
    响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态;
    根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行切换,并基于切换后的码率挡位对应的码率进行数据的编码发送。
  2. 根据权利要求1所述的数据编码码率自适应调节方法,其中,所述确定是否满足码率挡位的预切换条件,包括:
    确定是否满足码率挡位的预升档条件;
    所述响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态,包括:
    响应于满足所述预升档条件的判断结果,将当前的码率挡位状态调整为码率升档态。
  3. 根据权利要求2所述的数据编码码率自适应调节方法,其中,所述确定是否满足码率挡位的预升档条件,包括:
    获取网络拥塞信息,如果根据所述网络拥塞信息确定出网络在预设间隔时间未出现拥塞状态,则判定满足码率挡位的预升档条件。
  4. 根据权利要求2所述的数据编码码率自适应调节方法,其中,所述根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行切换,并基于切换后的码率挡位对应的码率进行数据的编码发送,包括:
    根据所述码率升档态对应的码率调整策略,确定所述码率升档态是否满足升档条件,响应于满足所述升档条件的判断结果,对所述码率挡位进行升档处理,并基于升档后的码率挡位对应的码率进行数据的编码发送。
  5. 根据权利要求4所述的数据编码码率自适应调节方法,其中,所述满足升档条件包括:
    在数据发送过程中,麦克风处于非静音状态;和,
    当前的码率挡位不为最高挡位;和,
    距离上一次进行码率降档的时间间隔大于设置的间隔阈值。
  6. 根据权利要求4所述的数据编码码率自适应调节方法,其中,所述对所 述码率挡位进行升档处理,并基于升档后的码率挡位对应的码率进行数据的编码发送,包括:
    在拥塞间隔阈值内,添加填充包进行发送,以满足基于升档后的码率挡位对应的码率进行数据的编码发送;
    如果在所述拥塞间隔阈值内未检测到网络处于拥塞状态,则通过设置编码器的挡位值使得基于升档后的码率挡位对应的码率进行数据的编码发送。
  7. 根据权利要求1-6中任一项所述的数据编码码率自适应调节方法,其中,所述确定是否满足码率挡位的预切换条件,包括:
    确定是否满足码率挡位的预降档条件;
    所述响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态,包括:
    响应于满足所述预降档条件的判断结果,将当前的码率挡位状态调整为码率降档态。
  8. 根据权利要求7所述的数据编码码率自适应调节方法,其中,所述确定是否满足码率挡位的预降档条件,包括:
    获取网络拥塞信息,如果根据所述网络拥塞信息确定出网络处于拥塞状态,则判定满足码率挡位的预降档条件。
  9. 根据权利要求7所述的数据编码码率自适应调节方法,其中,所述根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行切换,并基于切换后的码率挡位对应的码率进行数据的编码发送,包括:
    根据所述码率降档态对应的码率调整策略,确定所述码率降档态是否满足降档条件,响应于满足所述降档条件的判断结果,对所述码率挡位进行降档处理,并基于降档后的码率挡位对应的码率进行数据的编码发送。
  10. 根据权利要求9所述的数据编码码率自适应调节方法,其中,所述满足降档条件包括:
    在数据发送过程中,麦克风处于非静音状态;和,
    当前的码率挡位不为最低挡位;和,
    距离上一次进行码率降档的时间间隔大于设置的基础间隔阈值。
  11. 根据权利要求9所述的数据编码码率自适应调节方法,其中,所述基于降档后的码率挡位对应的码率进行数据的编码发送,包括:
    确定降档后的码率挡位对应的码率值;
    根据所述码率值、设置的标准码率值以及获取的预估码率值确定目标码率值;
    通过设置编码器的挡位值为所述目标码率值进行数据的编码发送。
  12. 根据权利要求11所述的数据编码码率自适应调节方法,其中,所述根据所述码率值、设置的标准码率值以及获取的预估码率值确定目标码率值,包括:
    如果所述码率值小于设置的标准码率值,则将降档后的码率挡位对应的码率值确定为目标码率值;
    如果所述码率值大于或等于设置的标准码率值,且获取的预估码率值小于所述标准码率值,则将所述标准码率值确定为目标码率值;
    如果所述码率值和获取到的预估码率值均大于或等于设置的标准码率值,则将所述预估码率值最接近的降档挡位对应的码率值确定为目标码率值。
  13. 数据编码码率自适应调节装置,其中,包括:
    挡位预切换模块,配置为在数据发送过程中,确定是否满足码率挡位的预切换条件;
    挡位状态切换模块,配置为响应于满足所述预切换条件的判断结果,将当前的码率挡位状态调整为预切换状态;
    挡位切换模块,配置为根据所述预切换状态对应的码率调整策略,确定所述预切换状态是否满足切换条件,响应于满足切换条件的判断结果,对所述码率挡位进行切换;
    码率切换模块,配置为基于切换后的码率挡位对应的码率进行数据的编码发送。
  14. 一种数据编码码率自适应调节设备,所述设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-12中任一项所述的数据编码码率自适应调节方法。
  15. 一种存储计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-12中任一项所述的数据编码码率自适应调节方法。
PCT/CN2023/075654 2022-02-18 2023-02-13 数据编码码率自适应调节方法、装置、设备和存储介质 WO2023155747A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210165470.8A CN114390320B (zh) 2022-02-18 2022-02-18 数据编码码率自适应调节方法、装置、设备和存储介质
CN202210165470.8 2022-02-18

Publications (1)

Publication Number Publication Date
WO2023155747A1 true WO2023155747A1 (zh) 2023-08-24

Family

ID=81206373

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/075654 WO2023155747A1 (zh) 2022-02-18 2023-02-13 数据编码码率自适应调节方法、装置、设备和存储介质

Country Status (2)

Country Link
CN (1) CN114390320B (zh)
WO (1) WO2023155747A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114390320B (zh) * 2022-02-18 2024-02-13 百果园技术(新加坡)有限公司 数据编码码率自适应调节方法、装置、设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989880A (zh) * 2018-06-21 2018-12-11 北京邮电大学 一种码率自适应切换方法及系统
CN109600610A (zh) * 2018-11-12 2019-04-09 深圳市景阳科技股份有限公司 一种数据编码方法及终端
US20210126657A1 (en) * 2019-10-29 2021-04-29 Seagate Technology Llc Code rate adaptation
CN113301392A (zh) * 2021-05-26 2021-08-24 百果园技术(新加坡)有限公司 码率确定方法、装置、设备及存储介质
CN114390320A (zh) * 2022-02-18 2022-04-22 百果园技术(新加坡)有限公司 数据编码码率自适应调节方法、装置、设备和存储介质

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001339728A (ja) * 2000-05-29 2001-12-07 Matsushita Graphic Communication Systems Inc 画像符号化方法および符号化装置
CN102801690B (zh) * 2011-05-25 2015-09-30 华为技术有限公司 流媒体的处理方法、分发服务器、客户端及系统
CN105451075B (zh) * 2014-08-27 2018-07-03 北京大学 视频质量控制方法和装置
CN105530449B (zh) * 2014-09-30 2019-01-22 阿里巴巴集团控股有限公司 编码参数调整方法及装置
CN104580985B (zh) * 2015-01-30 2019-02-19 深圳市云之讯网络技术有限公司 视频码率自适应方法及系统
CN106357453A (zh) * 2016-09-30 2017-01-25 邦彦技术股份有限公司 一种带宽自适应控制系统及方法
CN106254875A (zh) * 2016-09-30 2016-12-21 邦彦技术股份有限公司 一种编码器及控制方法
US10602139B2 (en) * 2017-12-27 2020-03-24 Omnivision Technologies, Inc. Embedded multimedia systems with adaptive rate control for power efficient video streaming
CN110611789A (zh) * 2018-06-14 2019-12-24 杭州海康威视数字技术股份有限公司 视频流传输控制方法、装置、电子设备及存储介质
CN108833930B (zh) * 2018-06-20 2020-10-02 广州华多网络科技有限公司 直播数据传输控制方法、装置、直播设备及存储介质
CN109040801B (zh) * 2018-07-19 2019-07-09 北京达佳互联信息技术有限公司 媒体码率自适应方法、装置、计算机设备及存储介质
CN109981225B (zh) * 2019-04-12 2022-02-11 广州视源电子科技股份有限公司 一种码率预估方法、装置、设备及存储介质
CN111836079B (zh) * 2019-04-18 2022-09-02 杭州海康威视数字技术股份有限公司 一种视频码流的传输方法及装置
CN111193673B (zh) * 2020-04-10 2020-08-25 亮风台(上海)信息科技有限公司 数据传输速率控制方法、系统和用户设备
CN111669627B (zh) * 2020-06-30 2022-02-15 广州市百果园信息技术有限公司 一种视频码率的确定方法、装置、服务器和存储介质
CN112822521B (zh) * 2020-12-30 2023-04-25 百果园技术(新加坡)有限公司 音视频传输的码率控制方法、装置、设备及存储介质
CN113450808B (zh) * 2021-06-28 2024-03-15 杭州网易智企科技有限公司 音频码率确定方法、装置、存储介质及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989880A (zh) * 2018-06-21 2018-12-11 北京邮电大学 一种码率自适应切换方法及系统
CN109600610A (zh) * 2018-11-12 2019-04-09 深圳市景阳科技股份有限公司 一种数据编码方法及终端
US20210126657A1 (en) * 2019-10-29 2021-04-29 Seagate Technology Llc Code rate adaptation
CN113301392A (zh) * 2021-05-26 2021-08-24 百果园技术(新加坡)有限公司 码率确定方法、装置、设备及存储介质
CN114390320A (zh) * 2022-02-18 2022-04-22 百果园技术(新加坡)有限公司 数据编码码率自适应调节方法、装置、设备和存储介质

Also Published As

Publication number Publication date
CN114390320A (zh) 2022-04-22
CN114390320B (zh) 2024-02-13

Similar Documents

Publication Publication Date Title
US11349900B2 (en) Voice encoding and sending method and apparatus
US7167451B1 (en) User controlled audio quality for voice-over-IP telephony systems
US8964115B2 (en) Transmission capacity probing using adaptive redundancy adjustment
CN101156388B (zh) 用于控制可变位速率数据的数据包传输的产品和方法
EP1535419B1 (en) Method and devices for controlling retransmissions in data streaming
US9137530B2 (en) Video communication method and system for dynamically modifying video encoding
JP4000895B2 (ja) リアルタイム通信のためのビットレート制御方法および装置
CN101146204A (zh) 即时通信视频质量调节方法及装置
KR20060128595A (ko) 오류 정정 패킷을 이용한 전송률 제어 방법 및 이를 이용한통신 장치
JP4320024B2 (ja) 誤り訂正パケットを用いた伝送率制御方法およびそれを用いた通信装置
US8340126B2 (en) Method and apparatus for congestion control
WO2023155747A1 (zh) 数据编码码率自适应调节方法、装置、设备和存储介质
CN111741249B (zh) 一种网络拥塞检测方法及装置
CN111629210A (zh) 一种数据处理的方法、装置及电子设备
CN109392013B (zh) 一种服务质量QoS的调整方法及通信装置
CN112821992A (zh) 数据传输方法、装置、电子设备和存储介质
CN109495660B (zh) 一种音频数据的编码方法、装置、设备和存储介质
KR20060121938A (ko) 무선 VoIP의 코덱 지원 용량 확장
CN115037416A (zh) 数据前向纠错处理方法、装置、电子设备和存储介质
JPWO2019244966A1 (ja) 通信装置、通信方法及びプログラム
CN112087416A (zh) 一种双向隐蔽信道的通信方法及系统
CN101552771A (zh) 媒体网关、媒体网关控制器、多媒体电话互通方法和系统
CN106231618A (zh) 一种发送编解码重协商请求的方法及装置
KR101040780B1 (ko) 서비스 품질 향상을 위한pr―sctp 기반 실시간 멀티미디어 데이터 전송 방법
KR20060080607A (ko) 스트리밍 시스템 및 적응적 대역 할당 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23755749

Country of ref document: EP

Kind code of ref document: A1