Video Encoding Adjustment Method and Apparatus, Storage Medium, and Electronic Device

By receiving bandwidth information and delay time feedback from the base station, determining the network congestion status and dynamically adjusting the video encoding parameters, the problem of adaptive adjustment of video encoding code rate lag and low accuracy is solved, and the smoothness and low latency of video playback are achieved.

CN114466194BActive Publication Date: 2025-07-04ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210134128.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-14
Publication Date
2025-07-04
Estimated Expiration
2042-02-14

AI Technical Summary

Technical Problem

In the prior art, the adaptive adjustment of video encoding coding rate has lag and low accuracy, resulting in poor video playback experience. Especially when monitoring equipment dynamically connects to the cellular network on a large scale, the uplink video transmission quality is poor, and there are problems of playback lag and video missing.

Method used

By receiving bandwidth information feedback from the base station, including the uplink available bandwidth value and wireless bandwidth capacity value of the target terminal, combining the delay time and the target bandwidth, the network congestion state is determined, and the encoding parameters are adjusted according to the congestion state to match the network bandwidth information and dynamic adjustment of video encoding parameters is realized.

Benefits of technology

It realizes faster and more comprehensive network change perception, accurately matches network bandwidth changes, improves the smoothness and low latency of video playback, and improves the video playback experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114466194B_ABST
    Figure CN114466194B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and apparatus for adjusting video encoding, a storage medium, and an electronic device. The method includes: receiving bandwidth information feedback by a base station for a target platform, where the bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting a target video frame, and the bandwidth information includes: an uplink available bandwidth value of the target terminal evaluated by the base station and a wireless bandwidth capacity value of the target terminal evaluated by the base station; obtaining the delay time for processing the target video frame on the target terminal and the target bandwidth at which the target video frame is transmitted on the target terminal; determining the congestion state of the network based on the bandwidth information, the delay time, and the target bandwidth, and determining whether the target terminal needs to adjust the encoding parameters of the target terminal according to the congestion state; in the case where the encoding parameters need to be adjusted, adjusting the encoding parameters according to the bandwidth information and the target bandwidth so that the adjusted encoding parameters match the bandwidth information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to a method and apparatus for adjusting video coding, a storage medium, and an electronic device. Background Art

[0002] With the development of mobile network technologies, the use of monitoring devices supporting cellular networks has become increasingly common. When monitoring devices are used for large-scale dynamic access applications, the network bandwidth requirements vary greatly. Insufficient uplink bandwidth resources on the base station side lead to network resource competition among multiple devices, and consequently, the video transmission quality of the uplink is poor. When live previewing on a mobile phone APP or a smart home device with a screen, problems such as playback jitter and video recording omission are likely to occur. Existing technical solutions can dynamically select a matching video coding bitrate for network transmission and playback according to the current network environment status, which can improve the user's playback experience to a certain extent. However, there are problems such as lag in adaptive adjustment, low accuracy, and poor video playback experience.

[0003] In view of the problems in the prior art such as lag in adaptive adjustment, low accuracy, and poor video playback experience in adjusting the video coding bitrate, no effective solution has been proposed yet. Summary of the Invention

[0004] Embodiments of the present invention provide a method and apparatus for adjusting video coding, a storage medium, and an electronic device, so as to at least solve the problems in the prior art such as lag in adaptive adjustment, low accuracy, and poor video playback experience in adjusting the video coding bitrate.

[0005] According to one aspect of the embodiments of the present invention, a method for adjusting video coding is provided, including: receiving bandwidth information feedback by a base station from a target platform, where the bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting a target video frame, and the bandwidth information includes: an uplink available bandwidth value of the target terminal evaluated by the base station and a wireless bandwidth capacity value of the target terminal evaluated by the base station; obtaining the delay time for processing the target video frame on the target terminal and the target bandwidth at which the target video frame is sent on the target terminal; 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 in the case where 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 match the bandwidth information.

[0006] According to another aspect of the embodiments of the present invention, there is also provided a method and apparatus for adjusting video coding, including: a receiving module, configured to receive bandwidth information fed back by a base station from a target platform, where the bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting a target video frame, and the bandwidth information includes: an uplink available bandwidth value of the target terminal evaluated by the base station and a wireless bandwidth capacity value of the target terminal evaluated by the base station; an obtaining module, configured to obtain the delay time for processing the target video frame on the target terminal and the target bandwidth for transmitting the target video frame on the target terminal; a determining module, configured to determine the 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 the coding parameters of the target terminal according to the congestion state; and an adjusting module, configured to, when the coding parameters need to be adjusted, adjust the coding parameters according to the bandwidth information and the target bandwidth so that the adjusted coding parameters match the bandwidth information.

[0007] According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program, where the computer program is configured to execute the method in any one of the method embodiments when running.

[0008] According to still another aspect of the embodiments of the present invention, there is also provided an electronic device including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the method in any one of the above method embodiments through the computer program.

[0009] In an embodiment of the present invention, the target terminal receives bandwidth information fed back by the target platform through the base station. The bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting the target video frame. The bandwidth information includes the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station. When determining the delay time for processing the target video frame on the target terminal and the target bandwidth for transmitting the target video frame on the target terminal, the congestion state of the network is determined according to the bandwidth information, the delay time, and the target bandwidth, and it is determined whether the target terminal needs to adjust the encoding parameters of the target terminal according to the congestion state. When it is necessary to adjust the encoding parameters, the target terminal adjusts the encoding parameters according to the bandwidth information and the target bandwidth, so that the adjusted encoding parameters of the target terminal match the bandwidth information, enabling the target terminal to perform network congestion awareness and adjustment of video encoding parameters according to the bandwidth information fed back by the base station, and improving the problem of poor video playback experience. Furthermore, it can more quickly and comprehensively sense network changes and more accurately match network bandwidth changes, achieving smooth and low-latency video playback, and thus solving the problems in the prior art such as the lag and low accuracy of adaptive adjustment of video coding bitrates and poor video playback experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0011] Figure 1 is a hardware structure block diagram of a target terminal for a video coding adjustment method according to an embodiment of the present invention;

[0012] Figure 2 is a flowchart of a video coding adjustment method according to an embodiment of the present invention;

[0013] Figure 3 is a schematic diagram of the composition of a video coding adaptive system based on base station network bandwidth feedback according to an optional embodiment of the present invention;

[0014] Figure 4 is a general service flowchart of a video coding adaptive method based on base station network bandwidth feedback according to an optional embodiment of the present invention;

[0015] Figure 5 is a detailed processing flowchart of bitstream adaptation based on base station network bandwidth feedback according to an optional embodiment of the present invention;

[0016] Figure 6 is a flowchart of a network congestion awareness method according to an optional embodiment of the present invention;

[0017] Figure 7 A flowchart of a target bitrate estimation method according to an alternative embodiment of the present invention;

[0018] Figure 8 A schematic structural diagram of an adjustment device for video coding according to an embodiment of the present invention. Detailed implementation manners

[0019] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0020] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0021] The method embodiments provided by the embodiments of the present application can be executed on a target terminal, a mobile terminal, or a similar computing device. Taking running on a target terminal as an example, Figure 1 is a hardware structure block diagram of a target terminal of a video coding adjustment method according to an embodiment of the present invention. As Figure 1 shown, the target terminal 10 may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned target terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown in the figure is only for illustration and does not limit the structure of the above-mentioned target terminal. For example, the target terminal 10 may further include more or fewer components than those Figure 1 shown in the figure, or have the same functions as those Figure 1 shown in the figure or more functions than thoseFigure 1 Different configurations with more functions as shown.

[0022] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the video encoding adjustment method in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the target terminal 10 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.

[0023] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by the communication provider of the target terminal 10. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0024] Optionally, as an alternative implementation, as Figure 2 shown, the above video encoding adjustment method includes:

[0025] Step S202: Receive the bandwidth information fed back by the target platform through the base station, where the bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting the target video frame, and the bandwidth information includes: the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station;

[0026] Step S204: Obtain the delay time for processing the target video frame on the target terminal and the target bandwidth at which the target video frame is sent on the target terminal;

[0027] Step S206: Determine the 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 the encoding parameters of the target terminal according to the congestion state;

[0028] Step S208, in the case where the encoding parameters need to be adjusted, adjust the encoding parameters according to the bandwidth information and the target bandwidth, so that the adjusted encoding parameters match the bandwidth information.

[0029] Through the above steps, the target terminal receives the bandwidth information fed back by the target platform through the base station. The bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting the target video frame. The bandwidth information includes: the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station. And in the case of determining the delay time for processing the target video frame on the target terminal and the target bandwidth for the target video frame to be sent on the target terminal, determine the 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 the encoding parameters of the target terminal according to the congestion state; in the case where the encoding parameters need to be adjusted, the target terminal adjusts the encoding parameters according to the bandwidth information and the target bandwidth, so that the adjusted encoding parameters of the target terminal match the bandwidth information, enabling the target terminal to perform network congestion awareness and video encoding parameter adjustment according to the bandwidth information fed back by the base station, and improving the problem of poor video playback experience. Furthermore, it can perceive network changes more quickly and comprehensively and match network bandwidth changes more accurately, achieving smooth and low-latency video playback, and thus solving the problems in the prior art such as the adaptive adjustment of the video coding bit rate being lagged and inaccurate, and the poor video playback experience.

[0030] For example, in practical applications, by perceiving the changes in the cellular network status of each access terminal device on the base station side where cellular network devices converge, the base station QoE (Quality of Experience, which is used to characterize the quality of network transmission, abbreviated as 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 embodiments 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 embodiments of the present invention). The video access service notifies the terminal device to perform network congestion awareness and video encoding parameter adjustment according to the bandwidth information fed back by the base station, and improves the problem of poor video playback experience. This method can perceive network changes more quickly and comprehensively and match network bandwidth changes more accurately than the video coding adaptive method on the terminal side, achieving smooth and low-latency video playback.

[0031] There are multiple ways to obtain the target bandwidth of the target video frame sent on the target terminal in the above step S204. In an alternative embodiment, it can be achieved through the following solution: Determine the actual transmission bandwidth value corresponding to the target terminal and the encoding input bandwidth value corresponding to the target terminal; Determine the larger bandwidth value among the actual transmission bandwidth value and the encoding input bandwidth value as the target bandwidth of the target video frame.

[0032] Optionally, determine the congestion state of the network according to the bandwidth information, delay time, and target bandwidth, including: In the case where the uplink available bandwidth value is greater than the value of the target bandwidth multiplied by the first coefficient and the delay time is less than the first preset threshold, determine that the network is in a normal transmission state; In the case where the uplink available bandwidth value is greater than the value of the target bandwidth multiplied by the first coefficient and the delay time is greater than the second preset threshold, determine that the network is in an overloaded transmission state, where the first preset threshold is less than the second preset threshold; In the case where the uplink available bandwidth value is less than or equal to the value of the target bandwidth multiplied by the first coefficient, replace the first coefficient with the second coefficient, and re-determine the size relationship between the uplink available bandwidth value and the target bandwidth and the congestion state of the network, where the second coefficient is less than the first coefficient.

[0033] Optionally, replace the first coefficient with the second coefficient, and re-determine the size relationship between the uplink available bandwidth value and the target bandwidth and the congestion state of the network, including: In the case where the uplink available bandwidth value is less than the value of the target bandwidth multiplied by the second coefficient, determine that the network is in a lightly loaded transmission state; In the case where the uplink available bandwidth value is greater than or equal to the value of the target bandwidth multiplied by the second coefficient and the delay time is greater than the second preset threshold, determine that the network is in an overloaded transmission state; In the case where the uplink available bandwidth value is greater than or equal to the target bandwidth multiplied by the second coefficient and the delay time is less than or equal to the second preset threshold, determine that the network is in a lightly loaded transmission state.

[0034] In an exemplary embodiment, determine whether the target terminal needs to adjust the encoding parameters of the target terminal according to the congestion state, including: Determine the detection time of the network detection corresponding to the congestion state, and in the case where the detection time is greater than the preset adjustment cycle time, determine that the target terminal needs to adjust the encoding parameters of the target terminal; Or, in the case where the congestion state satisfies that the network is in an overloaded state, determine that the target terminal needs to adjust the encoding parameters of the target terminal.

[0035] Optionally, when the detection time is met or the network congestion state is overloaded, trigger the adjustment of the video encoding bitrate. Calculate the estimated target bitrate for the next cycle based on the smoothed base station feedback bandwidth value, device required bandwidth value, and network congestion state, and output the video encoding bitrate control state (including bitrate increase and bitrate decrease). Among them, the smoothed base station feedback bandwidth value is obtained by regularly acquiring the base station feedback bandwidth value of the feedback bandwidth analysis module and performing smoothing calculations (mainly including obtaining the minimum value, maximum value, average value, etc. of the feedback bandwidth value within a specified time range), and then discarding the part with spikes in the base station feedback bandwidth value through smoothing calculations to obtain the base station feedback bandwidth value that can be used to participate in the video encoding bitrate adjustment.

[0036] In an exemplary embodiment, when it is necessary to adjust the encoding parameters, adjust the encoding parameters according to the bandwidth information and the target bandwidth so that the adjusted encoding parameters match the bandwidth information, including: taking the smaller value of the target bandwidth and the uplink available bandwidth value in the bandwidth information received by the target terminal as the uplink bandwidth measurement value of the target terminal, where the uplink bandwidth measurement value is used to indicate the bandwidth value used by the target terminal to re-transmit the target video frame; determining the adjustment method of the encoding parameters of the target terminal based on the uplink bandwidth measurement value.

[0037] That is to say, after 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 currently fed back by the base station (including the available bandwidth value and wireless capacity value fed back by the base station), estimate the possible network bandwidth value in the next detection cycle, and increase or decrease the bitstream size of the target video frame in the target terminal based on this bandwidth value to ensure that there is no network congestion in the next detection cycle and the video can be played smoothly. The detection cycle is a preset time period used to indicate the adaptive adjustment of the target terminal for sending video.

[0038] In an exemplary embodiment, determining the adjustment method of the encoding parameters of the target terminal based on the uplink bandwidth measurement value includes: obtaining the network load value corresponding to the congestion state and the detection cycle corresponding to the network load value; when it is determined that the network congestion state is an overloaded transmission state according to the network load value and the uplink bandwidth measurement value, and the detection cycle is equal to the first preset cycle, determine to reduce on the uplink bandwidth measurement value to reduce the encoding parameters to adjust the bitstream of the target video frame to decrease; when it is determined that the network congestion state is a normal transmission state according to the network load value and the uplink bandwidth measurement value, and the detection cycle is equal to the second preset cycle, determine to increase on the uplink bandwidth measurement value to increase the encoding parameters to adjust the bitstream of the target video frame to increase, where the first preset cycle is less than the second preset cycle.

[0039] It should be noted that the above overload transmission state means that the network load value is greater than the uplink bandwidth measurement value, that is, the corresponding bandwidth during network transmission is insufficient, resulting in a slow network transmission efficiency; the above normal transmission state means that the network load value is less than or equal to the uplink bandwidth measurement value, that is, the corresponding bandwidth during network transmission is sufficient and the network transmission efficiency is stable.

[0040] Optionally, when it is determined that the network congestion state is the overload transmission state according to the network load value and the uplink bandwidth measurement value, and the detection period is equal to the first preset period, determining to reduce the uplink bandwidth measurement value to reduce the coding parameter so as to reduce the bitstream of the target video frame includes: determining the percentage K of the actual transmission bandwidth value of the current network corresponding to the target terminal as the bandwidth reduction value; obtaining the first difference between the actual transmission bandwidth value and the target actual transmission bandwidth value, where 0 < K < 50, and the target actual transmission bandwidth value is the actual transmission bandwidth value in the previous detection period before the current detection period; taking the smaller value of the uplink available bandwidth value and the wireless bandwidth capacity value included in the base station feedback information as the first feedback bandwidth value for bitstream reduction adjustment, and determining the second difference between the first feedback bandwidth value and the target feedback bandwidth value, where the target feedback bandwidth value is the feedback bandwidth value in the previous detection period before the current detection period, the base station feedback information is parsed from the bandwidth information, and the base station feedback information includes: the uplink available bandwidth value evaluated by the base station for the target terminal and the wireless bandwidth capacity value evaluated by the base station for the target terminal; selecting the maximum value among the bandwidth reduction value, the first difference, and the second difference as the reduction amplitude of the uplink bandwidth measurement value, and using the reduction amplitude to reduce the coding parameter to adjust the reduction of the bitstream of the target video frame.

[0041] Optionally, selecting the maximum value among the bandwidth reduction value, the first difference, and the second difference as the reduction amplitude of the uplink bandwidth measurement value, and using the reduction amplitude to reduce the coding parameter to adjust the reduction of the bitstream of the target video frame includes: subtracting the reduction amplitude from the uplink bandwidth measurement value to obtain the adjusted first target bandwidth value; taking the first target bandwidth value as the first target coding parameter of the target terminal; using the first target coding parameter to update the historical coding parameter in the target terminal, so that the bitstream corresponding to the target video frame in the updated target terminal is reduced.

[0042] In an exemplary embodiment, when it is determined that the network congestion state is in a normal transmission state according to the network load value and the uplink bandwidth measurement, and the detection period is equal to the second preset period, it is determined to increase the encoding parameter on the uplink bandwidth measurement value to increase the bitstream of the target video frame, including: using the larger value between the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station included in the base station feedback information as the second feedback bandwidth value for bitstream increase adjustment; adding the product of the uplink bandwidth measurement value multiplied by a third coefficient and the product of the second feedback bandwidth value multiplied by a fourth coefficient to obtain an adjusted second target bandwidth value; using the second target bandwidth value as the second target encoding parameter of the target terminal, and updating the historical encoding parameter in the target terminal with the second target encoding parameter, so that the bitstream corresponding to the target video frame in the updated target terminal increases.

[0043] It can be understood that the target terminal uses the bandwidth information fed back by the base station to quickly sense the bandwidth change and adjust and estimate the video bitstream bit rate. When network congestion occurs or the wireless channel environment deteriorates, it can quickly sense the decrease in bandwidth and timely adjust the video encoding strategy to avoid packet loss and freezing, ensuring smooth video transmission; when the network congestion is relieved or the wireless channel environment improves, it can quickly sense the upward trend of bandwidth, and through the available bandwidth and wireless capacity information, quantitatively guide the upward adjustment of streaming media encoding, gradually restoring the bitstream within a short time and enhancing the video viewing effect.

[0044] To better understand the technical solutions of the embodiments of the present invention and the optional embodiments, the following explains the process of the above video encoding adjustment method with examples, but does not limit the technical solutions of the embodiments of the present invention.

[0045] As an optional implementation manner, a video coding adaptive system based on base station network bandwidth feedback is provided. As Figure 3 shown, it is a schematic diagram of the composition of a video coding adaptive system based on base station network bandwidth feedback according to an optional embodiment of the present invention, including: a terminal camera 32, a base station 34, and a video access service platform 36. Among them, the terminal camera 32 includes a video coding module 42, a bitstream adaptive module 44, a feedback bandwidth analysis module 46, and a communication module 48.

[0046] Specifically, the feedback bandwidth analysis module of the terminal camera extracts and smooths the bandwidth information fed back by the base station, and inputs the processed bandwidth information as a threshold parameter into the bitstream adaptive module to guide the video coding module to adjust the coding strategy to dynamically increase or decrease the video bitstream bit rate, and match the current network bandwidth change in real time to achieve the effect of smooth video playback.

[0047] It should be noted that the overall process is that the base station QoE service platform obtains and analyzes the signal strength and control information of the terminal devices accessing the base station in real time, obtains and estimates the bandwidth information allocated by the base station to the accessing terminal cameras in real time, and pushes it to the accessing terminal cameras regularly through the video access service platform. The terminal camera uses the bandwidth information fed back by the base station to quickly sense the change of bandwidth and adjust and estimate the video stream bit rate. When network congestion occurs or the wireless channel environment deteriorates, it can quickly sense the decrease in bandwidth and adjust the video encoding strategy in time to avoid packet loss and freezing, ensuring smooth video transmission; when the network congestion is relieved or the wireless channel environment improves, it can quickly sense the upward trend of bandwidth, and through the available bandwidth and wireless capacity information, quantitatively guide the upward adjustment of the streaming media encoding, gradually restore the bit stream in a short time, and enhance the video viewing effect.

[0048] As an optional implementation, a coding adaptation method based on base station network bandwidth feedback is provided. Based on the base station network bandwidth feedback technology, an estimated value of the 4G / 5G uplink bandwidth resource of the terminal device can be obtained, and combined with the bit stream adaptation method at the sending end, a network transmission scheme for dynamically adjusting video encoding according to the network condition is realized. At the cost of a certain loss of clarity, it is ensured that the user does not experience freezing or disconnection when watching the video, and a smooth experience of video playback is guaranteed.

[0049] Optionally, Figure 4 FIG. is the overall service flow chart of the video coding adaptation method based on base station network bandwidth feedback according to an optional embodiment of the present invention, including the following steps:

[0050] Step 1: The streaming media application module sends the compressed video frames into the bit stream adaptation module for flow control;

[0051] Step 2: The bit stream adaptation module pushes the determined video frames to be sent to the streaming media application module according to the flow control strategy;

[0052] Step 3: The streaming media application module sends the video frames into the communication module for network transmission to complete video sending;

[0053] Step 4: The base station QoE service evaluation estimates the uplink bandwidth that the terminal device can use at the next moment according to the signal strength and control information of the terminal device accessing the base station, and sends the pushed bandwidth information to the video access service platform;

[0054] Step 5: The video access service platform feeds back the bandwidth information pushed by the base station to the terminal device;

[0055] Step 6: After the communication module of the terminal device receives the bandwidth information fed back by the base station, it sends the bandwidth information fed back by the base station to the feedback bandwidth analysis module;

[0056] Step 7: The feedback bandwidth parsing module parses the corresponding uplink bandwidth feedback and notifies the bitstream adaptation module;

[0057] Step 8: The bitstream adaptation module of the terminal device decides to adjust the video coding bitrate parameter according to the video delay time and the base station feedback bandwidth information extracted by the feedback bandwidth parsing module;

[0058] Step 9: The video coding module dynamically adjusts the size of the output video bitstream according to the coding bitrate sent by the bitstream adaptation module, and callbacks the encoded video frames to the streaming media application module.

[0059] As an optional implementation, according to the uplink available bandwidth value and the wireless bandwidth capacity value based on the base station network bandwidth feedback, combined with the video transmission delay time of the terminal camera, the bitstream adaptation module uses them for network congestion judgment and video coding bitrate adjustment respectively. Figure 5 FIG. is a detailed processing flowchart of bitstream adaptation based on base station network bandwidth feedback according to an optional embodiment of the present invention. The specific processing flow is described as follows:

[0060] Step S502: Regularly obtain the base station feedback bandwidth value of the feedback bandwidth parsing module and perform smoothing calculation (mainly including obtaining the minimum value, maximum value, average value, etc. of the feedback bandwidth value within a specified time range);

[0061] Step S504: Every other video frame time, obtain the video delay time of the video buffer queue, where the video delay time of the video buffer queue includes the total buffer delay time of the application layer video buffer, the streaming media module system sending buffer, and the communication module sending buffer;

[0062] Step S506: Comprehensively evaluate the network congestion status according to the video transmission delay time, the base station feedback bandwidth, and the device required bandwidth, and divide the network congestion status (including normal network, network overload, and network light load);

[0063] Optionally, Figure 6 FIG. is a flowchart of the network congestion awareness method according to an optional embodiment of the present invention. The bitstream adaptation module evaluates the current network congestion status according to the information of four dimensions: the video delay time of the video buffer queue, the base station feedback available bandwidth of the feedback bandwidth parsing module, the actual network sending bandwidth of the streaming media application module system, and the coding input of the video coding module. Specifically, it includes the following steps:

[0064] Step 1: Obtain the video delay time delay of the video buffer queue;

[0065] Step 2: Obtain the base station feedback available bandwidth FB1 of the feedback bandwidth parsing module of this terminal;

[0066] Step 3: Obtain the actual transmitted bandwidth BW1 of the streaming media application module system network and the encoding input BW2 of the video encoding module;

[0067] Step 4: Obtain the larger value of BW1 and BW2 as the current required uplink bandwidth value BWN;

[0068] Step 5: Determine the magnitude relationship between the product of the current required uplink bandwidth value BWN and the first coefficient α and the available bandwidth FB1 feedback by the base station, and determine the magnitude relationship between the corresponding video delay time delay and the thresholds a and b; further determine the magnitude relationship between the product of the current required uplink bandwidth value BWN and the second coefficient β and the available bandwidth FB1 feedback by the base station, so as to finally determine the display status of the corresponding network congestion state under different bandwidth and delay time conditions;

[0069] Step 6: Output the current network congestion state nl value.

[0070] Step S508: When the detection time is satisfied or the network congestion state is overloaded, trigger the adjustment of the video encoding bitrate. Calculate the estimated target bitrate for the next cycle according to the base station feedback bandwidth value, device required bandwidth value, and network congestion state smoothed in step S502, and output the video encoding bitrate control state (including bitrate increase and bitrate decrease).

[0071] Optionally, based on Figure 4 the detected current network congestion state, the actual transmitted bandwidth of the streaming media application module system network, and the current uplink network bandwidth information feedback by the base station (including the available bandwidth value and wireless capacity value feedback by the base station), estimate the possible network bandwidth value in the next detection cycle, and increase or decrease the bitstream size of the video encoding module according to this bandwidth value to ensure that there is no congestion in the network transmission in the next detection cycle and the video plays smoothly. Figure 7 is a flowchart of the target bitrate estimation method according to an optional embodiment of the present invention. Specifically, it includes the following steps:

[0072] Step S702: Obtain the available bandwidth FB1 feedback by the base station and the feedback wireless capacity FB2 of the base station feedback bandwidth analysis module of the present terminal;

[0073] Step S704: Obtain the actual transmitted bandwidth BW1 of the streaming media application module system network;

[0074] Step S706: Obtain the smaller value of BW1 and BW2 as the current required uplink bandwidth value BW

[0075] Step S708: Obtain the network congestion state nl value;

[0076] Step S710: When the network congestion status nl value corresponds to Nl = NL_OVERUSE, determine whether the adjustment period T1 has arrived. After it arrives, the corresponding adjustment method is as follows: Obtain the percentage k of the current actual network transmission bandwidth BW1 as the bandwidth reduction value detaB1 (0 < k < 50), obtain the reduction value detaB2 of the current actual network transmission bandwidth BW1 from the previous actual transmission bandwidth, obtain the smaller value of FB1 and FB2 as the feedback bandwidth FB; obtain the reduction value detaB3 of the current base station feedback bandwidth FB from the previous feedback bandwidth; select the larger value among detaB1, detaB2, and detaB3 as the reduction amplitude detaB of the current uplink bandwidth; calculate the adjusted bandwidth value BT = BW - detaB; notify the video encoding to reduce the bitstream according to the bandwidth value BT.

[0077] Step S712: When the network congestion status nl value corresponds to Nl = NL_NORMAL, determine whether the adjustment period T2 has arrived. After it arrives, the corresponding adjustment method is as follows: Obtain the larger value of FB1 and FB2 as the feedback bandwidth FB; calculate the adjusted bandwidth value BT = BW(1 - p) + FB p, where (0 < p < 1) and p is a reference coefficient; notify the video encoding to increase the bitstream according to the bandwidth value BT.

[0078] Step S714: Output the target bit rate BT and perform video encoding adjustment actions (increase, decrease).

[0079] Through the above embodiments, a video encoding adaptation method and system based on base station network bandwidth feedback are provided. By sensing the change of the cellular network status of each access terminal device on the base station side where cellular network devices converge, the base station QoE service platform evaluates the uplink bandwidth information (including available bandwidth and wireless capacity, etc.) of each access terminal device by analyzing the signal strength and control information of the base station access terminal, and feeds back this bandwidth information to the video access service cloud platform. The video access service notifies the terminal device to perform network congestion perception and adjustment of video encoding parameters according to the bandwidth information fed back by the base station, improving the problem of poor video playback experience. This method can obtain a faster and more comprehensive perception of network changes and a more accurate matching of network bandwidth changes than the video encoding adaptation method on the terminal side, achieving smooth and low-latency video playback. Compared with the existing technology, the accuracy and utilization rate are higher, making the application scenario wider.

[0080] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0081] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0082] According to another aspect of the embodiments of the present invention, there is also provided a video coding adjustment device for implementing the above video coding adjustment method. As Figure 8 shown, the device includes:

[0083] A receiving module 82, configured to receive bandwidth information fed back by a target platform through a base station, where the bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting a target video frame, and the bandwidth information includes: an uplink available bandwidth value of the target terminal evaluated by the base station and a wireless bandwidth capacity value of the target terminal evaluated by the base station;

[0084] An obtaining module 84, configured to obtain the delay time for processing the target video frame on the target terminal and the target bandwidth at which the target video frame is sent on the target terminal;

[0085] A determining module 86, configured to determine the 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 the encoding parameters of the target terminal according to the congestion state;

[0086] An adjustment module 88, configured to, when the encoding parameters need to be adjusted, adjust the encoding parameters according to the bandwidth information and the target bandwidth so that the adjusted encoding parameters match the bandwidth information.

[0087] Through the above module, the target terminal receives the bandwidth information fed back by the target platform through the base station. The bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting the target video frame. The bandwidth information includes: the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station. When determining the delay time for processing the target video frame on the target terminal and the target bandwidth for transmitting the target video frame on the target terminal, 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 encoding parameters of the target terminal is determined according to the congestion state. When the encoding parameters need to be adjusted, the target terminal adjusts the encoding parameters according to the bandwidth information and the target bandwidth, so that the adjusted encoding parameters of the target terminal match the bandwidth information, enabling the target terminal to perform network congestion perception and adjustment of video encoding parameters according to the bandwidth information fed back by the base station, and improving the problem of poor video playback experience. Furthermore, it can perceive network changes more quickly and comprehensively and match network bandwidth changes more accurately, achieving smooth and low-latency video playback, thus solving the problems in the prior art such as the adaptive adjustment of video coding bit rate being lagged and inaccurate, and the poor video playback experience.

[0088] For example, in practical applications, by perceiving the changes in the cellular network status of each access terminal device on the base station side where cellular network devices converge, the base station QoE (Quality of Experience, which is used to characterize the quality of network transmission, abbreviated as 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 embodiments 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 embodiments of the present invention). The video access service notifies the terminal device to perform network congestion perception and adjustment of video encoding parameters according to the bandwidth information fed back by the base station, improving the problem of poor video playback experience. This method can obtain a more rapid and comprehensive perception of network changes and a more accurate matching of network bandwidth changes compared to the video coding adaptive method on the terminal side, achieving smooth and low-latency video playback.

[0089] In an alternative embodiment, the above acquisition module is configured to determine the actual transmission bandwidth value corresponding to the target terminal and the encoding input bandwidth value corresponding to the target terminal; and determine the larger bandwidth value among the actual transmission bandwidth value and the encoding input bandwidth value as the target bandwidth of the target video frame.

[0090] Optionally, the above determination 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 value of the target bandwidth multiplied by the first coefficient and the delay time is less than the first preset threshold; determine that the network is in an overloaded transmission state when the uplink available bandwidth value is greater than the value of the target bandwidth multiplied by the first coefficient and the delay time is greater than the second preset threshold, where the first preset threshold is less than the second preset threshold; when the uplink available bandwidth value is less than or equal to the value of the target bandwidth multiplied by the first coefficient, replace the first coefficient with the second coefficient, and re-determine the magnitude relationship between the uplink available bandwidth value and the target bandwidth and the congestion state of the network, where the second coefficient is less than the first coefficient.

[0091] Optionally, the above determination module is further configured to determine that the network is in a lightly loaded transmission state when the uplink available bandwidth value is less than the value of the target bandwidth multiplied by the second coefficient; determine that the network is in an overloaded transmission state when the uplink available bandwidth value is greater than or equal to the value of the target bandwidth multiplied by the second coefficient and the delay time is greater than the second preset threshold; determine that the network is in a lightly loaded transmission state when the uplink available bandwidth value is greater than or equal to the target bandwidth multiplied by the second coefficient and the delay time is less than or equal to the second preset threshold.

[0092] In an exemplary embodiment, the above determination module is further configured to determine the detection time corresponding to the network detection of the congestion state, and determine that the target terminal needs to adjust the encoding parameters of the target terminal when the detection time is greater than the preset adjustment period time; or, determine that the target terminal needs to adjust the encoding parameters of the target terminal when the congestion state satisfies that the network is in an overloaded state.

[0093] Optionally, when the detection time is satisfied or the network congestion state is overloaded, trigger the adjustment of the video coding bit rate, calculate the estimated target bit rate for the next cycle according to the smoothed base station feedback bandwidth value, the device required bandwidth value and the network congestion state, and output the video coding bit rate control state (including bit rate increase and bit rate decrease), where the smoothed base station feedback bandwidth value is obtained by regularly acquiring the base station feedback bandwidth value of the feedback bandwidth parsing module and performing smoothing calculation (mainly including obtaining the minimum value, maximum value, average value, etc. of the feedback bandwidth value within a specified time range), and then discarding the part with glitches in the base station feedback bandwidth value through smoothing calculation to obtain the base station feedback bandwidth value that can be used to participate in the adjustment of the video coding bit rate.

[0094] In an exemplary embodiment, the above adjustment module is further configured to use the smaller value between the target bandwidth and the uplink available bandwidth value in the bandwidth information received by the target terminal as the uplink bandwidth measurement value of the target terminal, where the uplink bandwidth measurement value is used to indicate the bandwidth value used by the target terminal to re-transmit the target video frame; and determine an adjustment method for the encoding parameters of the target terminal based on the uplink bandwidth measurement value.

[0095] That is to say, after 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 (including the available bandwidth value and the wireless capacity value) feedback by the current base station, estimate the possible network bandwidth value in the next detection period, and increase or decrease the bitstream size of the target video frame in the target terminal according to this bandwidth value, so as to ensure that there is no congestion in the network transmission in the next detection period and the video can be played smoothly, where the detection period is a preset time period used to indicate the target terminal to perform adaptive adjustment for sending the video.

[0096] In an exemplary embodiment, the above adjustment module is further configured to obtain the network load value corresponding to the congestion state and the detection period corresponding to the network load value; when it is determined that the network congestion state is an overloaded transmission state according to the network load value and the uplink bandwidth measurement value, and the detection period is equal to the first preset period, determine to reduce the encoding parameters by reducing the uplink bandwidth measurement value to adjust the bitstream of the target video frame to decrease; when it is determined that 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 the second preset period, determine to increase the encoding parameters by increasing the uplink bandwidth measurement value to adjust the bitstream of the target video frame to increase, where the first preset period is less than the second preset period.

[0097] Optionally, the above adjustment module is further configured to determine the percentage K of the actual transmission bandwidth value of the current network corresponding to the target terminal as the bandwidth reduction value; obtain a first difference between the actual transmission bandwidth value and the target actual transmission bandwidth value, where 0 < K < 50, and the target actual transmission bandwidth value is the actual transmission bandwidth value in the previous detection period before the current detection period; use the smaller value of the uplink available bandwidth value and the wireless bandwidth capacity value included in the base station feedback information as the first feedback bandwidth value for the bitstream reduction adjustment, and determine a second difference between the first feedback bandwidth value and the target feedback bandwidth value, where the target feedback bandwidth value is the feedback bandwidth value in the previous detection period before the current detection period, the base station feedback information is parsed from the bandwidth information, and the base station feedback information includes: the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station; select the maximum value among the bandwidth reduction value, the first difference, and the second difference as the reduction amplitude of the uplink bandwidth measurement value, and use the reduction amplitude to reduce the encoding parameter to adjust the bitstream reduction of the target video frame.

[0098] Optionally, the above adjustment 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 the first target encoding parameter of the target terminal; update the historical encoding parameter in the target terminal with the first target encoding parameter, so that the bitstream of the target video frame corresponding to the updated target terminal is reduced.

[0099] In an exemplary embodiment, the above adjustment module is further configured to use the larger value of the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station included in the base station feedback information as the second feedback bandwidth value for the bitstream increase adjustment; add the product of the uplink bandwidth measurement value multiplied by a third coefficient and the product of the second feedback bandwidth value multiplied by a fourth coefficient to obtain an adjusted second target bandwidth value; use the second target bandwidth value as the second target encoding parameter of the target terminal, and update the historical encoding parameter in the target terminal with the second target encoding parameter, so that the bitstream of the target video frame corresponding to the updated target terminal is increased.

[0100] It is understandable that the target terminal utilizes the bandwidth information fed back by the base station to quickly sense the bandwidth change and adjust and estimate the video stream bit rate. When network congestion occurs or the wireless channel environment deteriorates, it can quickly sense the decrease in bandwidth, promptly adjust the video encoding strategy, avoid packet loss and stuttering, and ensure smooth video transmission; when the network congestion is relieved or the wireless channel environment improves, it can quickly sense the upward trend of bandwidth, and quantitatively guide the increase of the streaming media encoding through the available bandwidth and wireless capacity information, gradually restore the bit stream within a short period of time, and enhance the video viewing effect.

[0101] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: all the above modules are located in the same processor; or, the above-mentioned various modules are respectively located in different processors in any combination form.

[0102] An embodiment of the present invention also provides a storage medium, in which a computer program is stored. Among them, the computer program is set to execute the steps in any one of the above method embodiments when running.

[0103] Optionally, in this embodiment, the above storage medium can be set to store a computer program for executing the following steps:

[0104] S1. Receive the bandwidth information fed back by the base station through the target platform. Among them, the bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting the target video frame. The bandwidth information includes: the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station;

[0105] S2. Obtain the delay time for processing the target video frame on the target terminal and the target bandwidth at which the target video frame is sent on the target terminal;

[0106] S3. Determine the 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 the encoding parameters of the target terminal according to the congestion state;

[0107] S4. In the case where the encoding parameters need to be adjusted, adjust the encoding parameters according to the bandwidth information and the target bandwidth so that the adjusted encoding parameters match the bandwidth information.

[0108] Optionally, in this embodiment, the above storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM), random access memories (RAM), mobile hard disks, magnetic disks, or optical discs that can store computer programs.

[0109] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated herein.

[0110] An embodiment of the present invention further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0111] Optionally, the above electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.

[0112] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:

[0113] S1. Receive the bandwidth information fed back by the base station from the target platform, where the bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting the target video frame, and the bandwidth information includes: the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station;

[0114] S2. Obtain the delay time for processing the target video frame on the target terminal and the target bandwidth at which the target video frame is sent on the target terminal;

[0115] S3. Determine the 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 the encoding parameters of the target terminal according to the congestion state;

[0116] S4. In the case where the encoding parameters need to be adjusted, adjust the encoding parameters according to the bandwidth information and the target bandwidth so that the adjusted encoding parameters match the bandwidth information.

[0117] Optionally, in this embodiment, those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware of the terminal device through a program. This program can be stored in a computer-readable storage medium, and the storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, etc.

[0118] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0119] If the integrated unit in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing one or more computer devices (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0120] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.

[0122] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0123] In addition, in each embodiment of the present invention, each functional unit can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0124] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A method for adjusting video coding, characterized in that, Including: Receiving bandwidth information fed back by a base station for a target platform, where the bandwidth information is used to indicate the network quality corresponding to the network between the base station and a target terminal when transmitting a target video frame, and the bandwidth information includes: an uplink available bandwidth value of the target terminal evaluated by the base station and a wireless bandwidth capacity value of the target terminal evaluated by the base station; Obtaining a latency time for processing the target video frame on the target terminal and a target bandwidth at which the target video frame is sent on the target terminal; Determining a congestion state of the network according to the bandwidth information, the latency time, and the target bandwidth, and determining whether the target terminal needs to adjust encoding parameters of the target terminal according to the congestion state; When the encoding parameters need to be adjusted, adjusting the encoding parameters according to the bandwidth information and the target bandwidth so that the adjusted encoding parameters match the bandwidth information; Wherein, determining the congestion state of the network according to the bandwidth information, the latency time, and the target bandwidth includes: when the uplink available bandwidth value is greater than a value obtained by multiplying the target bandwidth by a first coefficient and the latency time is less than a first preset threshold, determining that the network is in a normal transmission state; When the uplink available bandwidth value is greater than a value obtained by multiplying the target bandwidth by the first coefficient and the latency time is greater than a second preset threshold, determining that the network is in an overloaded transmission state, where the first preset threshold is less than the second preset threshold; When the uplink available bandwidth value is less than or equal to the value obtained by multiplying the target bandwidth by the first coefficient, replacing the first coefficient with a second coefficient, and re-determining the magnitude relationship between the uplink available bandwidth value and the target bandwidth and the congestion state of the network, where the second coefficient is less than the first coefficient.

2. The method according to claim 1, characterized in that, Obtaining the target bandwidth at which the target video frame is sent on the target terminal includes: Determining an actual transmission bandwidth value corresponding to the target terminal and an encoding input bandwidth value corresponding to the target terminal; Determining the larger bandwidth value of the actual transmission bandwidth value and the encoding input bandwidth value as the target bandwidth of the target video frame.

3. The method according to claim 1, wherein Replacing the first coefficient with the second coefficient and re-determining the magnitude relationship between the uplink available bandwidth value and the target bandwidth and the congestion state of the network includes: When the uplink available bandwidth value is less than a value obtained by multiplying the target bandwidth by the second coefficient, determining that the network is in a lightly loaded 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 latency time is greater than the second preset threshold, determining that the network is in an overloaded transmission state; When the uplink available bandwidth value is greater than or equal to the value obtained by multiplying the target bandwidth by the second coefficient and the latency time is less than or equal to the second preset threshold, determining that the network is in a lightly loaded transmission state.

4. The method according to claim 1, characterized in that Determining whether the target terminal needs to adjust the encoding parameters of the target terminal according to the congestion state includes: Determine the detection time of the network detection corresponding to the congestion state, and when the detection time is greater than the preset adjustment period time, determine that the target terminal needs to adjust the encoding parameters of the target terminal; Or, when the congestion state satisfies that the network is in an overloaded state, determine that the target terminal needs to adjust the encoding parameters of the target terminal.

5. The method according to claim 1, wherein When the encoding parameters need to be adjusted, adjust the encoding parameters according to the bandwidth information and the target bandwidth so that the adjusted encoding parameters match the bandwidth information, including: Take the smaller value of the target bandwidth and the uplink available bandwidth value in the bandwidth information received by the target terminal as the uplink bandwidth measurement value of the target terminal, where the uplink bandwidth measurement value is used to indicate the bandwidth value used by the target terminal to resend the target video frame; Determine the adjustment method of the encoding parameters of the target terminal based on the uplink bandwidth measurement value.

6. The method according to claim 5, characterized in that, Determine the adjustment method of the encoding parameters of the target terminal based on the uplink bandwidth measurement value, including: Obtain the network load value corresponding to the congestion state and the detection period corresponding to the network load value; When it is determined that the network congestion state is an overloaded transmission state according to the network load value and the uplink bandwidth measurement value, and the detection period is equal to the first preset period, determine to reduce the encoding parameters by reducing on the uplink bandwidth measurement value to adjust the reduction of the code stream of the target video frame; When it is determined that 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 the second preset period, determine to increase the encoding parameters by increasing on the uplink bandwidth measurement value to adjust the increase of the code stream of the target video frame, where the first preset period is less than the second preset period.

7. The method according to claim 6, characterized in that, When it is determined that the network congestion state is an overloaded transmission state according to the network load value and the uplink bandwidth measurement value, and the detection period is equal to the first preset period, determine to reduce the encoding parameters by reducing on the uplink bandwidth measurement value to reduce the code stream of the target video frame, including: Determine the percentage K of the actual transmission bandwidth value of the current network corresponding to the target terminal as the bandwidth reduction value; Obtain the first difference between the actual transmission bandwidth value and the target actual transmission bandwidth value, where 0 < K < 50, and the target actual transmission bandwidth value is the actual transmission bandwidth value in the previous detection period before the current detection period; Take the smaller value of the uplink available bandwidth value and the wireless bandwidth capacity value included in the base station feedback information as the first feedback bandwidth value for the code stream reduction adjustment, and determine the second difference between the first feedback bandwidth value and the target feedback bandwidth value, where the target feedback bandwidth value is the feedback bandwidth value in the previous detection period before the current detection period, the base station feedback information is parsed from the bandwidth information, and the base station feedback information includes: the uplink available bandwidth value evaluated by the base station for the target terminal and the wireless bandwidth capacity value evaluated by the base station for the target terminal; Select the maximum value among the bandwidth reduction value, the first difference, and the second difference as the reduction amplitude of the uplink bandwidth measurement value, and use the reduction amplitude to reduce the coding parameter to adjust the reduction of the code stream of the target video frame.

8. The method according to claim 7, wherein Select the maximum value among the bandwidth reduction value, the first difference, and the second difference as the reduction amplitude of the uplink bandwidth measurement value, and use the reduction amplitude to reduce the coding parameter to adjust the reduction of the code stream of the target video frame, including: 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 the first target coding parameter of the target terminal; Use the first target coding parameter to update the historical coding parameter in the target terminal, so that the code stream corresponding to the target video frame in the updated target terminal is reduced.

9. The method according to claim 6, characterized in that, When it is determined that the network congestion state is a normal transmission state according to the network load value and the uplink bandwidth measurement, and the detection period is equal to the second preset period, it is determined to increase the uplink bandwidth measurement value to increase the coding parameter to adjust the increase of the code stream of the target video frame, including: Use the larger value among the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station included in the base station feedback information as the second feedback bandwidth value for the code stream increase adjustment; Add the product of the uplink bandwidth measurement value multiplied by a third coefficient and the product of the second feedback bandwidth value multiplied by a fourth coefficient to obtain an adjusted second target bandwidth value; Use the second target bandwidth value as the second target coding parameter of the target terminal, and use the second target coding parameter to update the historical coding parameter in the target terminal, so that the code stream corresponding to the target video frame in the updated target terminal is increased.

10. An adjustment device for video encoding, characterized in that, Including: A receiving module, configured to receive bandwidth information fed back by a base station from a target platform, where the bandwidth information is used to indicate the network quality corresponding to the network between the base station and the target terminal when transmitting a target video frame, and the bandwidth information includes: the uplink available bandwidth value of the target terminal evaluated by the base station and the wireless bandwidth capacity value of the target terminal evaluated by the base station; An obtaining module, configured to obtain the delay time for processing the target video frame on the target terminal and the target bandwidth for transmitting the target video frame on the target terminal; A determining module, configured to determine the 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 the coding parameter of the target terminal according to the congestion state; An adjustment module, configured to adjust the coding parameter according to the bandwidth information and the target bandwidth when the coding parameter needs to be adjusted, so that the adjusted coding parameter matches the bandwidth information; 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 value obtained by multiplying the target bandwidth by a first coefficient and the delay time is less than a first preset threshold; determine that the network is in an overloaded transmission state when the uplink available bandwidth value is greater than the value obtained by multiplying the target bandwidth by the first coefficient and the delay time is greater than a second preset threshold, where the first preset threshold is less than the second preset threshold; when the uplink available bandwidth value is less than or equal to the value obtained by multiplying the target bandwidth by the first coefficient, replace the first coefficient with a second coefficient, and re-determine the magnitude relationship between the uplink available bandwidth value and the target bandwidth and the congestion state of the network, where the second coefficient is less than the first coefficient.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, where the program, when running, executes the method described in any one of claims 1 to 9.

12. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to execute the method described in any one of claims 1 to 9 through the computer program.

Citation Information

Patent Citations

  • Video transmission method and device, electronic equipment and storage medium

    CN112312137A