Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiment provided by the embodiment of the application can be executed in the target terminal, the mobile terminal or the similar computing device. Taking the operation on the target terminal as an example, fig. 1 is a block diagram of a hardware structure of the target terminal of a video coding adjustment method according to an embodiment of the present application. As shown in fig. 1, the target terminal 10 may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, or the like processing means) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative, and is not intended to limit the configuration of the target terminal. For example, the target terminal 10 may also include more or fewer components than shown in fig. 1, or have a different configuration than the equivalent functions shown in fig. 1 or more than the functions shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for adjusting video encoding in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the target terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. The specific example of the network described above may include a wireless network provided by a communication provider of the target terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
Optionally, as an optional implementation manner, as shown in fig. 2, the method for adjusting video coding includes:
step S202, receiving bandwidth information fed back by a target platform through a base station, wherein the bandwidth information is used for indicating the network quality corresponding to a network between the base station and a target terminal when transmitting a target video frame, and comprises an uplink available bandwidth value of the target terminal estimated by the base station and a wireless bandwidth capacity value of the target terminal estimated by the base station;
step S204, obtaining the delay time of processing the target video frame on the target terminal and the target bandwidth of transmitting the target video frame on the target terminal;
Step S206, determining the congestion state of the network according to the bandwidth information, the delay time and the target bandwidth, and determining whether the target terminal needs to adjust the coding parameters of the target terminal according to the congestion state;
Step S208, in the case that the coding parameter needs to be adjusted, adjusting the coding parameter according to the bandwidth information and the target bandwidth, so that the adjusted coding parameter matches with the bandwidth information.
The target terminal receives bandwidth information fed back by the target platform through the base station, wherein the bandwidth information is used for indicating the network quality corresponding to the network between the base station and the target terminal when the target video frame is transmitted, the bandwidth information comprises an uplink available bandwidth value of the target terminal estimated by the base station and a wireless bandwidth capacity value of the target terminal estimated by the base station, and when the delay time of processing the target video frame on the target terminal and the target bandwidth of the target video frame transmitted on the target terminal are determined, the congestion state of the network is determined according to the bandwidth information, the delay time and the target bandwidth, and whether the target terminal needs to adjust the coding parameters of the target terminal or not is determined according to the congestion state, and when the coding parameters need to be adjusted, the target terminal adjusts the coding parameters according to the bandwidth information and the target bandwidth, so that the adjusted coding parameters of the target terminal are matched with the bandwidth information, and the target terminal can perform network congestion sensing and adjustment of the video coding parameters according to the bandwidth information fed back by the base station, and the problem of poor video playing experience is solved. And then more quick, more comprehensive perception network changes and more accurate matching network bandwidth changes, the effects of smooth video playing and low delay are realized, and the problems of lag in self-adaptive adjustment, low accuracy, poor video playing experience effect and the like in the adjustment of video coding rate in the prior art are solved.
For example, in practical application, through sensing the change of the cellular network state of each access terminal device at the base station side where the cellular network devices converge, the base station QoE (Quality of Experience, quality of experience, for characterizing the transmission quality of network, abbreviated QoE) service platform evaluates the uplink bandwidth information (including available bandwidth and wireless capacity, etc.) of each access terminal device (equivalent to the target terminal in the embodiment of the present invention) by analyzing the signal strength and control information of the base station access terminal, and feeds back the bandwidth information to the video access service cloud platform (equivalent to the target platform in the embodiment of the present invention), and the video access service informs the terminal device to perform network congestion sensing and adjustment of video coding parameters according to the bandwidth information fed back by the base station, so as to improve the problem of poor video playing experience effect. The method can obtain faster and more comprehensive perceived network change and more accurate matching network bandwidth change than the video coding self-adaptive method carried out on the terminal side, and achieves the effects of smooth video playing and low delay.
The above-mentioned ways of obtaining the target bandwidth of the target video frame sent by the target terminal in step S204 are various, and in an alternative embodiment, the method may be implemented by determining an actual sending bandwidth value corresponding to the target terminal and an encoding input bandwidth value corresponding to the target terminal, and determining a larger bandwidth value of the actual sending bandwidth value and the encoding input bandwidth value as the target bandwidth of the target video frame.
Optionally, determining the congestion state of the network according to the bandwidth information, the delay time and the target bandwidth comprises determining that the network is in a normal transmission state when the uplink available bandwidth value is larger than the target bandwidth multiplied by a value of a first coefficient and the delay time is smaller than a first preset threshold value, determining that the network is in an overload transmission state when the uplink available bandwidth value is larger than the target bandwidth multiplied by the value of the first coefficient and the delay time is larger than a second preset threshold value, wherein the first preset threshold value is smaller than the second preset threshold value, replacing the first coefficient with the second coefficient when the uplink available bandwidth value is smaller than or equal to the value of the target bandwidth multiplied by the first coefficient, and redefining the size relation between the uplink available bandwidth value and the target bandwidth and the congestion state of the network.
Optionally, the first coefficient is replaced by a second coefficient, and the size relation between the uplink available bandwidth value and the target bandwidth and the congestion state of the network are redetermined, wherein the method comprises the steps of determining that the network is in a light-load transmission state when the uplink available bandwidth value is smaller than the value of the target bandwidth multiplied by the second coefficient, determining that the network is in an overload transmission state when the uplink available bandwidth value is larger than or equal to the value of the target bandwidth multiplied by the second coefficient and the delay time is larger than a second preset threshold, and determining that the network is in the light-load transmission state when the uplink available bandwidth value is larger than or equal to the target bandwidth multiplied by the second coefficient and the delay time is smaller than or equal to the second preset threshold.
In an exemplary embodiment, determining whether the target terminal needs to adjust the coding parameters of the target terminal according to the congestion state includes determining a detection time of network detection corresponding to the congestion state, and determining that the target terminal needs to adjust the coding parameters of the target terminal if the detection time is greater than a preset adjustment period time, or determining that the target terminal needs to adjust the coding parameters of the target terminal if the congestion state satisfies that the network is in an overload state.
Optionally, when the detection time meets or the network congestion state is overload, triggering and adjusting the video coding rate, performing next period prediction target rate calculation according to the base station feedback bandwidth value after the smoothing calculation, the equipment demand bandwidth value and the network congestion state, and outputting a video coding rate control state (including rate increase and rate decrease), wherein the base station feedback bandwidth value after the smoothing calculation is the base station feedback bandwidth value of the feedback bandwidth analysis module, performing the smoothing calculation (mainly including obtaining the minimum value, the maximum value, the average value and the like of the feedback bandwidth value in a specified time range), and further discarding the part with burrs in the base station feedback bandwidth value through the smoothing calculation, so as to obtain the base station feedback bandwidth value which can be used for participating in video coding rate adjustment.
In an exemplary embodiment, in the case that the coding parameter needs to be adjusted, the coding parameter is adjusted according to the bandwidth information and the target bandwidth so that the adjusted coding parameter is matched with the bandwidth information, and the method comprises the steps of taking the smaller value of uplink available bandwidth values in the bandwidth information received by the target bandwidth and the target terminal as an uplink bandwidth measured value of the target terminal, wherein the uplink bandwidth measured value is used for indicating the bandwidth value used by the target terminal to send the target video frame again, and determining the adjustment mode of the coding parameter of the target terminal based on the uplink bandwidth measured value.
That is, in determining the current network congestion state corresponding to the target terminal, the actual transmission bandwidth of the network corresponding to the target terminal, and the uplink network bandwidth information fed back by the current base station (including the available bandwidth value and the wireless capacity value fed back by the base station), the possible network bandwidth value of the next detection period is estimated, and the size of the code stream of the target video frame in the target terminal is increased or decreased according to the bandwidth value, so as to ensure that network transmission is not congested and video is smoothly played in the next detection period, wherein the detection period is used for indicating the target terminal to perform the preset time period for adaptively adjusting the transmission video.
In an exemplary embodiment, the method for adjusting the coding parameters of the target terminal is determined based on the uplink bandwidth measurement value, and includes obtaining a network load value corresponding to the congestion state and a detection period corresponding to the network load value, determining that the network congestion state is an overload transmission state according to the network load value and the uplink bandwidth measurement value, and determining that the coding parameters are reduced by reducing the uplink bandwidth measurement value to adjust the code stream reduction of the target video frame when the detection period is equal to a first preset period, and determining that the network congestion state is a normal transmission state according to the network load value and the uplink bandwidth measurement value, and determining that the coding parameters are increased by increasing the uplink bandwidth measurement value to adjust the code stream increase of the target video frame when the detection period is equal to a second preset period, wherein the first preset period is smaller than the second preset period.
It should be noted that, the overload transmission state is that the network load value is greater than the uplink bandwidth measurement value, that is, the bandwidth corresponding to the network is insufficient during transmission, so that the network transmission efficiency is reduced, and the normal transmission state is that the network load value is less than or equal to the uplink bandwidth measurement value, that is, the bandwidth corresponding to the network is sufficient during transmission, so that the network transmission efficiency is stable.
Optionally, under the condition that the network congestion state is determined to be an overload transmission state according to the network load value and the uplink bandwidth measured value, and the detection period is equal to a first preset period, determining to reduce the coding parameter on the uplink bandwidth measured value to reduce the code stream of the target video frame, wherein the method comprises the steps of determining the percentage K of the actual transmission bandwidth value of the current network corresponding to the target terminal as a bandwidth reduction value, obtaining a first difference value between the actual transmission bandwidth value and the target actual transmission bandwidth value, wherein 0< K <50, the target actual transmission bandwidth value is the actual transmission bandwidth value of the last detection period before the current detection period, taking a smaller value of the uplink available bandwidth value and the wireless bandwidth tolerance value included in base station feedback information as a first feedback bandwidth value for code stream reduction adjustment, determining a second difference value between the first feedback bandwidth value and the target feedback bandwidth value, wherein the target feedback bandwidth value is the feedback bandwidth value of the last detection period before the current detection period, obtaining the target bandwidth value, analyzing the target bandwidth value and the feedback bandwidth value, and reducing the target bandwidth amplitude of the target video frame can be reduced by using the first difference value and the target bandwidth value as the target bandwidth value.
Optionally, selecting the maximum value of the bandwidth reduction value, the first difference value and the second difference value as the reduction amplitude of the uplink bandwidth measurement value, and reducing the coding parameter by using the reduction amplitude to adjust the code stream reduction of the target video frame, wherein the method comprises subtracting the reduction amplitude on the basis of the uplink bandwidth measurement value to obtain an adjusted first target bandwidth value, using the first target bandwidth value as a first target coding parameter of the target terminal, and using the first target coding parameter to update the historical coding parameter in the target terminal so as to reduce the code stream of the corresponding target video frame in the updated target terminal.
In an exemplary embodiment, when the network congestion state is determined to be a normal transmission state according to the network load value and the uplink bandwidth measurement and the detection period is equal to a second preset period, determining to increase on the uplink bandwidth measurement value to improve the coding parameter so as to adjust the code stream increase of the target video frame, wherein the method comprises the steps of taking the larger value of the uplink available bandwidth value of the target terminal estimated by the base station and the wireless bandwidth capacity value of the target terminal estimated by the base station, which is included in the base station feedback information, as the second feedback bandwidth value for code stream increase adjustment, multiplying the uplink bandwidth measurement value by a third coefficient and multiplying the second feedback bandwidth value by a fourth coefficient, obtaining an adjusted second target bandwidth value, taking the second target bandwidth value as a second target coding parameter of the target terminal, and updating the historical coding parameter in the target terminal by using the second target coding parameter so that the code stream of the corresponding target video frame in the updated target terminal is increased.
It can be understood that the target terminal uses the bandwidth information fed back by the base station to perform fast sensing of the bandwidth change and adjustment and estimation of the code rate of the video code stream. When network congestion or wireless channel environment is poor, the method can quickly sense the descending change of bandwidth, timely adjust video coding strategy, avoid packet loss and blocking, ensure smooth video transmission, and when the network congestion is relieved or the wireless channel environment is good, quickly sense the ascending trend of bandwidth, quantitatively instruct stream media coding to be up-regulated through available bandwidth and wireless capacity information, gradually recover code stream in a short time, and enhance video watching effect.
In order to better understand the technical solutions of the embodiments and the alternative embodiments of the present invention, the following description is given with reference to the above-mentioned flow of the video coding adjustment method by way of example, but the present invention is not limited to the technical solutions of the embodiments of the present invention.
As an alternative embodiment, a video coding adaptive system based on base station network bandwidth feedback is provided, as shown in fig. 3, which is a schematic diagram of the video coding adaptive system based on base station network bandwidth feedback according to an alternative embodiment of the present invention, including a terminal camera 32, a base station 34, and a video access service platform 36, where the terminal camera 32 includes a video coding module 42, a code stream adaptive module 44, a feedback bandwidth parsing module 46, and a communication module 48.
Specifically, the feedback bandwidth analysis module of the terminal camera extracts and smoothes bandwidth information fed back by the base station, the processed bandwidth information is used as a threshold value parameter to be input into the code stream self-adaptive module, the video coding module is guided to adjust the coding strategy to dynamically adjust the code rate of the video code stream upwards or downwards, the current network bandwidth change is matched in real time, and the effect of smooth video playing is achieved.
The overall process is that the base station QoE service platform acquires and analyzes the signal intensity and control information of the base station access terminal device in real time, acquires and predicts the bandwidth information allocated to the access terminal camera by the base station in real time, and pushes the bandwidth information to the access terminal camera in real time through the video access service platform. And the terminal camera uses bandwidth information fed back by the base station to perform quick sensing of bandwidth change and adjustment and estimation of video code stream code rate. When network congestion or wireless channel environment is poor, the method can quickly sense the descending change of bandwidth, timely adjust video coding strategy, avoid packet loss and blocking, ensure smooth video transmission, and when the network congestion is relieved or the wireless channel environment is good, quickly sense the ascending trend of bandwidth, quantitatively instruct stream media coding to be up-regulated through available bandwidth and wireless capacity information, gradually recover code stream in a short time, and enhance video watching effect.
As an optional implementation manner, a coding self-adaptive method based on base station network bandwidth feedback is provided, based on the base station network bandwidth feedback technology, an estimated value of 4G/5G uplink bandwidth resources of terminal equipment can be obtained, and a network transmission scheme for dynamically adjusting video coding according to network conditions is realized by combining a code stream self-adaptive method of a transmitting end. At the cost of losing a certain definition, the video watching of the user is ensured not to be blocked or broken, and the smooth experience of video playing is ensured.
Optionally, fig. 4 is a general service flow chart of a video coding adaptive method based on base station network bandwidth feedback according to an alternative embodiment of the present invention, including the following steps:
step 1, a streaming media application module sends a compressed video frame to a code stream self-adaptive module for flow control;
Step 2, pushing the determined video frames to be sent to the streaming media application module by the code stream self-adaptive module according to the flow control strategy;
Step 3, the streaming media application module sends the video frames into the communication module for network transmission, and video transmission is completed;
Step 4, the QoE service evaluation of the base station estimates the uplink bandwidth which can be used at the next moment of the terminal equipment according to the signal intensity and the control information of the base station access terminal equipment, and sends the push bandwidth information to the video access service platform;
Step 5, the video access service platform feeds back the bandwidth information fed back and pushed by the base station to the terminal equipment;
step 6, after receiving the bandwidth information fed back by the base station, the communication module of the terminal equipment sends the bandwidth information fed back by the base station to the feedback bandwidth analysis module;
step 7, the feedback bandwidth analysis module analyzes the corresponding uplink bandwidth feedback informing code stream self-adapting module;
step 8, the code stream self-adaptive module of the terminal equipment decides to adjust the code rate parameters of video coding according to the video delay time and the base station feedback bandwidth information extracted by the feedback bandwidth analysis module;
And 9, dynamically adjusting the size of the output video code stream by the video coding module according to the coding code rate issued by the code stream self-adaptive module, and calling back the output coded video frame to the streaming media application module.
As an optional implementation manner, according to the uplink available bandwidth value and the wireless bandwidth capacity value based on the base station network bandwidth feedback, the code stream self-adaptive module is used for network congestion judgment and video coding rate adjustment respectively in combination with the video transmission delay time of the terminal camera. Fig. 5 is a detailed process flow chart of code stream adaptation based on base station network bandwidth feedback according to an alternative embodiment of the present invention, and the specific process flow is described as follows:
Step S502, a base station feedback bandwidth value of a feedback bandwidth analysis module is obtained at fixed time and is subjected to smooth calculation (mainly comprising the steps of obtaining the minimum value, the maximum value, the average value and the like of the feedback bandwidth value in a specified time range);
step S504, obtaining video delay time of a video buffer queue every other video frame time, wherein the video delay time of the video buffer queue comprises total buffer delay time of an application layer video buffer, a streaming media module system transmission buffer and a communication module transmission buffer;
Step S506, comprehensively evaluating the network congestion state according to the video transmission delay time, the base station feedback bandwidth and the equipment demand bandwidth, and dividing the network congestion state (including network normal, network overload and network light load);
Optionally, fig. 6 is a flowchart of a network congestion sensing method according to an alternative embodiment of the present invention, where the code stream adaptive module evaluates the congestion state of the current network according to the video buffer queue video delay time, the base station feedback available bandwidth of the feedback bandwidth analysis module, the actual transmission bandwidth of the streaming media application module system network, and the information of four dimensions of the coding input of the video coding module, and combines the uplink bandwidth requirement value and the video transmission delay value under different thresholds. Specifically, the method comprises the following steps:
Step one, obtaining a video delay time delay of a video cache queue;
step two, obtaining a base station feedback available bandwidth FB1 of the feedback bandwidth analysis module of the terminal;
Step three, acquiring the actual transmission bandwidth BW1 of a streaming media application module system network and the coding input BW2 of a video coding module;
step four, acquiring BW1 and BW2 larger values as current uplink bandwidth requirement values BWN;
determining the relation between the product of the current uplink bandwidth demand BWN and the second coefficient beta and the relation between the base station feedback available bandwidth FB1 and the relation between the corresponding video delay time delay and the threshold a and the threshold b, and finally determining the display state of the corresponding network congestion state under the conditions of different bandwidths and delay time;
And step six, outputting the current network congestion state nl value.
And step S508, triggering and adjusting the video coding rate when the detection time is met or the network congestion state is overload, performing next period prediction target rate calculation according to the base station feedback bandwidth value, the equipment demand bandwidth value and the network congestion state after the smooth calculation in step S502, and outputting a video coding rate control state (comprising rate increase and rate decrease).
Optionally, according to the current network congestion state detected in fig. 4, the actual transmission bandwidth of the streaming media application module system network and the uplink network bandwidth information fed back by the current base station (including the available bandwidth value and the wireless capacity value fed back by the base station), the possible network bandwidth value in the next detection period is estimated, and the size of the code stream of the video coding module is increased or decreased according to the bandwidth value, so that no congestion exists in network transmission in the next detection period, and the video is smoothly played. Fig. 7 is a flowchart of a target code rate estimation method according to an alternative embodiment of the present invention. Specifically, the method comprises the following steps:
Step S702, obtaining a base station feedback available bandwidth FB1 and a feedback wireless capacity FB2 of a feedback bandwidth analysis module of the terminal;
step S704, obtaining the actual transmission bandwidth BW1 of a streaming media application module system network;
Step S706, obtaining BW1 and BW2 smaller values as the current upstream bandwidth requirement value BW
Step S708, obtaining a network congestion state nl value;
Step S710, judging whether an adjustment period T1 arrives or not under the condition that the value of the network congestion state Nl corresponds to nl=NL_ OVERUSE, after the adjustment period T1 arrives, obtaining the percentage k of the actual transmission bandwidth BW1 of the current network as a bandwidth reduction value detaB, (0 < k < 50), obtaining the reduction value detaB2 of the actual transmission bandwidth BW1 of the current network from the last actual transmission bandwidth, obtaining smaller values of FB1 and FB2 as feedback bandwidths FB, obtaining the reduction value detaB3 of the current base station feedback bandwidth FB from the last feedback bandwidth, selecting the larger value of detaB, detaB and detaB as the reduction amplitude detaB of the current uplink bandwidth, calculating the adjusted bandwidth value BT=BW-detaB, and notifying the video coding to reduce the code stream according to the bandwidth value BT;
Step S712, judging whether the adjustment period T2 arrives or not when the network congestion state Nl corresponds to nl=NL_NORMAL, and after the adjustment period arrives, obtaining larger values of FB1 and FB2 as feedback bandwidths FB, calculating adjusted bandwidth values BT=BW (1-p) +FB p, wherein (0 < p < 1), p is a reference coefficient, and notifying the video coding to increase the code stream according to the bandwidth values BT.
Step S714, the target code rate BT is output and the video coding adjustment action (increase, decrease) is performed.
Through the embodiment, the video coding self-adaption method and system based on the base station network bandwidth feedback are provided. The base station QoE service platform evaluates the uplink bandwidth information (including available bandwidth, wireless capacity and the like) of each access terminal device by analyzing the signal intensity and control information of the base station access terminals through sensing the network state change of the cellular network of each access terminal device at the base station side converged by the cellular network devices, and feeds the bandwidth information back to the video access service cloud platform, and the video access service informs the terminal device to adjust network congestion sensing and video coding parameters according to the bandwidth information fed back by the base station, so that the problem of poor video playing experience effect is solved. Compared with the prior art, the method has the advantages that the video coding self-adaptive method is faster and more comprehensive in sensing network change and more accurate in matching network bandwidth change, the effects of smooth video playing and low delay are achieved, the accuracy and the utilization rate are higher, and the application scene is wider.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
According to another aspect of the embodiment of the present invention, there is also provided an adjusting apparatus for video encoding for implementing the above-mentioned adjusting method for video encoding. As shown in fig. 8, the apparatus includes:
the receiving module 82 is configured to receive bandwidth information fed back by the target platform through the base station, where the bandwidth information is used to indicate a network quality corresponding to a network between the base station and the target terminal when the target video frame is transmitted, and the bandwidth information includes an uplink available bandwidth value of the target terminal estimated by the base station and a wireless bandwidth capacity value of the target terminal estimated by the base station;
An obtaining module 84, configured to obtain a delay time for processing the target video frame at the target terminal and a target bandwidth for transmitting the target video frame at the target terminal;
a determining module 86, configured to determine a congestion state of the network according to the bandwidth information, the delay time, and the target bandwidth, and determine whether the target terminal needs to adjust coding parameters of the target terminal according to the congestion state;
And the adjusting module 88 is configured to adjust the encoding parameter according to the bandwidth information and the target bandwidth, so that the adjusted encoding parameter matches with the bandwidth information, if the encoding parameter needs to be adjusted.
The target terminal receives bandwidth information fed back by the target platform through the base station, wherein the bandwidth information is used for indicating the network quality corresponding to the network between the base station and the target terminal when the target video frame is transmitted, the bandwidth information comprises an uplink available bandwidth value of the target terminal estimated by the base station and a wireless bandwidth capacity value of the target terminal estimated by the base station, and when the delay time of processing the target video frame on the target terminal and the target bandwidth of the target video frame transmitted on the target terminal are determined, the congestion state of the network is determined according to the bandwidth information, the delay time and the target bandwidth, and whether the target terminal needs to adjust the coding parameters of the target terminal or not is determined according to the congestion state, and when the coding parameters need to be adjusted, the target terminal adjusts the coding parameters according to the bandwidth information and the target bandwidth, so that the adjusted coding parameters of the target terminal are matched with the bandwidth information, and the target terminal can perform network congestion sensing and adjustment of the video coding parameters according to the bandwidth information fed back by the base station, and the problem of poor video playing experience effect is solved. And then more quick, more comprehensive perception network changes and more accurate matching network bandwidth changes, the effects of smooth video playing and low delay are realized, and the problems of lag in self-adaptive adjustment, low accuracy, poor video playing experience effect and the like in the adjustment of video coding rate in the prior art are solved.
For example, in practical application, through sensing the change of the cellular network state of each access terminal device at the base station side where the cellular network devices converge, the base station QoE (Quality of Experience, quality of experience, for characterizing the transmission quality of network, abbreviated QoE) service platform evaluates the uplink bandwidth information (including available bandwidth and wireless capacity, etc.) of each access terminal device (equivalent to the target terminal in the embodiment of the present invention) by analyzing the signal strength and control information of the base station access terminal, and feeds back the bandwidth information to the video access service cloud platform (equivalent to the target platform in the embodiment of the present invention), and the video access service informs the terminal device to perform network congestion sensing and adjustment of video coding parameters according to the bandwidth information fed back by the base station, so as to improve the problem of poor video playing experience effect. The method can obtain faster and more comprehensive perceived network change and more accurate matching network bandwidth change than the video coding self-adaptive method carried out on the terminal side, and achieves the effects of smooth video playing and low delay.
In an alternative embodiment, the obtaining module is configured to determine an actual transmission bandwidth value corresponding to the target terminal and an encoded input bandwidth value corresponding to the target terminal, and determine a larger bandwidth value of the actual transmission bandwidth value and the encoded input bandwidth value as a target bandwidth of the target video frame.
Optionally, the determining module is further configured to determine that the network is in a normal transmission state when the uplink available bandwidth value is greater than the target bandwidth multiplied by a value of the first coefficient and the delay time is less than a first preset threshold, determine that the network is in an overload transmission state when the uplink available bandwidth value is greater than the target bandwidth multiplied by the value of the first coefficient and the delay time is greater than a second preset threshold, wherein the first preset threshold is less than the second preset threshold, and replace the first coefficient with the second coefficient when the uplink available bandwidth value is less than or equal to the value of the target bandwidth multiplied by the first coefficient and redetermine a size relationship between the uplink available bandwidth value and the target bandwidth and a congestion state of the network when the uplink available bandwidth value is less than the first coefficient.
Optionally, the determining module is further configured to determine that the network is in a light-load transmission state when the uplink available bandwidth value is smaller than a value obtained by multiplying the target bandwidth by the second coefficient, determine that the network is in an overload transmission state when the uplink available bandwidth value is greater than or equal to a value obtained by multiplying the target bandwidth by the second coefficient and the delay time is greater than a second preset threshold, and determine that the network is in a light-load transmission state when the uplink available bandwidth value is greater than or equal to the target bandwidth value obtained by multiplying the second coefficient and the delay time is less than or equal to the second preset threshold.
In an exemplary embodiment, the determining module is further configured to determine a detection time of the congestion state corresponding to network detection, and determine that the target terminal needs to adjust the coding parameter of the target terminal if the detection time is greater than a preset adjustment period time, or determine that the target terminal needs to adjust the coding parameter of the target terminal if the congestion state satisfies that the network is in an overload state.
Optionally, when the detection time meets or the network congestion state is overload, triggering and adjusting the video coding rate, performing next period prediction target rate calculation according to the base station feedback bandwidth value after the smoothing calculation, the equipment demand bandwidth value and the network congestion state, and outputting a video coding rate control state (including rate increase and rate decrease), wherein the base station feedback bandwidth value after the smoothing calculation is the base station feedback bandwidth value of the feedback bandwidth analysis module, performing the smoothing calculation (mainly including obtaining the minimum value, the maximum value, the average value and the like of the feedback bandwidth value in a specified time range), and further discarding the part with burrs in the base station feedback bandwidth value through the smoothing calculation, so as to obtain the base station feedback bandwidth value which can be used for participating in video coding rate adjustment.
In an exemplary embodiment, the adjusting module is further configured to use a smaller value of uplink available bandwidth values in the target bandwidth and the bandwidth information received by the target terminal as an uplink bandwidth measurement value of the target terminal, where the uplink bandwidth measurement value is used to instruct the target terminal to send the bandwidth value used by the target video frame again, and determine an adjustment manner of the encoding parameter of the target terminal based on the uplink bandwidth measurement value.
That is, in determining the current network congestion state corresponding to the target terminal, the actual transmission bandwidth of the network corresponding to the target terminal, and the uplink network bandwidth information fed back by the current base station (including the available bandwidth value and the wireless capacity value fed back by the base station), the possible network bandwidth value of the next detection period is estimated, and the size of the code stream of the target video frame in the target terminal is increased or decreased according to the bandwidth value, so as to ensure that network transmission is not congested and video is smoothly played in the next detection period, wherein the detection period is used for indicating the target terminal to perform the preset time period for adaptively adjusting the transmission video.
In an exemplary embodiment, the adjusting module is further configured to obtain a network load value corresponding to the congestion state and a detection period corresponding to the network load value, determine that the network congestion state is an overload transmission state according to the network load value and the uplink bandwidth measurement value, determine that the uplink bandwidth measurement value is reduced to reduce the coding parameter when the detection period is equal to a first preset period to adjust the code stream reduction of the target video frame, and determine that the uplink bandwidth measurement value is increased to improve the coding parameter when the network congestion state is a normal transmission state according to the network load value and the uplink bandwidth measurement value and the detection period is equal to a second preset period to adjust the code stream increase of the target video frame when the detection period is equal to a second preset period.
Optionally, the adjustment module is further configured to determine a percentage K of an actual transmission bandwidth value of the current network corresponding to the target terminal as a bandwidth reduction value, obtain a first difference value between the actual transmission bandwidth value and a target actual transmission bandwidth value, where 0< K <50, the target actual transmission bandwidth value is an actual transmission bandwidth value of a last detection period before a current detection period, use a smaller value of an uplink available bandwidth value and a radio bandwidth capacity value included in base station feedback information as the first feedback bandwidth value for reducing adjustment of the code stream, determine a second difference value between the first feedback bandwidth value and a target feedback bandwidth value, wherein the target feedback bandwidth value is a feedback bandwidth value of a last detection period before the current detection period, and the base station feedback information is obtained by parsing the bandwidth information, and includes the uplink available bandwidth value of the target terminal estimated by the base station and the radio bandwidth capacity value of the target terminal estimated by the base station, select the bandwidth reduction value, the first difference value, the maximum value of the second difference value, and the maximum value as the uplink bandwidth value of the target terminal estimated by the base station as the radio bandwidth capacity value, and reduce the target frame amplitude by reducing the frame amplitude.
Optionally, the adjusting module is further configured to subtract the reduction amplitude from the uplink bandwidth measurement value to obtain an adjusted first target bandwidth value, use the first target bandwidth value as a first target coding parameter of the target terminal, and update the historical coding parameter in the target terminal by using the first target coding parameter, so that the code stream of the corresponding target video frame in the updated target terminal is reduced.
In an exemplary embodiment, the adjusting module is further configured to use a larger value of the uplink available bandwidth value of the target terminal estimated by the base station and the wireless bandwidth capacity value of the target terminal estimated by the base station included in the base station feedback information as the second feedback bandwidth value for the code stream increase adjustment, multiply the uplink bandwidth measurement value by a third coefficient and multiply the second feedback bandwidth value by a fourth coefficient to obtain an adjusted second target bandwidth value, use the second target bandwidth value as a second target coding parameter of the target terminal, and update the historical coding parameter in the target terminal by using the second target coding parameter, so that the code stream of the corresponding target video frame in the updated target terminal increases.
It can be understood that the target terminal uses the bandwidth information fed back by the base station to perform fast sensing of the bandwidth change and adjustment and estimation of the code rate of the video code stream. When network congestion or wireless channel environment is poor, the method can quickly sense the descending change of bandwidth, timely adjust video coding strategy, avoid packet loss and blocking, ensure smooth video transmission, and when the network congestion is relieved or the wireless channel environment is good, quickly sense the ascending trend of bandwidth, quantitatively instruct stream media coding to be up-regulated through available bandwidth and wireless capacity information, gradually recover code stream in a short time, and enhance video watching effect.
It should be noted that each of the above modules may be implemented by software or hardware, and the latter may be implemented by, but not limited to, the above modules all being located in the same processor, or each of the above modules being located in different processors in any combination.
An embodiment of the invention also provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
S1, receiving bandwidth information fed back by a target platform through a base station, wherein the bandwidth information is used for indicating network quality corresponding to a network between the base station and a target terminal when transmitting a target video frame, and comprises an uplink available bandwidth value of the target terminal estimated by the base station and a wireless bandwidth capacity value of the target terminal estimated by the base station;
s2, acquiring delay time for processing the target video frame on a target terminal and target bandwidth for transmitting the target video frame on the target terminal;
S3, determining the congestion state of the network according to the bandwidth information, the delay time and the target bandwidth, and determining whether the target terminal needs to adjust the coding parameters of the target terminal according to the congestion state;
and S4, under the condition that the coding parameters need to be adjusted, adjusting the coding parameters according to the bandwidth information and the target bandwidth so that the adjusted coding parameters are matched with the bandwidth information.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to, a USB flash disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, etc. various media in which a computer program may be stored.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic device may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, receiving bandwidth information fed back by a target platform through a base station, wherein the bandwidth information is used for indicating network quality corresponding to a network between the base station and a target terminal when transmitting a target video frame, and comprises an uplink available bandwidth value of the target terminal estimated by the base station and a wireless bandwidth capacity value of the target terminal estimated by the base station;
s2, acquiring delay time for processing the target video frame on a target terminal and target bandwidth for transmitting the target video frame on the target terminal;
S3, determining the congestion state of the network according to the bandwidth information, the delay time and the target bandwidth, and determining whether the target terminal needs to adjust the coding parameters of the target terminal according to the congestion state;
and S4, under the condition that the coding parameters need to be adjusted, adjusting the coding parameters according to the bandwidth information and the target bandwidth so that the adjusted coding parameters are matched with the bandwidth information.
Alternatively, in this embodiment, all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing the terminal device related hardware, and the program may be stored in a computer readable storage medium, where the storage medium may include a flash disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present invention.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.