WO2022111684A1 - Method for adjusting power consumption of terminal, and method for adjusting bit rate, and related devices - Google Patents

Method for adjusting power consumption of terminal, and method for adjusting bit rate, and related devices Download PDF

Info

Publication number
WO2022111684A1
WO2022111684A1 PCT/CN2021/133968 CN2021133968W WO2022111684A1 WO 2022111684 A1 WO2022111684 A1 WO 2022111684A1 CN 2021133968 W CN2021133968 W CN 2021133968W WO 2022111684 A1 WO2022111684 A1 WO 2022111684A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
video stream
power consumption
bit rate
server
Prior art date
Application number
PCT/CN2021/133968
Other languages
French (fr)
Chinese (zh)
Inventor
朱勇平
吴昊
刘红波
杨勇
吴亮
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022111684A1 publication Critical patent/WO2022111684A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25808Management of client data

Definitions

  • the embodiments of the present application relate to the field of data processing, and in particular, to a method for adjusting power consumption of a terminal, a method for adjusting a code rate, a device for adjusting a code rate, and a storage medium.
  • Multimedia virtual scene technologies include technologies such as virtual reality (VR), augmented reality (AR), and mixed reality (MR).
  • the multimedia virtual scene technology mainly generates a video stream on the server and sends it to the terminal, and the terminal decodes and plays the video stream to realize the reproduction of the virtual scene at the terminal.
  • the current way to reduce the power consumption of the terminal is mainly to reduce the power consumption by turning off the terminal when it is detected that the user is not using the terminal.
  • the above-mentioned phenomena such as overheating, video freezes, or power-off due to insufficient power may still occur.
  • the power consumption is reduced only by detecting whether the user uses the terminal to decide whether to turn off the terminal.
  • the degree of power consumption reduction is limited, and the adjustment method for the power consumption of the terminal is single.
  • the embodiment of the present application provides a method for adjusting the power consumption of a terminal, which is used to adjust the power consumption of the terminal when the terminal is in a use state.
  • a first aspect of the embodiments of the present application provides a method for adjusting power consumption of a terminal.
  • the method includes: a server sends a video stream to the terminal at a first bit rate. After sending the video stream, the server receives first power consumption related information from the terminal, where the first power consumption related information is used to represent the power consumption of the terminal, and the power consumption of the terminal is related to the playback of the video stream.
  • the server determines, according to the first power consumption related information, that the power consumption of the terminal satisfies the first preset condition. After determining that the power consumption of the terminal satisfies the first preset condition, the server sends the video stream to the terminal at a second bit rate lower than the first bit rate.
  • the server sends a video stream to the terminal at a first bit rate, and when the terminal receives and plays the video stream, the server receives the first power consumption related information sent by the terminal, and the server sends the first power consumption related information to the terminal according to the first power consumption related information.
  • the power consumption of the device satisfies the first preset condition, it is determined that the bit rate of the video stream needs to be adjusted, and the video stream is sent to the terminal at a second bit rate smaller than the first bit rate. Since the bit rate of the video stream is reduced, the power consumption generated by the terminal playing the video stream is reduced, thereby reducing the power consumption of the terminal.
  • the power consumption of the terminal can only be reduced when the terminal is not used by the user, thereby reducing the power consumption of the terminal when the terminal is in use.
  • the first power consumption related information includes the central processing unit (CPU) occupancy rate of the terminal
  • the server according to the first power consumption related information Determining that the power consumption of the terminal satisfies the first preset condition includes: the server determining, according to the received CPU occupancy rate of the terminal, that the CPU occupancy rate of the terminal is greater than or equal to the first preset value.
  • the power consumption of the terminal satisfies the first preset condition, which means that the terminal is in a state of excessive power consumption, and the power consumption of the terminal needs to be reduced.
  • the first preset condition may include that the CPU occupancy rate of the terminal is greater than or equal to the first preset value.
  • other terminal power consumption information may also satisfy the first preset condition, for example, the remaining power of the terminal is less than or equal to the second preset value, etc., which is not limited here.
  • the server determines that the CPU occupancy rate of the terminal is too high according to the received CPU occupancy rate of the terminal, and reduces the bit rate of the video stream, thereby reducing the CPU occupancy rate of the terminal. It realizes the adjustment of the CPU occupancy rate of the terminal.
  • the first power consumption related information includes the CPU occupancy rate of the terminal, and the terminal may report a plurality of first power consumption related information.
  • Power consumption related information a plurality of first power consumption related information represents the power consumption of the terminal at different times
  • the server determines, according to the first power consumption related information, that the power consumption of the terminal meets the first preset condition, including: the server according to the received multiple power consumption related information.
  • the CPU occupancy rate at different times is determined to be an average value of the CPU occupancy rate of the terminal in the first period of time greater than or equal to the first preset value.
  • the bit rate of the video stream is adjusted according to the average value of multiple CPU occupancy rates in the first period. It can prevent improper adjustment of the video stream bit rate caused by abnormal fluctuations in CPU usage. For example, the current CPU resources of the terminal are sufficient to process the received video stream, but the CPU usage increases instantaneously due to occasional events, and then returns to normal immediately. In this case, it is not necessary to adjust the occupancy of the CPU resources of the terminal, and it is also not necessary to adjust the bit rate of the video stream. Adjusting the bit rate of the video stream according to the average value of the CPU usage can avoid improper adjustment of the bit rate of the video stream caused by the instantaneously increased CPU usage.
  • the first power consumption related information includes the remaining power of the terminal
  • the server according to Determining that the power consumption of the terminal satisfies the first preset condition by the first power consumption related information includes: the server determines that the remaining power of the terminal is less than or equal to the second preset value according to the received remaining power of the terminal.
  • the server determines that the remaining power of the terminal is too low according to the received remaining power of the terminal, and reduces the bit rate of the video stream, so as to realize the adjustment of the video stream according to the remaining power of the terminal, so as to prolong the use of the terminal time.
  • the first power consumption related information includes the remaining power of the terminal at the first moment and the remaining power at the second moment, and the At a moment earlier than a second moment, the server determines that the power consumption of the terminal satisfies the first preset condition according to the first power consumption related information, and further includes: the server determines that the remaining power of the terminal is in a constant or decreasing trend, that is, the remaining power at a later moment The value of the power is greater than or equal to the value of the remaining power at the previous moment. Specifically, the server may determine that the remaining power of the terminal at the first moment is greater than or equal to the remaining power at the second moment according to the received remaining power of the terminal.
  • the bit rate of the video stream needs to be reduced to reduce the power consumption of the terminal. Therefore, it can be ensured that when the terminal is in a charging state, the video stream can be received at a high bit rate, that is, the first bit rate, and the video quality of the playback data output by the terminal to the user is guaranteed.
  • the server uses a code rate lower than the first code rate. Before the second bit rate sends the video stream to the terminal, the method further includes: the server reduces the size of the field of view (field of view, Fov) angle.
  • reducing the size of the Fov angle can reduce the amount of high-definition data included in the video stream, thereby reducing the power consumption or occupied by the terminal when decoding and rendering the video stream.
  • the server uses a code rate lower than the first code rate.
  • the method further includes: the server reduces the bit rate of the video stream, and acquires the video stream according to the bit rate.
  • the bit rate here is a preset value for obtaining a video stream, which is also called a preset bit rate.
  • the preset bit rate can be reduced to reduce the bit rate of the video stream.
  • the server uses a code rate lower than the first code rate.
  • the method further includes: the server reduces at least one of a peak-to-average ratio, a ratio of a key frame (intra picture, I) to a reference frame (predictive picture, P), a frame rate, and a resolution . Decreasing any of these parameters can lead to a reduction in the bitrate of the video stream.
  • the server uses a code rate lower than the first code rate.
  • the method further includes: the server further includes: the server increases at least one of a quantization parameter (quantitative parameters, QP) or a key frame period (group of pictures, GOP). Increasing any of these parameters can lead to a reduction in the bit rate of the video stream.
  • a quantization parameter quantitative parameters, QP
  • a key frame period group of pictures, GOP
  • the server receives the second power consumption from the terminal Related information, the second power consumption related information is used to represent the power consumption of the terminal.
  • the server determines that the power consumption of the terminal satisfies the second preset condition according to the second power consumption related information, the server sends the video stream to the terminal at a third bit rate higher than the second bit rate.
  • the bit rate of the video stream is reduced according to the first power consumption related information, and then the bit rate of the video stream is increased according to the second power consumption related information.
  • the video stream bit rate can be increased when the resources return to a sufficient state, that is, when the power consumption of the terminal satisfies the second preset condition, thereby increasing the video stream bit rate. the video quality of the playback data output to the user.
  • the second power consumption related information includes the CPU occupancy rate of the terminal
  • the server determines the terminal's CPU occupancy rate according to the second power consumption related information.
  • the power consumption meeting the second preset condition includes: the server determines, according to the received CPU occupancy rate of the terminal, that the CPU occupancy rate of the terminal is less than or equal to the third preset value.
  • the power consumption of the terminal satisfies the second preset condition, indicating that the terminal is not in a state of excessive power consumption, and the power consumption of the terminal can be improved.
  • the second preset condition may include that the CPU occupancy rate of the terminal is less than or equal to the third preset value.
  • other terminal power consumption information can also meet the second preset condition, for example, the remaining power of the terminal is greater than or equal to the fourth preset value, etc., which is not limited here.
  • the second power consumption related information includes the CPU occupancy rate of the terminal, and the terminal may report multiple second power consumption related information. information, multiple pieces of second power consumption related information represent the power consumption of the terminal at different times, and the server determines, according to the second power consumption related information, that the power consumption of the terminal satisfies the second preset condition, including: the server according to the received multiple different times The CPU occupancy rate of the terminal is determined, and the average value of the CPU occupancy rate of the terminal in the second period is less than or equal to the third preset value.
  • the second power consumption related information includes the remaining power of the terminal, and the server determines the terminal's power consumption according to the second power consumption related information.
  • the power consumption meeting the second preset condition includes: the server determining, according to the received remaining power of the terminal, that the remaining power of the terminal is greater than or equal to a fourth preset value.
  • the fourth preset value is a threshold value of the remaining power of the terminal. When the remaining power of the terminal is not lower than the threshold, it means that the remaining power of the terminal is not too low, and the function of the terminal can be improved. consumption.
  • the terminal may send multiple pieces of second power consumption related information, and the multiple pieces of second power consumption related information indicate that the terminal is in
  • the server determines that the power consumption of the terminal satisfies the second preset condition according to the second power consumption related information. Specifically, the server determines, according to the received remaining power of the terminal at different times, that the remaining power of the terminal at the fourth time is greater than or equal to the remaining power of the third time, and the third time is earlier than the fourth time.
  • the terminal when it is determined that the remaining power of the terminal is no longer reduced, for example, the terminal is in a charging state, it is determined that the terminal can continue to play a video stream with a high bit rate, thereby increasing the bit rate of the video stream.
  • the video quality of the playback data output by the terminal to the user can be guaranteed without reducing the remaining power.
  • the server uses a third code rate higher than the second code rate. Before the bit rate sends the video stream to the terminal, the method further includes: the server increases the Fov angle size of the field of view.
  • the amount of high-definition data included in the video stream can be increased, and the video quality of the playback data output to the user can be improved.
  • the server uses a third code rate higher than the second code rate.
  • the method further includes: the server increases the preset bit rate of the video stream, and obtains the video stream according to the bit rate.
  • the bit rate here is a preset value for obtaining a video stream, which is also called a preset bit rate.
  • the server can increase the bit rate of the video stream by increasing the preset bit rate.
  • the server uses a third code rate higher than the second code rate. Before the bit rate sends the video stream to the terminal, it further includes: the server increases at least one of a peak-to-average ratio, a ratio of a key frame (intra picture, I) to a reference frame (predictive picture, P), a frame rate, and a resolution. Increasing any of these parameters can lead to an increase in the bit rate of the video stream.
  • the server uses a third code rate higher than the second code rate.
  • the method further includes: the server reduces at least one of a quantization parameter (quantitative parameters, QP) or a key frame period (group of pictures, GOP). Decreasing any of these parameters can lead to an increase in the bit rate of the video stream.
  • a quantization parameter quantitative parameters, QP
  • a key frame period group of pictures, GOP. Decreasing any of these parameters can lead to an increase in the bit rate of the video stream.
  • a second aspect of the embodiments of the present application provides a method for adjusting power consumption of a terminal.
  • the method includes: the terminal receives a video stream from a server at a first bit rate.
  • the terminal sends first power consumption related information to the server, where the first power consumption related information is used to indicate the power consumption of the terminal, and the power consumption of the terminal is related to the playback of the video stream.
  • the server determines that the power consumption of the terminal satisfies the first preset condition according to the first power consumption related information
  • the terminal receives the video stream from the server at a second bit rate, which is lower than the first bit rate.
  • the first power consumption related information includes the CPU occupancy rate of the terminal
  • the power consumption of the terminal satisfying the first preset condition includes: the CPU occupancy rate of the terminal is greater than or equal to the first preset value; or, the average value of the CPU occupancy rate of the terminal in the first period of time is greater than or equal to the first preset value.
  • the first power consumption related information includes the remaining power of the terminal, and the power consumption of the terminal satisfying the first preset condition includes: the remaining power of the terminal is less than or is equal to the second preset value; or, the remaining power of the terminal is decreasing. Specifically, the remaining power of the terminal at the first moment is greater than the remaining power at the second moment, and the first moment is earlier than the second moment.
  • the server uses a code lower than the first code
  • the method further includes: the terminal sending second power consumption related information to the server, where the second power consumption related information is used to indicate the power consumption of the terminal, the power consumption of the terminal and the playback of the video stream. related.
  • the server determines according to the second power consumption related information that the power consumption of the terminal satisfies the second preset condition, the terminal receives the video stream from the server at the third bit rate, the video stream has the third bit rate, and the third bit rate is high at the first bit rate.
  • the second power consumption related information includes the CPU occupancy rate of the terminal
  • the second preset condition includes: the CPU occupation of the terminal The rate is less than or equal to the third preset value; or, the average value of the CPU occupancy rate of the terminal in the second period is less than or equal to the third preset value.
  • the second power consumption related information includes the Remaining power
  • the second preset condition includes: the remaining power of the terminal is greater than or equal to the fourth preset value; or, the remaining power of the terminal at the third time is less than or equal to the remaining power at the fourth time, and the third time is earlier than the fourth time. time.
  • the embodiment of the present application also provides a bit rate adjustment method, which is used to adjust the bit rate of the video stream according to the network bandwidth.
  • a third aspect of the embodiments of the present application provides a method for adjusting a bit rate.
  • the method includes: a server sends a video stream to a terminal at a first bit rate.
  • the server receives the first bandwidth information from the terminal, where the first bandwidth information is used to indicate the network bandwidth of the terminal.
  • the server determines, according to the first bandwidth information, that the network bandwidth of the terminal satisfies the third preset condition.
  • the server sends the video stream to the terminal at a second bit rate lower than the first bit rate.
  • the server when the terminal receives and plays the video stream with the first bit rate, the server receives the first bandwidth information sent by the terminal, and the server determines, according to the first bandwidth information, that the current network bandwidth is insufficient to carry the video stream.
  • the bit rate of the video stream needs to be adjusted, and the video stream is sent to the terminal at a second bit rate smaller than the first bit rate. Since the bit rate of the video stream is reduced, the current network bandwidth can carry the transmission of the current video stream. Therefore, it is possible to avoid phenomena such as freezing, video stream packet loss, or untimely video stream transmission occurring in the state of insufficient network bandwidth.
  • the first bandwidth information includes the network bandwidth of the terminal
  • the server determines according to the first bandwidth information that the network bandwidth of the terminal meets the third preset condition, including: According to the received network bandwidth of the terminal, the server determines that the network bandwidth of the terminal is less than or equal to the fifth preset value; or, according to the received network bandwidth of the terminal, the server determines that the average value of the network bandwidth of the terminal in the third time period is less than or equal to the fifth preset value; or equal to the fifth preset value.
  • the network bandwidth of the terminal satisfies the third preset condition, indicating that the transmission of the video stream may be greater than the carrying capacity of the network of the terminal, and therefore the bit rate of the video stream may need to be reduced.
  • the third preset condition may include that the network bandwidth of the terminal is less than or equal to the fifth preset value.
  • other bandwidth information may also satisfy the third preset condition, for example, the average value of the network bandwidth of the terminal within a certain period is less than or equal to the fifth preset value, etc., which is not limited here.
  • the bit rate of the video stream is adjusted according to the average value of multiple network bandwidths in the third time period. It can prevent improper adjustment of video stream bit rate caused by abnormal fluctuation of network bandwidth. For example, the network bandwidth is momentarily reduced due to occasional events, and then returns to normal immediately. In this case, it is not necessary to adjust the bit rate of the video stream. Adjusting the bit rate of the video stream according to the average value of the network bandwidth can avoid improper adjustment of the bit rate of the video stream caused by the instantaneously reduced network bandwidth.
  • the server before the server sends the video stream to the terminal at a second bit rate lower than the first bit rate, It also includes: the server reduces the field of view (field of view, Fov) angle size; or the server reduces the bit rate of the video stream.
  • the bit rate here is a preset value for obtaining a video stream, which is also called a preset bit rate.
  • the server determines that the bit rate of the video stream is too large, it can reduce the bit rate of the video stream by reducing the preset bit rate.
  • the server uses a code rate lower than the first code rate.
  • the method further includes: the server reduces at least one of a peak-to-average ratio, a ratio of a key frame (intra picture, I) to a reference frame (predictive picture, P), a frame rate, and a resolution .
  • the server uses a code rate lower than the first code rate.
  • the method further includes: the server increases at least one of a quantization parameter (quantitative parameters, QP) or a key frame period (group of pictures, GOP).
  • QP quantitative parameters
  • GOP key frame period
  • the server uses a code rate lower than the first code rate.
  • the method further includes: the server determines a first target bit rate according to the first bandwidth information, where the first target bit rate is the product of the first bandwidth information and a preset ratio. The server reduces the preset bit rate of the video stream according to the first target bit rate.
  • the bit rate of the video stream is reduced according to the first bandwidth information, so as to determine the most suitable bit rate for the current network. It can avoid the problems caused by the bit rate of the video stream being greater than the network bandwidth, such as freezing, packet loss of the video stream, or untimely transmission of the video stream.
  • the server may receive multiple pieces of first bandwidth information , and the multiple pieces of first bandwidth information represent bandwidth information of the terminal at different times.
  • the method further includes: the server determines, according to a plurality of pieces of first bandwidth information, an average value of the network bandwidth of the terminal in the fourth period, and the average value is called The first bandwidth average.
  • the server determines the first target code rate according to the first average bandwidth, where the first target code rate is the product of the first average bandwidth and a preset ratio.
  • the server reduces the preset bit rate of the video stream according to the first target bit rate.
  • the excessively frequent adjustment of the bit rate of the video stream caused by the network fluctuation is reduced by the first bandwidth average value.
  • the server uses a code rate lower than the first code rate.
  • the method further includes: the server receives second bandwidth information from the terminal, where the second bandwidth information is used to indicate the network bandwidth of the terminal.
  • the server determines a second target code rate according to the second bandwidth information, where the second target code rate is the product of the second bandwidth information and a preset ratio.
  • the server increases the bit rate of the video stream according to the second target bit rate, and sends the video stream to the terminal at a third bit rate higher than the second bit rate.
  • the bit rate here is a preset value for obtaining a video stream, which is also called a preset bit rate.
  • the server determines that the network bandwidth of the terminal can carry a video stream with a higher bit rate, the video stream bit rate can be improved by increasing the preset bit rate.
  • the bit rate of the second video stream is determined according to the product of the second bandwidth information and the preset ratio. Can maximize the use of network bandwidth.
  • the server uses a code rate lower than the first code rate.
  • the method further includes: the server receives second bandwidth information from the terminal, where the second bandwidth information is used to indicate the network bandwidth of the terminal.
  • the server may receive multiple pieces of second bandwidth information, where the multiple pieces of second bandwidth information represent bandwidth information of the terminal at different times.
  • the server determines the average value of the network bandwidth of the terminal in the fifth period according to the plurality of pieces of second bandwidth information, and the average value is called the second bandwidth average value.
  • the server determines the second target code rate according to the second average bandwidth, where the second target code rate is the product of the second average bandwidth and the preset ratio.
  • the server increases the preset bit rate of the video stream according to the second target bit rate, and sends the video stream to the terminal at a third bit rate higher than the second bit rate.
  • a fourth aspect of the embodiments of the present application provides a method for adjusting a bit rate.
  • the method includes: a terminal receives a video stream from a server at a first bit rate.
  • the terminal sends first bandwidth information to the server, where the first bandwidth information is used to indicate the network bandwidth of the terminal.
  • the terminal receives the video stream from the server at the second bit rate, and the second bit rate is lower than the first bit rate.
  • the first bandwidth information includes the network bandwidth of the terminal, and the network bandwidth of the terminal satisfying the third preset condition includes: the network bandwidth of the terminal is less than or equal to the third five preset values; or, the average value of the network bandwidth of the terminal in the third time period is less than or equal to the fifth preset value.
  • the method further includes: sending the terminal to the server Send second bandwidth information, where the second bandwidth information is used to indicate the network bandwidth of the terminal; the terminal receives the video stream from the server at a third code rate, and the third code rate is higher than the second code rate.
  • a fifth aspect of the embodiments of the present application provides a device for adjusting a code rate, where the device includes: a processor and a memory coupled to the processor.
  • the memory is used to store executable instructions, and the executable instructions are used to instruct the processor to perform the method of the foregoing first aspect.
  • a sixth aspect of the embodiments of the present application provides a device for adjusting a code rate, where the device includes: a processor and a memory coupled to the processor.
  • the memory is used to store executable instructions, and the executable instructions are used to instruct the processor to perform the method of the aforementioned second aspect.
  • a seventh aspect of an embodiment of the present application provides a device for adjusting a code rate, where the device includes: a processor and a memory coupled to the processor.
  • the memory is used to store executable instructions, and the executable instructions are used to instruct the processor to perform the method of the foregoing third aspect.
  • An eighth aspect of the embodiments of the present application provides a device for adjusting a code rate, where the device includes: a processor and a memory coupled to the processor.
  • the memory is used to store executable instructions, and the executable instructions are used to instruct the processor to perform the method of the foregoing fourth aspect.
  • a ninth aspect of an embodiment of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and when the computer executes the program, the first aspect or the third aspect described above is executed. method.
  • a tenth aspect of an embodiment of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and when the computer executes the program, the computer-readable storage medium executes the second aspect or the fourth aspect. method.
  • An eleventh aspect of the embodiments of the present application provides a computer program product.
  • the computer program product When the computer program product is executed on a computer, the computer executes the method described in the first aspect or the third aspect.
  • a twelfth aspect of the embodiments of the present application provides a computer program product.
  • the computer program product When the computer program product is executed on a computer, the computer executes the method described in the foregoing second aspect or the fourth aspect.
  • Fig. 1 is the scene schematic diagram that the server provides video stream
  • FIG. 2 is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application
  • FIG. 3 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application
  • FIG. 4 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application
  • FIG. 5 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • FIG. 6 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • FIG. 7 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • FIG. 8 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • FIG. 9 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • FIG. 10 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • FIG. 11 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • FIG. 13 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • FIG. 15 is another flowchart of a method for adjusting a code rate in an embodiment of the present application.
  • 16 is another flowchart of a method for adjusting a code rate in an embodiment of the present application.
  • 17 is another flowchart of a method for adjusting a code rate in an embodiment of the present application.
  • FIG. 18 is a schematic structural diagram of a server in an embodiment of the present application.
  • FIG. 19 is a schematic structural diagram of a terminal in an embodiment of the present application.
  • the embodiment of the present application provides a method for adjusting the power consumption of a terminal, which adjusts the power consumption of the terminal when the terminal is in a use state.
  • the power consumption of the terminal represents the power or energy consumption of the terminal, which is a resource required or generated for processing received data, and may specifically include remaining power or CPU occupancy.
  • FIG. 1 is a schematic diagram of a scenario in which a server provides a video stream to a terminal. Based on this scenario, the terminal can process the video stream from the server and play it to the user.
  • the film source data is the data obtained by the server
  • the video stream is the data sent by the server to the terminal
  • the playback data is the data output by the terminal to the user.
  • the server obtains slice source data, obtains a video stream according to the slice source data, and then sends the video stream to the terminal.
  • the terminal After receiving the video stream, the terminal performs processing such as decoding the video stream to obtain playback data for output to the user.
  • the terminal is also referred to as user equipment (user equipment, UE).
  • user equipment user equipment
  • the server may also have other processing methods for the video stream, such as rendering, which is not specifically limited here.
  • Processing video streams by a terminal will generate power consumption.
  • the method of adjusting the power consumption of the terminal is to detect the use state of the terminal, and turn off the terminal when it is detected that the terminal is not being used by the user.
  • this method can only reduce the power consumption of the terminal when the terminal is not in use, and cannot adjust the power consumption of the terminal when the terminal is in use.
  • the embodiment of the present application will provide a data processing method to realize the adjustment of the power consumption of the terminal when the terminal is in a use state.
  • the method for adjusting the power consumption of the terminal in the embodiment of the present application is as follows: the terminal reports the first power consumption related information to the server, and the first power consumption related information is used to indicate the power consumption of the terminal, and the power consumption of the terminal is related to the playback of the video stream by the terminal. .
  • the server determines and adjusts the bit rate according to the first power consumption related information, and the bit rate is the bit rate of the video stream sent to the terminal, so that the bit rate of the adjusted video stream is different from that of the pre-adjusted video stream.
  • the power consumption of the terminal is adjusted by adjusting the bit rate of the video stream.
  • the server determines the power consumption information of the terminal according to the first power consumption related information, and when the terminal power consumption information satisfies the first preset condition, triggers to adjust the bit rate of the video stream.
  • the first power consumption related information is used to represent the power consumption of the terminal.
  • the first power consumption related information may also be other information, which is not limited here.
  • the first power consumption related information may also be a resource indicating that the terminal is currently available for processing a video stream, and the resource may be the remaining power.
  • the resource may also be other resources such as network bandwidth, which are not limited here.
  • the first power consumption related information is the CPU occupancy rate.
  • the video stream bit rate can be adjusted by adjusting processing parameters.
  • the video stream sent by the server before receiving the first state information is called the first video stream
  • the video stream obtained by the server after adjusting the processing parameters is called the second video stream.
  • the bit rate of the first video stream is greater than the bit rate of the second video stream, that is to say, the embodiment of the present application realizes the adjustment of the bit rate of the video stream by adjusting the processing parameters, and reduces the bit rate of the video stream, thereby reducing the bit rate of the video stream. Reduce the power consumption of the terminal.
  • the processing parameters can be divided into initial processing parameters and first target processing parameters.
  • the initial processing parameters are processing parameters before receiving the first power consumption related information
  • the first target processing parameters are the processing parameters after being reduced.
  • the first video stream can be obtained according to the initial processing parameters
  • the second video stream can be obtained according to the first target processing parameters.
  • the processing parameter may be a field of view (field of view, Fov) angle size.
  • Fov angle there are many possible processing parameters, such as preset bit rate, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, resolution, quantization parameter (QP) or key The frame period (group of pictures, GOP), etc., is not specifically limited here.
  • the different processing parameters are exemplified next.
  • the bit rate as a processing parameter is a preset value for obtaining a video stream, which is also referred to as a preset bit rate.
  • the server can adjust the bit rate of the video stream by adjusting the preset bit rate.
  • the processing parameters are the Fov angle and the preset bit rate.
  • FIG. 2 is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • the process of the method for adjusting the power consumption of a terminal includes:
  • the server obtains the film source data.
  • the server When the server receives a play instruction from the terminal, the server can obtain the source data of the film.
  • the play instruction indicates that the terminal needs to obtain the video stream for playing.
  • obtaining slice source data may also be triggered by other conditions.
  • the trigger condition may also be that the server receives a data identifier from the terminal, etc.
  • the data identifier is used to indicate slice source data, which is not specifically limited here.
  • the server generates a first video stream, and sends the first video stream to the terminal.
  • the server performs encoding processing on the slice source data according to the initial processing parameters to obtain the first video stream.
  • the h264 standard may be used for encoding, and in addition to h264, other standards such as h265 may also be used for encoding, which is not limited here.
  • the specific values of the initial processing parameters are: the Fov angle size is 120 ⁇ 120, and the preset bit rate is 30 Mbps.
  • the specific values of the initial processing parameters are only examples of the initial processing parameters, and do not limit the types and values of the initial processing parameters.
  • the initial processing parameter may also be of other types and values.
  • the type of the processing parameter is frame rate, and the specific value is 120 frames per second, etc., which is not limited here.
  • the server may also have other processing methods for acquiring video streams, such as sampling, which is not limited here.
  • the initial processing parameters are processing parameters preset by the server, and the initial processing parameters may also come from other sources, which are not specifically limited here.
  • the initial processing parameter may be the processing parameter on which the server obtains the video stream in the last play task.
  • the server After acquiring the first video stream, the server sends the first video stream to the terminal.
  • the server may encapsulate the first video stream through the Box protocol, and then encapsulate the first video stream through the HTTP-based dynamic adaptive streaming (dynamic adaptive streaming over HTTP, DASH) protocol.
  • the video stream in addition to the box protocol, can also be encapsulated by other protocols, such as a transport stream (transport stream, TS) protocol, which is not limited here.
  • transport stream transport stream, TS
  • other protocols can also be used for encapsulation, such as a hypertext transfer protocol real-time streaming (HTTP Live Streaming, HLS) protocol, which is not limited here.
  • the server may send the video stream through a network protocol represented by a hypertext transfer protocol (HTTP).
  • HTTP hypertext transfer protocol
  • the server can also send through other protocols, such as the quick UDP internet connection (QUIC) protocol, etc., which are not limited here.
  • QUIC quick UDP internet connection
  • the terminal decodes the first video stream, and outputs playback data to the user.
  • the terminal After receiving the first video stream, the terminal decodes the first video stream to obtain playback data, and outputs the playback data to the user.
  • outputting the playing data may be displaying the playing data on the screen of the terminal, and the screen is used for the user to receive the playing data from the terminal.
  • the terminal may also output the playback data in other ways, for example, transmitting the playback data to a module or unit for displaying the playback data to the user, which is not specifically limited here.
  • the terminal may process the first video stream in other ways to obtain playback data, such as rendering, which is not specifically limited here.
  • the terminal reports the CPU usage to the server.
  • Processing the received video stream will occupy the CPU running resources of the terminal.
  • the terminal obtains the CPU occupancy rate, and the CPU occupancy rate represents the resources consumed by the terminal to process the received video stream.
  • the reported CPU occupancy rate at this time is the first power consumption related information.
  • the terminal can collect the average occupancy rate of multiple CPUs. When a single CPU occupies too much, it can coordinate the processing resources of other CPU cores to share the workload of the CPU core. Collecting the average value can ensure the processing of multiple CPU cores. Reasonable use of resources to prevent over-regulation.
  • the terminal may report the first power consumption related information periodically, for example, once every 5 seconds.
  • periodic reporting it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
  • 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
  • the reporting condition may be that the terminal determines that the CPU occupancy rate exceeds 40%, or may be other forms of conditions, for example, the terminal determines that the remaining power is less than 20%, etc., which is not limited here.
  • the CPU occupancy rate reported here may be the CPU occupancy rate generated by the terminal processing the first video stream. It may also be the CPU occupancy rate generated by processing the video stream received before or after the first video stream, as long as the processed video stream is obtained according to the initial processing parameters, which is not limited here.
  • the common point of these video streams is that the bit rate is the same.
  • the terminal may report the first power consumption related information through a network protocol represented by HTTP.
  • HTTP network protocol
  • the terminal can also report through other protocols, such as transmission control protocol (transmission control protocol, TCP), etc., which are not limited here.
  • the server determines, according to the CPU occupancy rate reported by the terminal, that the power consumption of the terminal satisfies the first preset condition.
  • the server may determine the power consumption of the terminal according to the CPU occupancy rate, and when it is determined that the CPU occupancy rate meets the first preset condition, adjust the processing parameters to obtain a video stream with a bit rate lower than the first video stream. video stream.
  • the power consumption of the terminal satisfies the first preset condition, indicating that the terminal is in a state of excessive power consumption, and the power consumption of the terminal needs to be reduced.
  • the first preset condition may include that the CPU occupancy rate of the terminal is greater than or equal to the first preset value.
  • other terminal power consumption information may also satisfy the first preset condition, for example, the remaining power of the terminal is less than or equal to the second preset value, etc., which is not limited here.
  • the server may determine the CPU occupancy rate of the terminal according to the received CPU occupancy rate, and start when it is determined that the CPU occupancy rate is greater than or equal to 40% timing.
  • the CPU usage of the terminal is recorded within 30 seconds from the timing.
  • the processing parameters are adjusted. That is to say, the power consumption of the terminal in this embodiment is the CPU occupancy rate of the terminal.
  • the average value of the CPU occupancy rate of the terminal within 30 seconds is greater than or equal to 40%, and 40% is referred to as the first preset value.
  • the first preset value is a threshold of the terminal's CPU occupancy. When the terminal's CPU occupancy exceeds the threshold, it means that the terminal's CPU occupancy is too high, and the terminal's CPU occupancy needs to be reduced.
  • the first preset value may also be other values, such as 30%, 50%, 60%, 70%, 80% or 90%, etc., which are not limited here.
  • the average value of the CPU occupancy rate of the terminal within 30 seconds is greater than or equal to 40%, which is the first preset condition. If the power consumption of the terminal satisfies the first preset condition, it means that the resources used by the current terminal for processing the video stream are insufficient to process the current video stream, or the current video stream is processed according to the current resources, and the effect is not good. In this case, the processing parameters are adjusted to reduce the The bitrate size of the video stream.
  • the first preset condition may also be other conditions, such as the remaining power of the terminal is less than a certain threshold and is in a downward trend, which is not specifically limited here.
  • the server reduces the Fov angle size and the preset bit rate to obtain a second video stream.
  • the server determines that the power consumption of the terminal meets the first preset condition, it determines that the power consumption of the terminal is too high, and needs to reduce the power consumption of the terminal.
  • the server reduces the power consumption of the terminal by reducing the bit rate of the video stream, and adjusts the bit rate of the video stream by adjusting the processing parameters.
  • the server reduces the Fov angle size and the preset bit rate, and processes the source data according to the adjusted Fov angle size and the preset bit rate to obtain the second video stream.
  • the bit rate of the second video stream is smaller than the bit rate of the first video stream.
  • the reduced Fov angle and the reduced preset code rate are called the first target processing parameter.
  • the size of the Fov angle can be set as 90*90, and the preset bit rate can be set as 20Mbps. That is, in this embodiment, the first target processing parameters are the Fov angle size of 90 ⁇ 90 and the preset bit rate of 20 Mbps.
  • the server intercepts the VR spherical high-definition picture at 90 ⁇ 90, and then encodes the intercepted picture according to the preset bit rate of 20 Mbps to obtain the second video stream.
  • the second video stream contains less high-definition data than the first video stream.
  • the preset code rate of the first target processing parameter is smaller than the preset code rate of the initial processing parameter, then the code rate of the second video stream is smaller than the code rate of the first video stream.
  • step 206 may reduce the frame rate for the server, and the first target processing parameter may be a frame rate of 100 frames per second, which is not limited here.
  • the server sends the second video stream to the terminal.
  • the server After acquiring the second video stream, the server can send the second video stream to the terminal.
  • step 202 For the encoding, encapsulation and transmission manner of the second video stream, refer to step 202, and details are not repeated here.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • the second video stream contains less high-definition data than the first video stream.
  • the power consumption generated by the terminal performing rendering processing on the second video stream is smaller than the power consumption generated by performing rendering processing on the first video stream.
  • the power consumption of the terminal for processing the second video stream is smaller than the power consumption for processing the first video stream.
  • the bit rate of the video stream sent to the terminal is reduced on the server side, thereby reducing the power consumption of the terminal for processing the video stream.
  • the processing parameter is the Fov angle size:
  • FIG. 3 is a schematic flowchart of a method for adjusting power consumption of a terminal provided by an embodiment of the present application.
  • the flow of the method for adjusting power consumption of a terminal includes:
  • Steps 301 to 305 refer to steps 201 to 205 in the embodiment shown in FIG. 2 , and details are not described herein again.
  • the server reduces the size of the Fov angle to obtain a second video stream.
  • the server may reduce the bit rate of the video stream by reducing the Fov angle size.
  • the reduced Fov angle is referred to as the first target processing parameter.
  • the size of the Fov angle can be set as 90 ⁇ 90. That is, in this embodiment, the first target processing parameter is the Fov angle size of 90 ⁇ 90.
  • the server intercepts the VR spherical high-definition picture at 90 ⁇ 90, and then performs corresponding processing to obtain the second video stream.
  • the bit rate of the second video stream is smaller than the bit rate of the first video stream.
  • the second video stream contains less high-definition data than the first video stream.
  • bit rate of the video stream in addition to the Fov angle, other processing parameters can also be adjusted to adjust the bit rate of the video stream, such as preset bit rate, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, Resolution, quantization parameter QP or key frame period GOP, etc., are not limited here.
  • step 205 For the description of the first preset condition, refer to step 205 in the example implementation example in FIG. 2 , which will not be repeated here.
  • the server sends the second video stream to the terminal.
  • the server After acquiring the second video stream, the server sends the second video stream to the terminal.
  • step 202 For the encoding, encapsulation, and transmission manner of the second video stream, refer to step 202 in the embodiment shown in FIG. 2 , and details are not repeated here.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • step 208 in the embodiment shown in FIG. 2 , and details are not repeated here.
  • the second video stream contains less high-definition data than the first video stream.
  • the power consumption generated by the terminal performing rendering processing on the second video stream is smaller than the power consumption generated by performing rendering processing on the first video stream.
  • the bit rate of the second video stream will also be smaller than that of the first video stream.
  • the processing parameter is the preset bit rate:
  • FIG. 4 is a schematic flowchart of a method for adjusting power consumption of a terminal provided by an embodiment of the present application.
  • the flow of the method for adjusting power consumption of a terminal includes:
  • steps 401 to 405 reference may be made to steps 201 to 205 in the embodiment shown in FIG. 2, and details are not repeated here.
  • the server reduces the preset bit rate to obtain a second video stream.
  • the server may reduce the code rate of the video stream by reducing the preset code rate.
  • the reduced preset code rate is called the first target processing parameter.
  • the preset bit rate may be set as 20Mbps. That is, in this embodiment, the first target processing parameter is a preset bit rate of 20 Mbps.
  • the server encodes the film source data at a preset bit rate of 20 Mbps, and obtains the second video stream.
  • the bit rate of the second video stream is smaller than the bit rate of the first video stream.
  • processing parameters can also be adjusted to adjust the bit rate of the video stream, such as the Fov angle, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, resolution rate, quantization parameter QP or key frame period GOP, etc., which are not limited here.
  • step 205 For the description of the first preset condition, refer to step 205 in the example implementation example in FIG. 2 , which will not be repeated here.
  • the server sends the second video stream to the terminal.
  • the server After acquiring the second video stream, the server sends the second video stream to the terminal.
  • step 202 For the encoding, encapsulation, and transmission manner of the second video stream, refer to step 202 in the embodiment shown in FIG. 2 , and details are not repeated here.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • step 208 in the embodiment shown in FIG. 2 , and details are not repeated here.
  • the bit rate of the second video stream is smaller than that of the first video stream.
  • the processing of the second video stream by the terminal consumes, requires or generates less power consumption than processing the first video stream.
  • the processing parameters are the Fov angle size and the preset bit rate, and the video quality can be improved after reducing the power consumption.
  • FIG. 5 is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • the process of the method for adjusting the power consumption of a terminal includes the following steps: :
  • steps 501 to 508 refer to steps 201 to 208 in the implementation example of FIG. 2, and details are not repeated here.
  • the terminal reports the CPU usage to the server.
  • Processing the received video stream will occupy the CPU running resources of the terminal.
  • the terminal obtains the CPU occupancy rate, and the CPU occupancy rate represents the resources consumed by the terminal to process the received video stream.
  • the reported CPU occupancy rate at this time is the second power consumption related information.
  • the terminal can collect the average occupancy rate of multiple CPUs. When a single CPU occupies too much, it can coordinate the processing resources of other CPU cores to share the workload of the CPU core. Collecting the average value can ensure the processing of multiple CPU cores. Reasonable use of resources to prevent over-regulation.
  • the terminal may report the second power consumption related information periodically, for example, once every 5 seconds.
  • periodic reporting it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
  • 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
  • the reporting condition may be that the terminal determines that the CPU occupancy rate is less than 40%, or may be other forms of conditions, for example, the terminal determines that the remaining power is greater than 20%, etc., which is not limited here.
  • the CPU usage reported here may be the CPU usage generated by the terminal processing the second video stream. It may also be the CPU occupancy rate generated by processing the video stream received before or after the second video stream, as long as the processed video stream is obtained according to the first target processing parameter, which is not limited here.
  • the common point of these video streams is that the bit rate is the same.
  • the terminal may report the second power consumption related information through a network protocol represented by HTTP.
  • HTTP a network protocol represented by HTTP.
  • the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
  • the server determines, according to the CPU occupancy rate reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
  • the server may determine the power consumption of the terminal according to the CPU occupancy rate, and when it is determined that the CPU occupancy rate meets the second preset condition, adjust the processing parameters to obtain a video stream with a bit rate greater than that of the second video stream. video stream.
  • the power consumption of the terminal satisfies the second preset condition, indicating that the terminal is not in a state of excessive power consumption, and the power consumption of the terminal can be improved.
  • the second preset condition may include that the CPU occupancy rate of the terminal is less than or equal to the third preset value.
  • other terminal power consumption information may also satisfy the second preset condition, for example, the remaining power of the terminal is greater than or equal to the second preset value, etc., which is not limited here.
  • the server may determine the CPU occupancy rate of the terminal according to the received CPU occupancy rate.
  • the timing starts.
  • the CPU usage of the terminal is recorded within 30 seconds from the timing.
  • the processing parameters are adjusted. That is to say, the power consumption of the terminal in this embodiment is the CPU occupancy rate of the terminal.
  • the average value of the CPU occupancy rate of the terminal within 30 seconds is less than or equal to 40%, and 40% is referred to as the third preset value.
  • the third preset value is a threshold of the CPU usage of the terminal. When the CPU usage of the terminal is less than the threshold, it means that the CPU of the terminal is not over-occupied, and the CPU of the terminal can be improved. Occupancy rate.
  • the third preset value can also be other values, such as 30%, 50%, 60%, 70%, 80% or 90%, etc., which are not limited here.
  • the 30 seconds of timing is only an example of the timing time, and does not limit the timing time.
  • the average value of the CPU occupancy rate of the terminal within 30 seconds is less than or equal to 40%, which is the second preset condition.
  • the processing parameter is adjusted to increase the bit rate of the video stream.
  • the second preset condition may also be other conditions, such as the remaining power of the terminal is greater than a certain threshold or is in an upward trend, which is not specifically limited here.
  • the server increases the Fov angle size and the preset bit rate to obtain a third video stream.
  • the server determines that the average CPU occupancy rate within 30 seconds is less than or equal to 40%, it determines that the resources of the terminal are sufficient to support the playback of a video stream with a higher bit rate, that is, the video quality of the playback data can be improved.
  • the server increases the bit rate of the video stream by increasing the Fov angle size and the preset bit rate, thereby improving the video quality of the playback data.
  • the server increases the Fov angle size and at the same time increases the preset bit rate, and processes the film source data according to the adjusted Fov angle size and the preset bit rate to obtain the third video stream.
  • the bit rate of the third video stream is greater than the bit rate of the second video stream.
  • the increased Fov angle and the preset code rate are called the second target processing parameter.
  • the size of the Fov angle can be set as 120 ⁇ 120, and the preset bit rate can be set as 30Mbps. That is, in this embodiment, the second target processing parameters are the Fov angle size of 120 ⁇ 120 and the preset bit rate of 30 Mbps.
  • the server intercepts the VR spherical high-definition picture at 120 ⁇ 120, and then encodes the intercepted picture according to the preset bit rate of 30 Mbps to obtain a third video stream.
  • the third video stream contains more high-definition data than the second video stream.
  • the preset code rate of the second target processing parameter is greater than the preset code rate of the first target processing parameter, then the code rate of the third video stream is greater than the code rate of the second video stream, and the playback obtained according to the third video stream The data has better video quality than the playback data obtained from the second video stream.
  • step 511 may increase the frame rate for the server, and the second target processing parameter may be a frame rate of 120 frames per second, which is not limited here.
  • the server sends a third video stream to the terminal.
  • the server After acquiring the third video stream, the server can send the third video stream to the terminal.
  • step 202 For the encoding, encapsulation, and transmission methods of the third video stream, refer to step 202 in the embodiment shown in FIG. 2 , and details are not repeated here.
  • the terminal decodes the third video stream, and outputs playback data to the user.
  • the third video stream contains more high-definition data than the second video stream.
  • the preset bit rate of the third video stream is larger than that of the second video stream, and the bit rate of the third video stream is greater than the bit rate of the second video stream.
  • the playback data obtained by processing the third video stream is better than the playback data obtained by processing the second video stream. video quality.
  • the processing parameter is the size of the Fov angle, and the video quality is improved after reducing power consumption.
  • FIG. 6 is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • the process of a method for adjusting the power consumption of a terminal includes:
  • steps 601 to 608 refer to steps 301 to 308 of the implementation example in FIG. 3, and details are not repeated here.
  • the terminal reports the CPU usage to the server.
  • the server determines, according to the CPU occupancy rate reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
  • steps 609-610 refer to steps 509-510 in the embodiment shown in FIG. 5, and details are not repeated here.
  • the server increases the size of the Fov angle to obtain a third video stream.
  • the server determines that the average CPU occupancy rate within 30 seconds is less than or equal to 40%, it determines that the resources of the terminal are sufficient to support the playback of a video stream with a higher bit rate, that is, the video quality of the playback data can be improved.
  • the server increases the bit rate of the video stream by increasing the Fov angle size, thereby improving the video quality of the playback data.
  • the server increases the Fov angle size, and processes the film source data according to the adjusted Fov angle size to obtain the third video stream.
  • the bit rate of the third video stream is greater than the bit rate of the second video stream.
  • the increased Fov angle is called the second target processing parameter.
  • the size of the Fov angle can be set as 120 ⁇ 120. That is, in this embodiment, the second target processing parameter is the Fov angle size of 120 ⁇ 120.
  • the server performs 120 ⁇ 120 interception on the VR spherical high-definition picture, and then performs corresponding processing on the intercepted picture to obtain a third video stream.
  • the third video stream contains more high-definition data than the second video stream. Even if the third video stream and the second video stream are obtained according to the same preset bit rate, the bit rate of the third video stream will be greater than the bit rate of the second video stream, and according to the playback data obtained from the third video stream, It has better video quality than the playback data obtained according to the second video stream.
  • step 611 may increase the frame rate for the server, and the second target processing parameter may be a frame rate of 120 frames per second, which is not limited here.
  • the server sends a third video stream to the terminal.
  • the terminal decodes the third video stream, and outputs playback data to the user.
  • steps 612-613 refer to steps 512-513 in the embodiment shown in FIG. 5, and details are not repeated here.
  • the third video stream contains more high-definition data than the second video stream, and other processing parameters of the third video stream and the second video stream do not change. , so the bit rate of the third video stream is greater than the bit rate of the second video stream.
  • the playback data obtained by processing the third video stream has better video quality than the playback data obtained by processing the second video stream.
  • the processing parameter is the preset bit rate, and the video quality is improved after reducing power consumption.
  • FIG. 7 is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • the process of the method for adjusting the power consumption of a terminal includes:
  • steps 701 to 708 refer to steps 401 to 408 in the implementation example of FIG. 4, and details are not repeated here.
  • the terminal reports the CPU usage to the server.
  • the server determines, according to the CPU occupancy rate reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
  • steps 709-710 refer to steps 509-510 in the implementation example of FIG. 5, and details are not repeated here.
  • the server increases the preset bit rate to obtain a third video stream.
  • the server determines that the average CPU occupancy rate within 30 seconds is less than or equal to 40%, it determines that the resources of the terminal are sufficient to support the playback of a video stream with a higher bit rate, that is, the video quality of the playback data can be improved.
  • the server increases the bit rate of the video stream by increasing the preset bit rate, thereby improving the video quality of the playback data.
  • the server increases the preset bit rate, and processes the slice source data according to the adjusted preset bit rate to obtain the third video stream.
  • the bit rate of the third video stream is greater than the bit rate of the second video stream.
  • the increased preset code rate is called the second target processing parameter.
  • the preset bit rate may be set as 30Mbps. That is, in this embodiment, the second target processing parameter is a preset bit rate of 30 Mbps.
  • the server encodes the film source data according to the preset bit rate of 30 Mbps, and obtains the third video stream.
  • the bit rate of the third video stream is greater than that of the second video stream.
  • the playback data obtained according to the third video stream has better video quality than the playback data obtained according to the second video stream.
  • step 711 may increase the frame rate for the server, and the second target processing parameter may be a frame rate of 120 frames per second, which is not limited here.
  • the server sends a third video stream to the terminal.
  • the terminal decodes the third video stream, and outputs playback data to the user.
  • steps 712-713 refer to steps 512-513 in the embodiment shown in FIG. 5, and details are not repeated here.
  • the bit rate of the third video stream is greater than that of the second video stream.
  • the playback data obtained by processing the third video stream has better video quality than the playback data obtained by processing the second video stream.
  • the status information is the remaining power:
  • the processing parameters are Fov angle size and preset bit rate:
  • FIG. 8 is a flowchart of a method for adjusting power consumption of a terminal according to an embodiment of the present application.
  • the process of the method for adjusting the power consumption of the terminal includes:
  • the server obtains the data of the film source.
  • the server generates a first video stream, and sends the first video stream to the terminal.
  • the terminal decodes the first video stream, and outputs playback data to the user.
  • steps 801-803 refer to steps 201-203 in the embodiment shown in FIG. 2, and details are not repeated here.
  • the terminal reports the remaining power to the server.
  • Processing the received video stream consumes the power of the terminal.
  • the terminal acquires the remaining power of the terminal, and the remaining power represents the resources used by the terminal to process the received video stream.
  • the remaining power reported at this time is the first power consumption related information.
  • the terminal may report the first power consumption related information periodically, for example, once every 5 seconds.
  • periodic reporting it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
  • 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
  • the reporting condition may be that the terminal determines that the remaining power is less than or equal to 20%, or may be other forms of conditions, such as the terminal determining that the CPU occupancy rate is greater than or equal to 40%, etc., which is not limited here.
  • the terminal may report the first power consumption related information through a network protocol represented by HTTP.
  • HTTP a network protocol represented by HTTP.
  • the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
  • the server determines, according to the remaining power reported by the terminal, that the power consumption of the terminal satisfies the first preset condition.
  • the server may determine the power consumption of the terminal according to the remaining power, and when determining that the remaining power meets the first preset condition, adjust processing parameters to obtain a video stream with a bit rate lower than the first video stream.
  • the server may determine the remaining power of the terminal according to the received remaining power, and start timing when it is determined that the remaining power is less than or equal to 20%. After 2 minutes from the timing, the remaining power of the terminal is recorded every 1 minute. The first time is earlier than the second time, and when the server determines that the remaining power at the second time is less than the remaining power at the first time, that is, when the power is decreasing, the processing parameter is adjusted. That is to say, the power consumption of the terminal in this embodiment is the remaining power of the terminal.
  • the remaining power of the terminal is less than or equal to 20%, and 20% is referred to as the second preset value.
  • the second preset value is a threshold of the remaining power of the terminal. When the remaining power of the terminal is equal to or lower than the threshold, it means that the remaining power of the terminal is too low, and the power consumption of the terminal needs to be reduced. Besides 20%, the second preset value can also be other values, such as 10%, 15%, 25% or 30%, etc., which are not limited here.
  • 2 minutes of timing and every one minute interval are recorded. Both 2 minutes and 1 minute are examples of time, and do not limit the timing time and interval time.
  • the remaining power of the terminal is less than or equal to 20% and is decreasing, which is the first preset condition. If the power consumption of the terminal satisfies the first preset condition, it means that the resources used by the current terminal for processing the video stream are insufficient to process the current video stream, or the current video stream is processed according to the current resources, and the effect is not good. In this case, the processing parameters are adjusted to reduce the The bitrate size of the video stream. Except that the remaining power is less than or equal to 20% and is decreasing, the first preset condition may also be other conditions, for example, the CPU occupancy rate of the terminal is greater than or equal to a certain threshold, etc., which is not specifically limited here.
  • the server reduces the size of the Fov angle and the preset bit rate to obtain a second video stream.
  • the server sends the second video stream to the terminal.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • the second video stream contains less high-definition data than the first video stream.
  • the power consumption generated by the terminal performing rendering processing on the second video stream is smaller than the power consumption generated by performing rendering processing on the first video stream.
  • the bit rate of the second video stream is lower than that of the first video stream, the power consumption of the terminal for processing the second video stream is smaller than the power consumption for processing the first video stream. Under the condition that the remaining power is the same, the terminal can keep the terminal running for a longer time than processing the first video stream when processing the second video stream, thereby ensuring the viewing time.
  • the bit rate of the video stream sent to the terminal is reduced on the server side, thereby reducing the power consumption of the terminal for processing the video stream.
  • the processing parameter is the Fov angle size:
  • FIG. 9 is a flowchart of a method for adjusting power consumption of a terminal according to an embodiment of the present application.
  • the process of the method for adjusting the power consumption of the terminal includes:
  • steps 901-905 refer to steps 801-805 in the embodiment shown in FIG. 8, and details are not repeated here.
  • the server reduces the size of the Fov angle to obtain a second video stream.
  • the server sends the second video stream to the terminal.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • steps 906-908 refer to steps 306-308 in the embodiment shown in FIG. 3, and details are not repeated here.
  • the second video stream contains less high-definition data than the first video stream.
  • the power consumption generated by the terminal performing rendering processing on the second video stream is smaller than the power consumption generated by performing rendering processing on the first video stream.
  • the bit rate of the second video stream will also be smaller than that of the first video stream.
  • the processing of the second video stream by the terminal consumes, requires or generates less power consumption than processing the first video stream.
  • the processing parameter is the preset bit rate:
  • FIG. 10 is a flowchart of a method for adjusting power consumption of a terminal according to an embodiment of the present application.
  • the process of the method for adjusting the power consumption of the terminal provided by the embodiment of the present application includes:
  • steps 1001-1005 refer to steps 801-805 in the embodiment shown in FIG. 8, and details are not repeated here.
  • the server reduces the preset bit rate to obtain a second video stream.
  • the server sends the second video stream to the terminal.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • steps 1006-1008 refer to steps 406-408 in the embodiment shown in FIG. 4, and details are not repeated here.
  • the bit rate of the second video stream is smaller than that of the first video stream.
  • the processing of the second video stream by the terminal consumes, requires or generates less power consumption than processing the first video stream.
  • the processing parameters are the Fov angle size and the preset bit rate, and the video quality can be improved after reducing the power consumption.
  • FIG. 11 is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • the process of the method for adjusting the power consumption of a terminal includes the following steps: :
  • steps 1101 to 1108 refer to steps 801 to 808 of the example implementation in FIG. 8, and details are not repeated here.
  • the terminal reports the remaining power to the server.
  • Processing the received video stream consumes the power of the terminal.
  • the terminal acquires the remaining power of the terminal, and the remaining power represents the resources used by the terminal to process the received video stream.
  • the remaining power reported at this time is the second power consumption related information.
  • the terminal may report the second power consumption related information periodically, for example, once every 5 seconds.
  • periodic reporting it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
  • 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
  • the reporting condition may be that the terminal determines that the remaining power is greater than or equal to 20%, or may be other forms of conditions, such as the terminal determining that the CPU occupancy rate is less than or equal to 40%, etc., which is not limited here.
  • the terminal may report the second power consumption related information through a network protocol represented by HTTP.
  • HTTP a network protocol represented by HTTP.
  • the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
  • the server determines, according to the remaining power reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
  • the server may determine the power consumption of the terminal according to the remaining power, and adjust processing parameters to obtain a video stream with a bit rate greater than the second video stream when determining that the remaining power meets the second preset condition.
  • the server may determine the remaining power of the terminal according to the received remaining power. When it is determined that the remaining power is greater than or equal to 20%, the processing parameters are adjusted. That is to say, the power consumption of the terminal in this embodiment is the remaining power of the terminal.
  • the remaining power of the terminal is greater than or equal to 20%, and 20% is referred to as the fourth preset value.
  • the fourth preset value is a threshold value of the remaining power of the terminal. When the remaining power of the terminal is not lower than the threshold, it means that the remaining power of the terminal is not too low, and the function of the terminal can be improved. consumption. Besides 20%, the fourth preset value can also be other values, such as 10%, 15%, 25% or 30%, etc., which are not limited here.
  • the remaining power of the terminal is greater than or equal to 20%, which is the second preset condition.
  • the processing parameter is adjusted to increase the bit rate of the video stream.
  • the second preset condition may also be other conditions, for example, the remaining power of the terminal remains unchanged or is in an upward trend, which is not specifically limited here.
  • the server increases the Fov angle size and the preset bit rate to obtain a third video stream.
  • the server sends a third video stream to the terminal.
  • the terminal decodes the third video stream, and outputs playback data to the user.
  • steps 1111-1113 refer to steps 511-513 in the embodiment shown in FIG. 5, and details are not repeated here.
  • the third video stream contains more high-definition data than the second video stream.
  • the preset bit rate of the third video stream is larger than that of the second video stream, and the bit rate of the third video stream is greater than the bit rate of the second video stream.
  • the playback data obtained by processing the third video stream is better than the playback data obtained by processing the second video stream. video quality.
  • the processing parameter is the size of the Fov angle, and the video quality is improved after reducing power consumption.
  • FIG. 12 is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • the process of a method for adjusting the power consumption of a terminal includes:
  • Steps 1101 to 1108 refer to steps 901 to 908 in the example of implementation in FIG. 9 , and details are not repeated here.
  • the terminal reports the remaining power to the server.
  • the server determines, according to the remaining power reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
  • steps 1209-1210 refer to steps 1109-1110 in the embodiment shown in FIG. 11, and details are not repeated here.
  • the server increases the size of the Fov angle to obtain a third video stream.
  • the server sends a third video stream to the terminal.
  • the terminal decodes the third video stream, and outputs playback data to the user.
  • steps 1211-1213 refer to steps 611-613 in the embodiment shown in FIG. 6, and details are not repeated here.
  • the playback data obtained by processing the third video stream has better video quality than the playback data obtained by processing the second video stream.
  • the processing parameter is the preset bit rate, and the video quality is improved after reducing power consumption.
  • FIG. 13 is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application.
  • the process of the method for adjusting the power consumption of a terminal includes:
  • steps 1301 to 1308 refer to steps 1001 to 1008 in the implementation example of FIG. 10, and details are not repeated here.
  • the terminal reports the remaining power to the server.
  • the server determines, according to the remaining power reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
  • steps 1309-1310 refer to steps 1109-1110 in the embodiment shown in FIG. 11, and details are not repeated here.
  • the server increases the preset bit rate to obtain a third video stream.
  • the server sends a third video stream to the terminal.
  • the terminal decodes the third video stream, and outputs playback data to the user.
  • steps 1311-1313 refer to steps 711-713 in the embodiment shown in FIG. 7, and details are not repeated here.
  • the playback data obtained by processing the third video stream has better video quality than the playback data obtained by processing the second video stream.
  • the video stream needs to occupy the network bandwidth to realize the transmission from the server to the terminal.
  • the embodiment of the present application provides a data processing method, which adjusts the bit rate of the video stream according to the network bandwidth, so as to avoid the stuck phenomenon caused by the excessively large bit rate of the video stream.
  • the server determines the network bandwidth according to the bandwidth information, and when the network bandwidth meets the third preset condition, triggers adjustment of the bit rate of the video stream.
  • the first bandwidth information is used to represent the network bandwidth.
  • the network bandwidth of the terminal satisfies the third preset condition, indicating that the transmission of the video stream may be greater than the carrying capacity of the network of the terminal, and therefore the bit rate of the video stream may need to be reduced.
  • the third preset condition may include that the network bandwidth of the terminal is less than or equal to the fifth preset value.
  • other bandwidth information may also satisfy the third preset condition, for example, the average value of the network bandwidth of the terminal within a certain period is less than or equal to the fifth preset value, etc., which is not limited here.
  • the processing parameters are Fov angle size and preset bit rate:
  • FIG. 14 is a flowchart of a method for adjusting a code rate according to an embodiment of the present application.
  • the flow of the code rate adjustment method provided by the embodiment of the present application includes:
  • the server obtains the data of the film source.
  • the server generates a first video stream, and sends the first video stream to the terminal.
  • the terminal decodes the first video stream, and outputs playback data to the user.
  • steps 1401-1403 refer to steps 201-203 in the implementation example of FIG. 2, and details are not repeated here.
  • the terminal reports the network bandwidth to the server.
  • Transmitting video streams will occupy network bandwidth.
  • the terminal obtains the network bandwidth of the terminal, and the network bandwidth of the terminal represents the network resources of the terminal.
  • the network bandwidth reported at this time is the first bandwidth information.
  • the terminal may report the first bandwidth information periodically, for example, once every 5 seconds.
  • periodic reporting it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
  • 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
  • the reporting condition may be that the terminal determines that the network bandwidth is less than or equal to 30 Mbps, or may be other forms of conditions, such as the terminal determines that the network bandwidth fluctuates greatly, which is not limited here.
  • the terminal may report the first bandwidth information through a network protocol represented by HTTP.
  • HTTP a network protocol represented by HTTP.
  • the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
  • the server determines, according to the network bandwidth reported by the terminal, that the network bandwidth of the terminal satisfies the third preset condition.
  • the server may determine the network bandwidth of the terminal according to the received network bandwidth, and when it is determined that the network bandwidth of the terminal meets the third preset condition, adjust the processing parameters to obtain a bit rate less than the first video. streaming video stream.
  • the server may determine the network bandwidth of the terminal according to the received network bandwidth, and record the network bandwidth of the terminal when it is determined that the network bandwidth of the terminal is less than or equal to 30 Mbps.
  • the server determines that the average network bandwidth within 10 seconds is less than or equal to 30 Mbps, the processing parameters are adjusted.
  • the average value of the network bandwidth of the terminal within 10 seconds is less than or equal to 30 Mbps, and 30 Mbps is referred to as the fifth preset value.
  • the fifth preset value may also be other values, such as 20Mbps, 25Mbps, 35Mbps, or 40Mbps, etc., which is not limited here.
  • the average value of the network bandwidth of the terminal within 10 seconds is less than or equal to 30 Mbps, which is the third preset condition. If the power consumption of the terminal satisfies the third preset condition, it means that the current network resources of the current terminal are insufficient to transmit the current video stream, or the current video stream is transmitted according to the current network resources, and the effect is not good. In this case, the processing parameters are adjusted to reduce the video stream. bit rate size.
  • the third preset condition may also be other conditions, for example, the terminal's network bandwidth is less than or equal to 30 Mbps, which is not specifically limited here.
  • the average value of the network bandwidth of the terminal within 10 seconds is less than or equal to 30 Mbps, or the network bandwidth is less than or equal to 30 Mbps, and 30 Mbps is referred to as the fifth preset value.
  • the fifth preset value is a threshold of the network bandwidth of the terminal. When the network bandwidth of the terminal is not higher than the threshold, it means that the network bandwidth of the terminal is in a state of being too low, and it may be necessary to reduce the bandwidth of the video stream. code rate.
  • the server reduces the Fov angle size and the preset bit rate to obtain a second video stream.
  • the server determines that the power consumption of the terminal satisfies the third preset condition, it determines that the network bandwidth of the terminal is insufficient to transmit the current video stream, and needs to reduce the bit rate of the video stream to match the current network.
  • the server reduces the Fov angle size, reduces the preset code rate, and processes the slice source data according to the adjusted Fov angle size and the preset code rate to obtain the second video stream.
  • the bit rate of the second video stream is smaller than the bit rate of the first video stream.
  • the reduced Fov angle and the reduced preset code rate are called the first target processing parameter.
  • the Fov angle may be set as 90 ⁇ 90
  • the preset code rate may be set as the first target code rate
  • the size of the first target code rate is equal to the product of the first bandwidth information and the preset ratio. That is, in this embodiment, the first target processing parameter is the Fov angle size of 90 ⁇ 90 and the size is the preset code rate of the first target code rate.
  • the server intercepts the VR spherical high-definition picture at 90 ⁇ 90, and then encodes the intercepted picture according to the first target bit rate to obtain the second video stream.
  • the average value of the first bandwidth information within 10 seconds may also be taken, and the product of the average value and the preset ratio may be taken as the first target code rate.
  • the average value of the first bandwidth information within 10 seconds is referred to as the fourth time period.
  • the fourth time period may also have other durations, such as 5 seconds, 8 seconds, 12 seconds, or 15 seconds. seconds, etc., which are not limited here.
  • the average value of the first bandwidth information in the fourth time period is referred to as the first bandwidth average value.
  • the preset ratio may be any value from 0 to 100%, such as 50%, 40% or 60%, which is not limited here.
  • the first target bit rate may also be a fixed value, such as 20 Mbps, 25 Mbps, or 30 Mbps, which is not limited here.
  • the second video stream contains less high-definition data than the first video stream.
  • the preset bit rate of the first target processing parameter is smaller than the preset bit rate of the initial processing parameter, then the bit rate of the second video stream is smaller than the bit rate of the first video stream.
  • step 1406 may reduce the frame rate for the server, and the first target processing parameter may be a frame rate of 100 frames per second, which is not limited here.
  • the server sends the second video stream to the terminal.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • steps 1407-1408 refer to steps 207-208 in the embodiment shown in FIG. 2, and details are not repeated here.
  • the second video stream contains less high-definition data than the first video stream.
  • the preset bit rate of the second video stream is smaller than that of the first video stream, and the second video stream has a smaller bit rate than the first video stream.
  • the bit rate of the video stream sent to the terminal is reduced on the server side, thereby realizing adaptation to the current network bandwidth.
  • the processing parameter is the Fov angle size:
  • FIG. 15 is a flowchart of a method for adjusting a code rate according to an embodiment of the present application.
  • the flow of the method for adjusting the code rate provided by the embodiment of the present application includes:
  • steps 1501-1505 refer to steps 1401-1405 in the implementation example of FIG. 14, and details are not repeated here.
  • the server reduces the size of the Fov angle to obtain a second video stream.
  • the server may reduce the bit rate of the video stream by reducing the Fov angle size.
  • the reduced Fov angle is referred to as the first target processing parameter.
  • the size of the Fov angle can be set as 90 ⁇ 90. That is, in this embodiment, the first target processing parameter is the Fov angle size of 90 ⁇ 90.
  • the server intercepts the VR spherical high-definition picture at 90 ⁇ 90, and then performs corresponding processing to obtain the second video stream.
  • the bit rate of the second video stream is smaller than the bit rate of the first video stream.
  • bit rate of the video stream in addition to the Fov angle, other processing parameters can also be adjusted to adjust the bit rate of the video stream, such as preset bit rate, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, Resolution, quantization parameter QP or key frame period GOP, etc., are not limited here.
  • step 205 For the description of the first preset condition, refer to step 205 in the example implementation example in FIG. 2 , which will not be repeated here.
  • the server sends the second video stream to the terminal.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • steps 1507-1508 refer to steps 207-208 in the embodiment shown in FIG. 2, and details are not repeated here.
  • the second video stream contains less high-definition data than the first video stream. Under other conditions being the same, the bit rate of the second video stream will be smaller than the bit rate of the first video stream.
  • the processing parameter is the preset bit rate:
  • FIG. 16 is a flowchart of a method for adjusting a code rate according to an embodiment of the present application.
  • the processing parameter is the preset code rate
  • the process of the method for adjusting the code rate provided by the embodiment of the present application includes:
  • steps 1601-1605 refer to steps 1401-1405 in the implementation example of FIG. 14, and details are not repeated here.
  • the server reduces the preset bit rate to obtain a second video stream.
  • the server may reduce the code rate of the video stream by reducing the preset code rate.
  • the reduced preset code rate is called the first target processing parameter.
  • the preset code rate may be set as the first target code rate, and the size of the first target code rate is equal to the product of the first bandwidth information and the preset rate. That is, in this embodiment, the first target processing parameter is a preset code rate whose size is the first target code rate.
  • the server encodes the slice source data according to the first target bit rate, and obtains the second video stream.
  • the average value of the first bandwidth information within 10 seconds may also be taken, and the product of the average value and the preset ratio may be taken as the first target code rate.
  • the average value of the first bandwidth information within 10 seconds is referred to as the fourth time period.
  • the fourth time period may also have other durations, such as 5 seconds, 8 seconds, 12 seconds, or 15 seconds. seconds, etc., which are not limited here.
  • the average value of the first bandwidth information in the fourth time period is referred to as the first bandwidth average value.
  • the preset ratio may be any value from 0 to 100%, such as 50%, 40% or 60%, which is not limited here.
  • the first target bit rate may also be a fixed value, such as 20 Mbps, 25 Mbps, or 30 Mbps, which is not limited here.
  • the code rate of the second video stream is smaller than the code rate of the first video stream.
  • processing parameters can also be adjusted to adjust the bit rate of the video stream, such as the Fov angle, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, resolution rate, quantization parameter QP or key frame period GOP, etc., which are not limited here.
  • the server sends the second video stream to the terminal.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • steps 1607-1608 refer to steps 207-208 in the embodiment shown in FIG. 2, and details are not repeated here.
  • the bit rate of the second video stream Since the preset bit rate of the second video stream is smaller than that of the first video stream, under other conditions being the same, the bit rate of the second video stream will be smaller than that of the first video stream.
  • FIG. 17 is a flowchart of a method for adjusting a code rate according to an embodiment of the present application.
  • the flowchart of a method for adjusting a code rate provided by the embodiment of the present application includes:
  • steps 1701-1705 refer to steps 1401-1405 in the embodiment shown in FIG. 14, and details are not repeated here.
  • the server obtains the second video stream according to the first bandwidth information.
  • the server may determine the first target code rate according to the first bandwidth information, and the size of the first target code rate is equal to the product of the first bandwidth information and a preset ratio.
  • the first target code rate is used as the preset code rate; when the first target code rate is greater than 30 Mbps, 30 Mbps is used as the preset code rate.
  • the server encodes the slice source data according to the preset bit rate, and obtains the second video stream.
  • 30 Mbps is used as a threshold for determining the preset bit rate.
  • the preset code rate is the threshold; when the first target code rate is lower than the threshold, the preset code rate is the first target code rate.
  • 30 Mbps is only an example of the threshold, and does not limit the threshold, which can also be 25 Mbps, 35 Mbps, etc., which is not limited here.
  • the average value of the first bandwidth information within 10 seconds may also be taken, and the product of the average value and the preset ratio may be taken as the first target code rate.
  • the average value of the first bandwidth information within 10 seconds is referred to as the fourth time period.
  • the fourth time period may also have other durations, such as 5 seconds, 8 seconds, 12 seconds, or 15 seconds. seconds, etc., which are not limited here.
  • the average value of the first bandwidth information in the fourth time period is referred to as the first bandwidth average value.
  • the preset ratio may be any value from 0 to 100%, such as 50%, 40% or 60%, which is not limited here.
  • the server sends the second video stream to the terminal.
  • the terminal decodes the second video stream, and outputs playback data to the user.
  • steps 1407-1408 refer to steps 207-208 in the embodiment shown in FIG. 2, and details are not repeated here.
  • the terminal reports the second bandwidth information to the server.
  • the terminal acquires the network bandwidth of the terminal, and the network bandwidth of the terminal represents the network resources of the terminal.
  • the network bandwidth reported at this time is the second bandwidth information.
  • the terminal may report the second bandwidth information periodically, for example, once every 5 seconds.
  • periodic reporting it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
  • 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
  • the terminal may report the second bandwidth information through a network protocol represented by HTTP.
  • HTTP a network protocol represented by HTTP.
  • the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
  • the terminal determines a second target code rate according to the second bandwidth information.
  • the server may determine the second target code rate according to the second bandwidth information, and the size of the second target code rate is equal to the product of the second bandwidth information and the preset ratio.
  • the average value of the second bandwidth information within 10 seconds may also be taken, and the product of the average value and the preset ratio may be taken as the second target code rate.
  • the average value of the second bandwidth information within 10 seconds, 10 seconds is called the fifth time period.
  • the fifth time period may also have other durations, such as 5 seconds, 8 seconds, 12 seconds, or 15 seconds. seconds, etc., which are not limited here.
  • the average value of the second bandwidth information in the fifth time period is referred to as the second bandwidth average value.
  • the preset ratio may be any value from 0 to 100%, such as 50%, 40% or 60%, which is not limited here.
  • the terminal obtains a third video stream according to the second target bit rate.
  • the second target code rate is used as the preset code rate; when the second target code rate is greater than 30 Mbps, 30 Mbps is used as the preset code rate.
  • the server encodes the slice source data according to the preset bit rate, and obtains the second video stream.
  • 30 Mbps is used as a threshold for determining the preset bit rate.
  • the preset code rate is the threshold; when the second target code rate is lower than the threshold, the preset code rate is the second target code rate.
  • 30 Mbps is only an example of the threshold, and does not limit the threshold, which can also be 25 Mbps, 35 Mbps, etc., which is not limited here.
  • the server sends a third video stream to the terminal.
  • the terminal decodes the third video stream, and outputs playback data to the user.
  • steps 1712-1713 refer to steps 512-513 in the embodiment shown in FIG. 5, and details are not repeated here.
  • the target bit rate can adjust the bandwidth of the video stream in real time according to the changing network bandwidth, so as to realize the real-time matching between the video stream bit rate and the network bandwidth, and fully ensure that the video stream transmission is not stuck in the early stage. utilizes network bandwidth.
  • FIG. 18 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 1800 may include one or more central processing units (CPUs) 1801 and memory 1805 .
  • the memory 1805 stores one or more application programs or data.
  • the memory 1805 may be volatile storage or persistent storage.
  • a program stored in memory 1805 may include one or more modules, each of which may include a series of instructions to operate on the server.
  • the central processing unit 1801 may be configured to communicate with the memory 1805 to execute a series of instruction operations in the memory 1805 on the server 1800 .
  • Server 1800 may also include one or more power supplies 1802, one or more wired or wireless network interfaces 1803, one or more transceiver interfaces 1804, and/or, one or more operating systems, such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM, etc.
  • operating systems such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM, etc.
  • the server 1800 may perform the operations performed by the servers in the foregoing embodiments shown in FIG. 2 to FIG. 17 , and details are not repeated here.
  • FIG. 19 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • the terminal 1900 may include one or more central processing units (CPUs) 1601 and memory 1905 .
  • the memory 1905 stores one or more application programs or data.
  • the memory 1905 may be volatile storage or persistent storage.
  • the program stored in the memory 1905 may include one or more modules, and each module may include a series of instruction operations on the terminal.
  • the central processing unit 1901 may be configured to communicate with the memory 1905 to execute a series of instruction operations in the memory 1905 on the server 1900.
  • Terminal 1900 may also include one or more power supplies 1902, one or more wired or wireless network interfaces 1903, one or more transceiver interfaces 1904, and/or, one or more operating systems, such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM, etc.
  • operating systems such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM, etc.
  • the terminal 1900 can perform the operations performed by the terminal in the foregoing embodiments shown in FIG. 2 to FIG. 17 , and details are not repeated here.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may 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 application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Graphics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

Disclosed is a method for adjusting the power consumption of a terminal, which method is used for adjusting the power consumption of a terminal when the terminal is in a used state. The method in the embodiments of the present application comprises: a terminal reporting, to a server, first power-consumption-related information that indicates the power consumption of the terminal; and the server determining and implementing the adjustment of the size of a bit rate according to the first power-consumption-related information, wherein the bit rate is the bit rate of a video stream sent to the terminal, such that the bit rate of the video stream after adjustment is different from that of the video stream before adjustment, thereby adjusting the power consumption of the terminal.

Description

调整终端功耗的方法、码率的调整方法及相关设备Method for adjusting power consumption of terminal, method for adjusting code rate and related equipment
本申请要求于2020年11月30日提交中国专利局、申请号为202011377224.6、发明名称为“调整终端功耗的方法、码率的调整方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on November 30, 2020 with the application number 202011377224.6 and the invention titled "Method for Adjusting Terminal Power Consumption, Method for Adjusting Code Rate and Related Equipment", all of which The contents are incorporated herein by reference.
技术领域technical field
本申请实施例涉及数据处理领域,尤其涉及调整终端功耗的方法、码率的调整方法、调整码率的设备以及存储介质。The embodiments of the present application relate to the field of data processing, and in particular, to a method for adjusting power consumption of a terminal, a method for adjusting a code rate, a device for adjusting a code rate, and a storage medium.
背景技术Background technique
多媒体虚拟场景技术包括虚拟现实(virtual reality,VR)、增强现实(augmented reality,AR)和混合现实(mixed reality,MR)等技术。多媒体虚拟场景技术主要是在服务器产生视频流,发送给终端,终端对该视频流解码播放,实现虚拟场景在终端处的再现。Multimedia virtual scene technologies include technologies such as virtual reality (VR), augmented reality (AR), and mixed reality (MR). The multimedia virtual scene technology mainly generates a video stream on the server and sends it to the terminal, and the terminal decodes and plays the video stream to realize the reproduction of the virtual scene at the terminal.
由于某些多媒体虚拟场景的观影技术分辨率高,码率大。在终端播放视频流时,视频解码和渲染等对终端的处理资源消耗大,功耗高。导致终端在长时间使用的状态下容易出现发热发烫、视频卡顿或电量不足导致关机等现象。目前降低终端功耗的方式,主要是通过检测到用户未使用终端时关闭终端,从而实现功耗的降低。但是,当终端处于使用状态时,仍可能出现上述发热发烫、视频卡顿或电量不足导致关机等现象。Due to the high resolution and high bit rate of the viewing technology of some multimedia virtual scenes. When a terminal plays a video stream, video decoding and rendering consume a large amount of processing resources and power consumption of the terminal. As a result, when the terminal is used for a long time, it is prone to overheating, video freezes, or shutdown due to insufficient power. The current way to reduce the power consumption of the terminal is mainly to reduce the power consumption by turning off the terminal when it is detected that the user is not using the terminal. However, when the terminal is in use, the above-mentioned phenomena such as overheating, video freezes, or power-off due to insufficient power may still occur.
这种仅通过检测用户是否使用终端决定是否关闭终端,从而实现功耗降低的方式,功耗降低的程度有限,对终端功耗的调整方式单一。In this way, the power consumption is reduced only by detecting whether the user uses the terminal to decide whether to turn off the terminal. The degree of power consumption reduction is limited, and the adjustment method for the power consumption of the terminal is single.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种调整终端功耗的方法,用于在终端处于使用状态时调整终端功耗。The embodiment of the present application provides a method for adjusting the power consumption of a terminal, which is used to adjust the power consumption of the terminal when the terminal is in a use state.
本申请实施例第一方面提供了一种调整终端功耗的方法,该方法包括:服务器以第一码率向终端发送视频流。在发送视频流之后,服务器接收来自终端的第一功耗相关信息,第一功耗相关信息用于表示终端的功耗,终端的功耗与视频流的播放相关。服务器根据第一功耗相关信息,确定终端的功耗满足第一预设条件。确定终端的功耗满足第一预设条件之后,服务器以低于第一码率的第二码率向终端发送视频流。A first aspect of the embodiments of the present application provides a method for adjusting power consumption of a terminal. The method includes: a server sends a video stream to the terminal at a first bit rate. After sending the video stream, the server receives first power consumption related information from the terminal, where the first power consumption related information is used to represent the power consumption of the terminal, and the power consumption of the terminal is related to the playback of the video stream. The server determines, according to the first power consumption related information, that the power consumption of the terminal satisfies the first preset condition. After determining that the power consumption of the terminal satisfies the first preset condition, the server sends the video stream to the terminal at a second bit rate lower than the first bit rate.
在本申请实施例中,服务器以第一码率向终端发送视频流,在终端接收并播放视频流时,服务器接收终端发送的第一功耗相关信息,在服务器根据第一功耗相关信息终端的功耗满足第一预设条件,确定需要调整视频流的码率,以小于第一码率的第二码率向终端发送视频流。由于视频流的码率降低,终端播放视频流产生的功耗就会降低,从而实现对终端功耗的降低。因此可以避免终端在长时间使用的状态下出现的发热发烫、视频卡顿或电量不足导致关机等现象。相比于现有技术只能在终端未被用户使用的状态下降低功耗,实现了终端在使用状态下对终端功耗的降低。In this embodiment of the present application, the server sends a video stream to the terminal at a first bit rate, and when the terminal receives and plays the video stream, the server receives the first power consumption related information sent by the terminal, and the server sends the first power consumption related information to the terminal according to the first power consumption related information. The power consumption of the device satisfies the first preset condition, it is determined that the bit rate of the video stream needs to be adjusted, and the video stream is sent to the terminal at a second bit rate smaller than the first bit rate. Since the bit rate of the video stream is reduced, the power consumption generated by the terminal playing the video stream is reduced, thereby reducing the power consumption of the terminal. Therefore, it is possible to avoid phenomena such as overheating, video freezes, or shutdown caused by insufficient power when the terminal is used for a long time. Compared with the prior art, the power consumption of the terminal can only be reduced when the terminal is not used by the user, thereby reducing the power consumption of the terminal when the terminal is in use.
结合第一方面,本申请实施例第一方面的第一种实施方式中,第一功耗相关信息包括 终端的中央处理器(central processing unit,CPU)占用率,服务器根据第一功耗相关信息确定终端的功耗满足第一预设条件,包括:服务器根据接收到的终端的CPU占用率,确定终端的CPU占用率大于或等于第一预设值。With reference to the first aspect, in the first implementation manner of the first aspect of the embodiments of the present application, the first power consumption related information includes the central processing unit (CPU) occupancy rate of the terminal, and the server according to the first power consumption related information Determining that the power consumption of the terminal satisfies the first preset condition includes: the server determining, according to the received CPU occupancy rate of the terminal, that the CPU occupancy rate of the terminal is greater than or equal to the first preset value.
在本申请实施例中,终端的功耗满足第一预设条件,意味着终端处于功耗过高的状态,需要降低终端的功耗。具体的,在本实施方式中,第一预设条件可以包括终端的CPU占用率大于或等于第一预设值。除了终端的CPU占用率,其他的终端功耗信息也可以满足第一预设条件,例如终端的剩余电量小于或等于第二预设值等,此处不作限定。In the embodiment of the present application, the power consumption of the terminal satisfies the first preset condition, which means that the terminal is in a state of excessive power consumption, and the power consumption of the terminal needs to be reduced. Specifically, in this embodiment, the first preset condition may include that the CPU occupancy rate of the terminal is greater than or equal to the first preset value. In addition to the CPU occupancy rate of the terminal, other terminal power consumption information may also satisfy the first preset condition, for example, the remaining power of the terminal is less than or equal to the second preset value, etc., which is not limited here.
在本申请实施例中,服务器根据接收到的终端的CPU占用率,确定终端的CPU占用率过高,降低视频流的码率,从而实现对终端CPU占用率的降低。实现了对终端的CPU占用率的调节。In the embodiment of the present application, the server determines that the CPU occupancy rate of the terminal is too high according to the received CPU occupancy rate of the terminal, and reduces the bit rate of the video stream, thereby reducing the CPU occupancy rate of the terminal. It realizes the adjustment of the CPU occupancy rate of the terminal.
结合第一方面或第一方面的第一种实施方式,本申请实施例第一方面的第二种实施方式中,第一功耗相关信息包括终端的CPU占用率,终端可以上报多个第一功耗相关信息,多个第一功耗相关信息表示终端在不同时刻的功耗,服务器根据第一功耗相关信息确定终端的功耗满足第一预设条件,包括:服务器根据接收到的多个不同时刻的CPU占用率,确定终端的CPU占用率在第一时段内的平均值大于或等于第一预设值。In combination with the first aspect or the first implementation manner of the first aspect, in the second implementation manner of the first aspect of the embodiments of the present application, the first power consumption related information includes the CPU occupancy rate of the terminal, and the terminal may report a plurality of first power consumption related information. Power consumption related information, a plurality of first power consumption related information represents the power consumption of the terminal at different times, and the server determines, according to the first power consumption related information, that the power consumption of the terminal meets the first preset condition, including: the server according to the received multiple power consumption related information. The CPU occupancy rate at different times is determined to be an average value of the CPU occupancy rate of the terminal in the first period of time greater than or equal to the first preset value.
在本申请实施例中,根据第一时段内多个CPU占用率的平均值,调整视频流的码率。可以防止因CPU占用率异常波动导致的,对视频流码率的不当调节。例如终端当前的CPU资源足以处理接收到的视频流,但CPU占用率因偶发事件出现瞬间增高,又马上恢复正常。这种情况下并不需要调整对终端的CPU资源的占用,也就不需要调整视频流的码率。根据CPU占用率的平均值调整视频流的码率,可以避免因瞬间增高的CPU占用率导致的,对视频流码率的不当调节。In this embodiment of the present application, the bit rate of the video stream is adjusted according to the average value of multiple CPU occupancy rates in the first period. It can prevent improper adjustment of the video stream bit rate caused by abnormal fluctuations in CPU usage. For example, the current CPU resources of the terminal are sufficient to process the received video stream, but the CPU usage increases instantaneously due to occasional events, and then returns to normal immediately. In this case, it is not necessary to adjust the occupancy of the CPU resources of the terminal, and it is also not necessary to adjust the bit rate of the video stream. Adjusting the bit rate of the video stream according to the average value of the CPU usage can avoid improper adjustment of the bit rate of the video stream caused by the instantaneously increased CPU usage.
结合第一方面、第一方面的第一种实施方式或第二种实施方式,本申请实施例第一方面的第三种实施方式中,第一功耗相关信息包括终端的剩余电量,服务器根据第一功耗相关信息确定终端的功耗满足第一预设条件,包括:服务器根据接收到的终端的剩余电量,确定终端的剩余电量小于或等于第二预设值。In combination with the first aspect, the first implementation manner or the second implementation manner of the first aspect, in the third implementation manner of the first aspect of the embodiments of the present application, the first power consumption related information includes the remaining power of the terminal, and the server according to Determining that the power consumption of the terminal satisfies the first preset condition by the first power consumption related information includes: the server determines that the remaining power of the terminal is less than or equal to the second preset value according to the received remaining power of the terminal.
在本申请实施例中,服务器根据接收到的终端的剩余电量,确定终端的剩余电量过低,降低视频流的码率,从而实现根据终端的剩余电量对视频流的调节,以延长终端的使用时间。In the embodiment of the present application, the server determines that the remaining power of the terminal is too low according to the received remaining power of the terminal, and reduces the bit rate of the video stream, so as to realize the adjustment of the video stream according to the remaining power of the terminal, so as to prolong the use of the terminal time.
结合第一方面的第三种实施方式,本申请实施例第一方面的第四种实施方式中,第一功耗相关信息包括终端在第一时刻的剩余电量和第二时刻的剩余电量,第一时刻早于第二时刻,服务器根据第一功耗相关信息确定终端的功耗满足第一预设条件,还包括:服务器确定终端的剩余电量处于不变或下降趋势,即后一时刻的剩余电量的值,大于或等于前一时刻的剩余电量的值,具体的:服务器可以根据接收到的终端的剩余电量,确定终端在第一时刻的剩余电量大于或等于第二时刻的剩余电量。In combination with the third implementation of the first aspect, in the fourth implementation of the first aspect of the embodiments of the present application, the first power consumption related information includes the remaining power of the terminal at the first moment and the remaining power at the second moment, and the At a moment earlier than a second moment, the server determines that the power consumption of the terminal satisfies the first preset condition according to the first power consumption related information, and further includes: the server determines that the remaining power of the terminal is in a constant or decreasing trend, that is, the remaining power at a later moment The value of the power is greater than or equal to the value of the remaining power at the previous moment. Specifically, the server may determine that the remaining power of the terminal at the first moment is greater than or equal to the remaining power at the second moment according to the received remaining power of the terminal.
在本申请实施例中,在确定终端剩余电量小于或等于第二预设值的情况下,确定终端的剩余电量是否处于不变或下降趋势,处于不变或下降趋势则表明终端的电量可能正在减小,据此确定需要降低视频流的码率从而降低终端的功耗。因此就能保证在终端处于充电 的状态下,还能以高码率,即第一码率接收视频流,保证了终端向用户输出的播放数据的视频质量。In this embodiment of the present application, in the case where it is determined that the remaining power of the terminal is less than or equal to the second preset value, it is determined whether the remaining power of the terminal is in a constant or decreasing trend, and the constant or decreasing trend indicates that the power of the terminal may be Decrease, according to this, it is determined that the bit rate of the video stream needs to be reduced to reduce the power consumption of the terminal. Therefore, it can be ensured that when the terminal is in a charging state, the video stream can be received at a high bit rate, that is, the first bit rate, and the video quality of the playback data output by the terminal to the user is guaranteed.
结合第一方面、第一方面的第一种实施方式至第四种实施方式中的任一种,本申请实施例第一方面的第五种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之前,还包括:服务器减小视场(field of view,Fov)角度大小。With reference to the first aspect and any one of the first to fourth implementations of the first aspect, in the fifth implementation of the first aspect of the embodiments of the present application, the server uses a code rate lower than the first code rate. Before the second bit rate sends the video stream to the terminal, the method further includes: the server reduces the size of the field of view (field of view, Fov) angle.
在本申请实施例中,减小Fov角度大小,即可减少视频流中所包括的高清数据的量,从而降低终端对视频流进行解码、渲染等处理时消耗或占用的功耗。In this embodiment of the present application, reducing the size of the Fov angle can reduce the amount of high-definition data included in the video stream, thereby reducing the power consumption or occupied by the terminal when decoding and rendering the video stream.
结合第一方面、第一方面的第一种实施方式至第五种实施方式中的任一种,本申请实施例第一方面的第六种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之前,还包括:服务器降低视频流的码率,并根据该码率获取视频流。此处的码率为获取视频流的一个预设值,也称为预设码率。当服务器确定终端功耗过大,可以通过降低预设码率,实现对视频流码率的降低。With reference to the first aspect and any one of the first to fifth implementations of the first aspect, in the sixth implementation of the first aspect of the embodiments of this application, the server uses a code rate lower than the first code rate. Before sending the video stream to the terminal at the second bit rate, the method further includes: the server reduces the bit rate of the video stream, and acquires the video stream according to the bit rate. The bit rate here is a preset value for obtaining a video stream, which is also called a preset bit rate. When the server determines that the power consumption of the terminal is too large, the preset bit rate can be reduced to reduce the bit rate of the video stream.
结合第一方面、第一方面的第一种实施方式至第六种实施方式中的任一种,本申请实施例第一方面的第七种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之前,还包括:服务器降低峰均比、关键帧(intra picture,I)与参考帧(predictive picture,P)的比值、帧率、分辨率中的至少一项。降低这些参数中的任一项,都可导致视频流码率的减小。With reference to the first aspect and any one of the first to sixth implementations of the first aspect, in the seventh implementation of the first aspect of the embodiments of this application, the server uses a code rate lower than the first code rate. Before the second bit rate sends the video stream to the terminal, the method further includes: the server reduces at least one of a peak-to-average ratio, a ratio of a key frame (intra picture, I) to a reference frame (predictive picture, P), a frame rate, and a resolution . Decreasing any of these parameters can lead to a reduction in the bitrate of the video stream.
结合第一方面、第一方面的第一种实施方式至第七种实施方式中的任一种,本申请实施例第一方面的第八种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之前,还包括:还包括:服务器增大量化参数(quantitative parameters,QP)或关键帧周期(group of pictures,GOP)中的至少一项。增大这些参数中的任一项,都可导致视频流码率的降低。With reference to the first aspect and any one of the first to seventh implementations of the first aspect, in the eighth implementation of the first aspect of the embodiments of this application, the server uses a code rate lower than the first code rate. Before the second bit rate sends the video stream to the terminal, the method further includes: the server further includes: the server increases at least one of a quantization parameter (quantitative parameters, QP) or a key frame period (group of pictures, GOP). Increasing any of these parameters can lead to a reduction in the bit rate of the video stream.
结合第一方面、第一方面的第一种实施方式至第八种实施方式中的任一种,本申请实施例第一方面的第九种实施方式中,服务器接收来自终端的第二功耗相关信息,第二功耗相关信息用于表示终端的功耗。在服务器根据第二功耗相关信息确定终端的功耗满足第二预设条件的情况下,服务器以高于第二码率的第三码率向终端发送视频流。With reference to the first aspect and any one of the first implementation to the eighth implementation of the first aspect, in the ninth implementation of the first aspect of the embodiments of this application, the server receives the second power consumption from the terminal Related information, the second power consumption related information is used to represent the power consumption of the terminal. When the server determines that the power consumption of the terminal satisfies the second preset condition according to the second power consumption related information, the server sends the video stream to the terminal at a third bit rate higher than the second bit rate.
在本申请实施例中,根据第一功耗相关信息降低了视频流的码率,再根据第二功耗相关信息提升视频流的码率。在资源不够时对视频流码率降低之后,实现了当资源回到充足的状态的情况下,即终端的功耗满足第二预设条件的情况下,对视频流码率的提升,从而提升了向用户输出的播放数据的视频质量。In the embodiment of the present application, the bit rate of the video stream is reduced according to the first power consumption related information, and then the bit rate of the video stream is increased according to the second power consumption related information. After the video stream bit rate is reduced when the resources are insufficient, the video stream bit rate can be increased when the resources return to a sufficient state, that is, when the power consumption of the terminal satisfies the second preset condition, thereby increasing the video stream bit rate. the video quality of the playback data output to the user.
结合第一方面的第九种实施方式,本申请实施例第一方面的第十种实施方式中,第二功耗相关信息包括终端的CPU占用率,服务器根据第二功耗相关信息确定终端的功耗满足第二预设条件,包括:服务器根据接收到的终端的CPU占用率,确定终端的CPU占用率小于或等于第三预设值。With reference to the ninth implementation of the first aspect, in the tenth implementation of the first aspect of the embodiments of the present application, the second power consumption related information includes the CPU occupancy rate of the terminal, and the server determines the terminal's CPU occupancy rate according to the second power consumption related information. The power consumption meeting the second preset condition includes: the server determines, according to the received CPU occupancy rate of the terminal, that the CPU occupancy rate of the terminal is less than or equal to the third preset value.
在本申请实施例中,终端的功耗满足第二预设条件,表示终端不处于功耗过高的状态,可以提升终端的功耗。具体的,在本实施方式中,第二预设条件可以包括终端的CPU占用率小于或等于第三预设值。除了终端的CPU占用率,其他的终端功耗信息也可以满足第二 预设条件,例如终端的剩余电量大于或等于第四预设值等,此处不作限定。In the embodiment of the present application, the power consumption of the terminal satisfies the second preset condition, indicating that the terminal is not in a state of excessive power consumption, and the power consumption of the terminal can be improved. Specifically, in this embodiment, the second preset condition may include that the CPU occupancy rate of the terminal is less than or equal to the third preset value. In addition to the CPU occupancy rate of the terminal, other terminal power consumption information can also meet the second preset condition, for example, the remaining power of the terminal is greater than or equal to the fourth preset value, etc., which is not limited here.
结合第一方面的第九种实施方式,本申请实施例第一方面的第十一种实施方式中,第二功耗相关信息包括终端的CPU占用率,终端可以上报多个第二功耗相关信息,多个第二功耗相关信息表示终端在不同时刻的功耗,服务器根据第二功耗相关信息确定终端的功耗满足第二预设条件,包括:服务器根据接收到的多个不同时刻的CPU占用率,确定终端的CPU占用率在第二时段内的平均值小于或等于第三预设值。With reference to the ninth implementation manner of the first aspect, in the eleventh implementation manner of the first aspect of the embodiments of the present application, the second power consumption related information includes the CPU occupancy rate of the terminal, and the terminal may report multiple second power consumption related information. information, multiple pieces of second power consumption related information represent the power consumption of the terminal at different times, and the server determines, according to the second power consumption related information, that the power consumption of the terminal satisfies the second preset condition, including: the server according to the received multiple different times The CPU occupancy rate of the terminal is determined, and the average value of the CPU occupancy rate of the terminal in the second period is less than or equal to the third preset value.
结合第一方面的第九种实施方式,本申请实施例第一方面的第十二种实施方式中,第二功耗相关信息包括终端的剩余电量,服务器根据第二功耗相关信息确定终端的功耗满足第二预设条件,包括:服务器根据接收到的终端的剩余电量,确定终端的剩余电量大于或等于第四预设值。在本申请实施例中,第四预设值为终端的剩余电量的一个阈值,当终端的剩余电量不低于该阈值时,表示终端的剩余电量不处于过低的状态,可以提升终端的功耗。With reference to the ninth implementation of the first aspect, in the twelfth implementation of the first aspect of the embodiments of the present application, the second power consumption related information includes the remaining power of the terminal, and the server determines the terminal's power consumption according to the second power consumption related information. The power consumption meeting the second preset condition includes: the server determining, according to the received remaining power of the terminal, that the remaining power of the terminal is greater than or equal to a fourth preset value. In the embodiment of the present application, the fourth preset value is a threshold value of the remaining power of the terminal. When the remaining power of the terminal is not lower than the threshold, it means that the remaining power of the terminal is not too low, and the function of the terminal can be improved. consumption.
结合第一方面的第九种实施方式,本申请实施例第一方面的第十三种实施方式中,终端可以发送多个第二功耗相关信息,多个第二功耗相关信息表示终端在不同时刻的剩余电量,服务器根据第二功耗相关信息确定终端的功耗满足第二预设条件,包括:服务器确定终端的剩余电量不再减小,即剩余电量处于不变或上升的趋势。具体的,服务器根据接收到的终端在不同时刻的剩余电量,确定终端在第四时刻的剩余电量大于或等于第三时刻的剩余电量,第三时刻早于第四时刻。With reference to the ninth implementation manner of the first aspect, in the thirteenth implementation manner of the first aspect of the embodiments of the present application, the terminal may send multiple pieces of second power consumption related information, and the multiple pieces of second power consumption related information indicate that the terminal is in For the remaining power at different times, the server determines that the power consumption of the terminal satisfies the second preset condition according to the second power consumption related information. Specifically, the server determines, according to the received remaining power of the terminal at different times, that the remaining power of the terminal at the fourth time is greater than or equal to the remaining power of the third time, and the third time is earlier than the fourth time.
在本申请实施例中,当确定终端的剩余电量不再减小时,例如终端处于充电状态,确定终端可以继续播放高码率的视频流,从而提升视频流的码率。可以在剩余电量不减小的情况下,保证终端向用户输出的播放数据的视频质量。In the embodiment of the present application, when it is determined that the remaining power of the terminal is no longer reduced, for example, the terminal is in a charging state, it is determined that the terminal can continue to play a video stream with a high bit rate, thereby increasing the bit rate of the video stream. The video quality of the playback data output by the terminal to the user can be guaranteed without reducing the remaining power.
结合第一方面的第九种实施方式至第十三种实施方式中的任一种,本申请实施例第一方面的第十四种实施方式中,服务器以高于第二码率的第三码率向终端发送视频流之前,还包括:服务器增大视场Fov角度大小。With reference to any one of the ninth implementation manner to the thirteenth implementation manner of the first aspect, in the fourteenth implementation manner of the first aspect of the embodiments of the present application, the server uses a third code rate higher than the second code rate. Before the bit rate sends the video stream to the terminal, the method further includes: the server increases the Fov angle size of the field of view.
在本申请实施例中,增大Fov角度大小,即可增加视频流中所包括的高清数据的量,提升向用户输出的播放数据的视频质量。In the embodiment of the present application, by increasing the Fov angle size, the amount of high-definition data included in the video stream can be increased, and the video quality of the playback data output to the user can be improved.
结合第一方面的第九种实施方式至第十四种实施方式中的任一种,本申请实施例第一方面的第十五种实施方式中,服务器以高于第二码率的第三码率向终端发送视频流之前,还包括:服务器提升视频流的预设码率,并根据该码率获取视频流。此处的码率为获取视频流的一个预设值,也称为预设码率。服务器可以通过增大预设码率,实现对视频流码率的提升。With reference to any one of the ninth implementation manner to the fourteenth implementation manner of the first aspect, in the fifteenth implementation manner of the first aspect of the embodiments of the present application, the server uses a third code rate higher than the second code rate. Before the bit rate sends the video stream to the terminal, the method further includes: the server increases the preset bit rate of the video stream, and obtains the video stream according to the bit rate. The bit rate here is a preset value for obtaining a video stream, which is also called a preset bit rate. The server can increase the bit rate of the video stream by increasing the preset bit rate.
结合第一方面的第九种实施方式至第十五种实施方式中的任一种,本申请实施例第一方面的第十六种实施方式中,服务器以高于第二码率的第三码率向终端发送视频流之前,还包括:服务器增大峰均比、关键帧(intra picture,I)与参考帧(predictive picture,P)的比值、帧率、分辨率中的至少一项。增大这些参数中的任一项,都可导致视频流码率的升高。With reference to any one of the ninth implementation manner to the fifteenth implementation manner of the first aspect, in the sixteenth implementation manner of the first aspect of the embodiments of the present application, the server uses a third code rate higher than the second code rate. Before the bit rate sends the video stream to the terminal, it further includes: the server increases at least one of a peak-to-average ratio, a ratio of a key frame (intra picture, I) to a reference frame (predictive picture, P), a frame rate, and a resolution. Increasing any of these parameters can lead to an increase in the bit rate of the video stream.
结合第一方面的第九种实施方式至第十六种实施方式中的任一种,本申请实施例第一 方面的第十三种实施方式中,服务器以高于第二码率的第三码率向终端发送视频流之前,还包括:服务器减小量化参数(quantitative parameters,QP)或关键帧周期(group of pictures,GOP)中的至少一项。减小这些参数中的任一项,都可导致视频流码率的升高。With reference to any one of the ninth implementation manner to the sixteenth implementation manner of the first aspect, in the thirteenth implementation manner of the first aspect of the embodiments of the present application, the server uses a third code rate higher than the second code rate. Before the bit rate sends the video stream to the terminal, the method further includes: the server reduces at least one of a quantization parameter (quantitative parameters, QP) or a key frame period (group of pictures, GOP). Decreasing any of these parameters can lead to an increase in the bit rate of the video stream.
本申请实施例第二方面提供了一种调整终端功耗的方法,该方法包括:终端以第一码率接收来自服务器的视频流。终端向所述服务器发送第一功耗相关信息,第一功耗相关信息用于表示终端的功耗,终端的功耗与视频流的播放相关。在服务器根据第一功耗相关信息确定终端的功耗满足第一预设条件的情况下,终端以第二码率接收来自服务器的视频流,第二码率低于第一码率。A second aspect of the embodiments of the present application provides a method for adjusting power consumption of a terminal. The method includes: the terminal receives a video stream from a server at a first bit rate. The terminal sends first power consumption related information to the server, where the first power consumption related information is used to indicate the power consumption of the terminal, and the power consumption of the terminal is related to the playback of the video stream. When the server determines that the power consumption of the terminal satisfies the first preset condition according to the first power consumption related information, the terminal receives the video stream from the server at a second bit rate, which is lower than the first bit rate.
第二方面的有益效果参见第一方面,此处不再赘述。For the beneficial effects of the second aspect, refer to the first aspect, which will not be repeated here.
结合第二方面,本申请实施例第二方面的第一种实施方式中,第一功耗相关信息包括终端的CPU占用率,终端的功耗满足第一预设条件包括:终端的CPU占用率大于或等于第一预设值;或者,终端的CPU占用率在第一时段内的平均值大于或等于第一预设值。With reference to the second aspect, in the first implementation manner of the second aspect of the embodiments of the present application, the first power consumption related information includes the CPU occupancy rate of the terminal, and the power consumption of the terminal satisfying the first preset condition includes: the CPU occupancy rate of the terminal is greater than or equal to the first preset value; or, the average value of the CPU occupancy rate of the terminal in the first period of time is greater than or equal to the first preset value.
结合第二方面,本申请实施例第二方面的第二种实施方式中,第一功耗相关信息包括终端的剩余电量,终端的功耗满足第一预设条件包括:终端的剩余电量小于或等于第二预设值;或者,终端的剩余电量在下降,具体的,终端在第一时刻的剩余电量大于第二时刻的剩余电量,第一时刻早于第二时刻。With reference to the second aspect, in the second implementation manner of the second aspect of the embodiments of the present application, the first power consumption related information includes the remaining power of the terminal, and the power consumption of the terminal satisfying the first preset condition includes: the remaining power of the terminal is less than or is equal to the second preset value; or, the remaining power of the terminal is decreasing. Specifically, the remaining power of the terminal at the first moment is greater than the remaining power at the second moment, and the first moment is earlier than the second moment.
结合第二方面、第二方面的第一种实施方式至第二种实施方式中的任一种,本申请实施例第二方面的第三种实施方式中,服务器以低于所述第一码率的第二码率向终端发送视频流之后,还包括:终端向服务器发送第二功耗相关信息,第二功耗相关信息用于表示终端的功耗,终端的功耗与视频流的播放相关。在服务器根据第二功耗相关信息确定终端的功耗满足第二预设条件的情况下,终端以第三码率接收来自服务器的视频流,视频流具有第三码率,第三码率高于第一码率。With reference to the second aspect and any one of the first implementation to the second implementation of the second aspect, in the third implementation of the second aspect of the embodiments of the present application, the server uses a code lower than the first code After sending the video stream to the terminal at the second bit rate of the rate, the method further includes: the terminal sending second power consumption related information to the server, where the second power consumption related information is used to indicate the power consumption of the terminal, the power consumption of the terminal and the playback of the video stream. related. When the server determines according to the second power consumption related information that the power consumption of the terminal satisfies the second preset condition, the terminal receives the video stream from the server at the third bit rate, the video stream has the third bit rate, and the third bit rate is high at the first bit rate.
结合第二方面的第三种实施方式,本申请实施例第二方面的第四种实施方式中,第二功耗相关信息包括终端的CPU占用率,第二预设条件包括:终端的CPU占用率小于或等于第三预设值;或者,终端的CPU占用率在第二时段内的平均值小于或等于第三预设值。In combination with the third implementation of the second aspect, in the fourth implementation of the second aspect of the embodiments of the present application, the second power consumption related information includes the CPU occupancy rate of the terminal, and the second preset condition includes: the CPU occupation of the terminal The rate is less than or equal to the third preset value; or, the average value of the CPU occupancy rate of the terminal in the second period is less than or equal to the third preset value.
结合第二方面、第二方面的第一种实施方式至第四种实施方式中的任一种,本申请实施例第二方面的第五种实施方式中,第二功耗相关信息包括终端的剩余电量,第二预设条件包括:终端的剩余电量大于或等于第四预设值;或者,终端在第三时刻的剩余电量小于或等于第四时刻的剩余电量,第三时刻早于第四时刻。With reference to the second aspect and any one of the first to fourth implementations of the second aspect, in the fifth implementation of the second aspect of the embodiments of the present application, the second power consumption related information includes the Remaining power, the second preset condition includes: the remaining power of the terminal is greater than or equal to the fourth preset value; or, the remaining power of the terminal at the third time is less than or equal to the remaining power at the fourth time, and the third time is earlier than the fourth time. time.
本申请实施例还提供了一种码率的调整方法,用于根据网络带宽调整视频流的码率。The embodiment of the present application also provides a bit rate adjustment method, which is used to adjust the bit rate of the video stream according to the network bandwidth.
本申请实施例第三方面提供了一种码率的调整方法,该方法包括:服务器以第一码率向终端发送视频流。服务器接收来自终端的第一带宽信息,第一带宽信息用于表示终端的网络带宽。服务器根据第一带宽信息确定终端的网络带宽满足第三预设条件。服务器以低于第一码率的第二码率向终端发送视频流。A third aspect of the embodiments of the present application provides a method for adjusting a bit rate. The method includes: a server sends a video stream to a terminal at a first bit rate. The server receives the first bandwidth information from the terminal, where the first bandwidth information is used to indicate the network bandwidth of the terminal. The server determines, according to the first bandwidth information, that the network bandwidth of the terminal satisfies the third preset condition. The server sends the video stream to the terminal at a second bit rate lower than the first bit rate.
在本申请实施例中,在终端接收并播放具有第一码率的视频流时,服务器接收终端发送的第一带宽信息,在服务器根据第一带宽信息确定当前的网络带宽不足以承载视频流的传输时,确定需要调整视频流的码率,以小于第一码率的第二码率向终端发送视频流。由 于视频流的码率降低,当前的网络带宽就可以承载当前视频流的传输。因此可以避免网络带宽不足的状态下出现的卡顿、视频流丢包或视频流传输不及时等现象。In this embodiment of the present application, when the terminal receives and plays the video stream with the first bit rate, the server receives the first bandwidth information sent by the terminal, and the server determines, according to the first bandwidth information, that the current network bandwidth is insufficient to carry the video stream. During transmission, it is determined that the bit rate of the video stream needs to be adjusted, and the video stream is sent to the terminal at a second bit rate smaller than the first bit rate. Since the bit rate of the video stream is reduced, the current network bandwidth can carry the transmission of the current video stream. Therefore, it is possible to avoid phenomena such as freezing, video stream packet loss, or untimely video stream transmission occurring in the state of insufficient network bandwidth.
结合第三方面,本申请实施例第三方面的第一种实施方式中,第一带宽信息包括终端的网络带宽,服务器根据第一带宽信息确定终端的网络带宽满足第三预设条件,包括:服务器根据接收到的终端的网络带宽,确定终端的网络带宽小于或等于第五预设值;或者,服务器根据接收到的终端的网络带宽,确定终端的网络带宽在第三时段内的平均值小于或等于第五预设值。With reference to the third aspect, in the first implementation manner of the third aspect of the embodiments of the present application, the first bandwidth information includes the network bandwidth of the terminal, and the server determines according to the first bandwidth information that the network bandwidth of the terminal meets the third preset condition, including: According to the received network bandwidth of the terminal, the server determines that the network bandwidth of the terminal is less than or equal to the fifth preset value; or, according to the received network bandwidth of the terminal, the server determines that the average value of the network bandwidth of the terminal in the third time period is less than or equal to the fifth preset value; or equal to the fifth preset value.
在本申请实施例中,终端的网络带宽满足第三预设条件,表示视频流的传输可能大于终端的网络的承载能力,因此可能需要降低视频流的码率。具体的,在本实施方式中,第三预设条件可以包括终端的网络带宽小于或等于第五预设值。除了终端的网络带宽,其他的带宽信息也可以满足第三预设条件,例如终端的网络带宽在一定时段内的平均值小于或等于第五预设值等,此处不作限定。In the embodiment of the present application, the network bandwidth of the terminal satisfies the third preset condition, indicating that the transmission of the video stream may be greater than the carrying capacity of the network of the terminal, and therefore the bit rate of the video stream may need to be reduced. Specifically, in this embodiment, the third preset condition may include that the network bandwidth of the terminal is less than or equal to the fifth preset value. In addition to the network bandwidth of the terminal, other bandwidth information may also satisfy the third preset condition, for example, the average value of the network bandwidth of the terminal within a certain period is less than or equal to the fifth preset value, etc., which is not limited here.
在本申请实施例中,根据第三时段内多个网络带宽的平均值,调整视频流的码率。可以防止因网络带宽异常波动导致的,对视频流码率的不当调节。例如网络带宽因偶发事件出现瞬间降低,又马上恢复正常。这种情况下并不需要调整视频流的码率。根据网络带宽的平均值调整视频流的码率,可以避免因瞬间降低的网络带宽导致的,对视频流码率的不当调节。In this embodiment of the present application, the bit rate of the video stream is adjusted according to the average value of multiple network bandwidths in the third time period. It can prevent improper adjustment of video stream bit rate caused by abnormal fluctuation of network bandwidth. For example, the network bandwidth is momentarily reduced due to occasional events, and then returns to normal immediately. In this case, it is not necessary to adjust the bit rate of the video stream. Adjusting the bit rate of the video stream according to the average value of the network bandwidth can avoid improper adjustment of the bit rate of the video stream caused by the instantaneously reduced network bandwidth.
结合第三方面或第三方面的第一种实施方式,本申请实施例第三方面的第二种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之前,还包括:服务器减小视场(field of view,Fov)角度大小;或者服务器降低视频流的码率。此处的码率为获取视频流的一个预设值,也称为预设码率。当服务器确定视频流的码率过大,可以通过降低预设码率,实现对视频流码率的降低。With reference to the third aspect or the first implementation manner of the third aspect, in the second implementation manner of the third aspect of the embodiments of the present application, before the server sends the video stream to the terminal at a second bit rate lower than the first bit rate, It also includes: the server reduces the field of view (field of view, Fov) angle size; or the server reduces the bit rate of the video stream. The bit rate here is a preset value for obtaining a video stream, which is also called a preset bit rate. When the server determines that the bit rate of the video stream is too large, it can reduce the bit rate of the video stream by reducing the preset bit rate.
结合第三方面、第三方面的第一种实施方式至第二种实施方式中的任一种,本申请实施例第三方面的第三种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之前,还包括:服务器降低峰均比、关键帧(intra picture,I)与参考帧(predictive picture,P)的比值、帧率、分辨率中的至少一项。With reference to the third aspect and any one of the first implementation manner to the second implementation manner of the third aspect, in the third implementation manner of the third aspect of the embodiments of the present application, the server uses a code rate lower than the first code rate. Before the second bit rate sends the video stream to the terminal, the method further includes: the server reduces at least one of a peak-to-average ratio, a ratio of a key frame (intra picture, I) to a reference frame (predictive picture, P), a frame rate, and a resolution .
结合第三方面、第三方面的第一种实施方式至第三种实施方式中的任一种,本申请实施例第三方面的第四种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之前,还包括:服务器增大量化参数(quantitative parameters,QP)或关键帧周期(group of pictures,GOP)中的至少一项。With reference to the third aspect and any one of the first to third implementation manners of the third aspect, in the fourth implementation manner of the third aspect of the embodiments of the present application, the server uses a code rate lower than the first code rate. Before sending the video stream to the terminal at the second bit rate, the method further includes: the server increases at least one of a quantization parameter (quantitative parameters, QP) or a key frame period (group of pictures, GOP).
结合第三方面、第三方面的第一种实施方式至第四种实施方式中的任一种,本申请实施例第三方面的第五种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之前,还包括:服务器根据第一带宽信息确定第一目标码率,第一目标码率为第一带宽信息与预设比率的乘积。服务器根据第一目标码率降低视频流的预设码率。With reference to the third aspect and any one of the first to fourth implementation manners of the third aspect, in the fifth implementation manner of the third aspect of the embodiments of the present application, the server uses a code rate lower than the first code rate. Before the second bit rate sends the video stream to the terminal, the method further includes: the server determines a first target bit rate according to the first bandwidth information, where the first target bit rate is the product of the first bandwidth information and a preset ratio. The server reduces the preset bit rate of the video stream according to the first target bit rate.
在本申请实施例中,根据第一带宽信息降低视频流的码率,从而确定与当前网络最合适的码率。可以避免视频流的码率大于网络带宽导致的,卡顿、视频流丢包或视频流传输不及时等问题。In this embodiment of the present application, the bit rate of the video stream is reduced according to the first bandwidth information, so as to determine the most suitable bit rate for the current network. It can avoid the problems caused by the bit rate of the video stream being greater than the network bandwidth, such as freezing, packet loss of the video stream, or untimely transmission of the video stream.
结合第三方面、第三方面的第一种实施方式至第四种实施方式中的任一种,本申请实施例第三方面的第六种实施方式中,服务器可以接收多个第一带宽信息,多个第一带宽信息表示不同时刻终端的带宽信息。服务器以低于第一码率的第二码率向终端发送视频流之前,还包括:服务器根据多个第一带宽信息,确定第四时段内终端的网络带宽的平均值,该平均值称为第一带宽平均值。服务器根据第一带宽平均值确定第一目标码率,第一目标码率为第一带宽平均值与预设比率的乘积。服务器根据第一目标码率降低视频流的预设码率。With reference to the third aspect and any one of the first to fourth implementation manners of the third aspect, in the sixth implementation manner of the third aspect of the embodiments of the present application, the server may receive multiple pieces of first bandwidth information , and the multiple pieces of first bandwidth information represent bandwidth information of the terminal at different times. Before the server sends the video stream to the terminal at the second bit rate lower than the first bit rate, the method further includes: the server determines, according to a plurality of pieces of first bandwidth information, an average value of the network bandwidth of the terminal in the fourth period, and the average value is called The first bandwidth average. The server determines the first target code rate according to the first average bandwidth, where the first target code rate is the product of the first average bandwidth and a preset ratio. The server reduces the preset bit rate of the video stream according to the first target bit rate.
在本申请实施例中,通过第一带宽平均值来减小网络波动造成的,对视频流码率的过于频繁的调整。In the embodiment of the present application, the excessively frequent adjustment of the bit rate of the video stream caused by the network fluctuation is reduced by the first bandwidth average value.
结合第三方面、第三方面的第一种实施方式至第六种实施方式中的任一种,本申请实施例第三方面的第七种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之后,还包括:服务器接收来自终端的第二带宽信息,第二带宽信息用于表示终端的网络带宽。服务器根据第二带宽信息确定第二目标码率,第二目标码率为第二带宽信息与预设比率的乘积。服务器根据第二目标码率增大视频流的码率,并以高于第二码率的第三码率向终端发送视频流。此处的码率为获取视频流的一个预设值,也称为预设码率。当服务器确定终端的网络带宽可以承载更高码率的视频流,可以通过增大预设码率,实现对视频流码率的提升。With reference to the third aspect and any one of the first to sixth implementation manners of the third aspect, in the seventh implementation manner of the third aspect of the embodiments of the present application, the server uses a code rate lower than the first code rate. After the second bit rate sends the video stream to the terminal, the method further includes: the server receives second bandwidth information from the terminal, where the second bandwidth information is used to indicate the network bandwidth of the terminal. The server determines a second target code rate according to the second bandwidth information, where the second target code rate is the product of the second bandwidth information and a preset ratio. The server increases the bit rate of the video stream according to the second target bit rate, and sends the video stream to the terminal at a third bit rate higher than the second bit rate. The bit rate here is a preset value for obtaining a video stream, which is also called a preset bit rate. When the server determines that the network bandwidth of the terminal can carry a video stream with a higher bit rate, the video stream bit rate can be improved by increasing the preset bit rate.
在本申请实施例中,第二视频流的码率根据第二带宽信息与预设比率的乘积来确定,可以根据网络带宽的变化精确调整视频流的码率,选取合适的预设比率,即可最大化的利用网络带宽。In this embodiment of the present application, the bit rate of the second video stream is determined according to the product of the second bandwidth information and the preset ratio. Can maximize the use of network bandwidth.
结合第三方面、第三方面的第一种实施方式至第六种实施方式中的任一种,本申请实施例第三方面的第八种实施方式中,服务器以低于第一码率的第二码率向终端发送视频流之后,还包括:服务器接收来自终端的第二带宽信息,第二带宽信息用于表示终端的网络带宽。服务器可以接收多个第二带宽信息,多个第二带宽信息表示不同时刻终端的带宽信息。服务器根据多个第二带宽信息,确定第五时段内终端的网络带宽的平均值,该平均值称为第二带宽平均值。服务器根据第二带宽平均值确定第二目标码率,第二目标码率为第二带宽平均值与预设比率的乘积。服务器根据第二目标码率增大视频流的预设码率,并以高于第二码率的第三码率向终端发送视频流。With reference to the third aspect and any one of the first to sixth implementation manners of the third aspect, in the eighth implementation manner of the third aspect of the embodiments of the present application, the server uses a code rate lower than the first code rate. After the second bit rate sends the video stream to the terminal, the method further includes: the server receives second bandwidth information from the terminal, where the second bandwidth information is used to indicate the network bandwidth of the terminal. The server may receive multiple pieces of second bandwidth information, where the multiple pieces of second bandwidth information represent bandwidth information of the terminal at different times. The server determines the average value of the network bandwidth of the terminal in the fifth period according to the plurality of pieces of second bandwidth information, and the average value is called the second bandwidth average value. The server determines the second target code rate according to the second average bandwidth, where the second target code rate is the product of the second average bandwidth and the preset ratio. The server increases the preset bit rate of the video stream according to the second target bit rate, and sends the video stream to the terminal at a third bit rate higher than the second bit rate.
本申请实施例第四方面提供了一种码率的调整方法,该方法包括:终端以第一码率接收来自服务器的视频流。终端向服务器发送第一带宽信息,第一带宽信息用于表示终端的网络带宽。在终端的网络带宽满足第三预设条件的情况下,终端以第二码率接收来自服务器的视频流,第二码率低于第一码率。A fourth aspect of the embodiments of the present application provides a method for adjusting a bit rate. The method includes: a terminal receives a video stream from a server at a first bit rate. The terminal sends first bandwidth information to the server, where the first bandwidth information is used to indicate the network bandwidth of the terminal. In the case that the network bandwidth of the terminal satisfies the third preset condition, the terminal receives the video stream from the server at the second bit rate, and the second bit rate is lower than the first bit rate.
本申请实施例第四方面的有益效果参见第三方面,此处不再赘述。For the beneficial effects of the fourth aspect of the embodiments of the present application, refer to the third aspect, which will not be repeated here.
结合第四方面,本申请实施例第四方面的第一种实施方式中,第一带宽信息包括终端的网络带宽,终端的网络带宽满足第三预设条件包括:终端的网络带宽小于或等于第五预设值;或者,终端的网络带宽在第三时段内的平均值小于或等于第五预设值。With reference to the fourth aspect, in the first implementation manner of the fourth aspect of the embodiments of the present application, the first bandwidth information includes the network bandwidth of the terminal, and the network bandwidth of the terminal satisfying the third preset condition includes: the network bandwidth of the terminal is less than or equal to the third five preset values; or, the average value of the network bandwidth of the terminal in the third time period is less than or equal to the fifth preset value.
结合第四方面或第四方面的第一种实施方式,本申请实施例第四方面的第二种实施方 式中,终端以第二码率接收来自服务器的视频流之后,还包括:终端向服务器发送第二带宽信息,第二带宽信息用于表示终端的网络带宽;终端以第三码率接收来自服务器的视频流,第三码率高于第二码率。With reference to the fourth aspect or the first implementation manner of the fourth aspect, in the second implementation manner of the fourth aspect of the embodiments of the present application, after the terminal receives the video stream from the server at the second bit rate, the method further includes: sending the terminal to the server Send second bandwidth information, where the second bandwidth information is used to indicate the network bandwidth of the terminal; the terminal receives the video stream from the server at a third code rate, and the third code rate is higher than the second code rate.
本申请实施例第五方面提供了一种调整码率的设备,该设备包括:处理器和与处理器耦合的存储器。存储器用于存储可执行指令,可执行指令用于指示处理器执行前述第一方面的方法。A fifth aspect of the embodiments of the present application provides a device for adjusting a code rate, where the device includes: a processor and a memory coupled to the processor. The memory is used to store executable instructions, and the executable instructions are used to instruct the processor to perform the method of the foregoing first aspect.
本申请实施例第六方面提供了一种调整码率的设备,该设备包括:处理器和与处理器耦合的存储器。存储器用于存储可执行指令,可执行指令用于指示处理器执行前述第二方面的方法。A sixth aspect of the embodiments of the present application provides a device for adjusting a code rate, where the device includes: a processor and a memory coupled to the processor. The memory is used to store executable instructions, and the executable instructions are used to instruct the processor to perform the method of the aforementioned second aspect.
本申请实施例第七方面提供了一种调整码率的设备,该设备包括:处理器和与处理器耦合的存储器。存储器用于存储可执行指令,可执行指令用于指示处理器执行前述第三方面的方法。A seventh aspect of an embodiment of the present application provides a device for adjusting a code rate, where the device includes: a processor and a memory coupled to the processor. The memory is used to store executable instructions, and the executable instructions are used to instruct the processor to perform the method of the foregoing third aspect.
本申请实施例第八方面提供了一种调整码率的设备,该设备包括:处理器和与处理器耦合的存储器。存储器用于存储可执行指令,可执行指令用于指示处理器执行前述第四方面的方法。An eighth aspect of the embodiments of the present application provides a device for adjusting a code rate, where the device includes: a processor and a memory coupled to the processor. The memory is used to store executable instructions, and the executable instructions are used to instruct the processor to perform the method of the foregoing fourth aspect.
本申请实施例第九方面提供了一种计算机可读存储介质,该计算机可读存储介质中保存有程序,当所述计算机执行所述程序时,执行前述第一方面或第三方面所述的方法。A ninth aspect of an embodiment of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and when the computer executes the program, the first aspect or the third aspect described above is executed. method.
本申请实施例第十方面提供了一种计算机可读存储介质,该计算机可读存储介质中保存有程序,当所述计算机执行所述程序时,执行前述第二方面或第四方面所述的方法。A tenth aspect of an embodiment of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and when the computer executes the program, the computer-readable storage medium executes the second aspect or the fourth aspect. method.
本申请实施例第十一方面提供了一种计算机程序产品,当该计算机程序产品在计算机上执行时,所述计算机执行前述第一方面或第三方面所述的方法。An eleventh aspect of the embodiments of the present application provides a computer program product. When the computer program product is executed on a computer, the computer executes the method described in the first aspect or the third aspect.
本申请实施例第十二方面提供了一种计算机程序产品,当该计算机程序产品在计算机上执行时,所述计算机执行前述第二方面或第四方面所述的方法。A twelfth aspect of the embodiments of the present application provides a computer program product. When the computer program product is executed on a computer, the computer executes the method described in the foregoing second aspect or the fourth aspect.
附图说明Description of drawings
图1为服务器提供视频流的场景示意图;Fig. 1 is the scene schematic diagram that the server provides video stream;
图2为本申请实施例中调整终端功耗的方法一个流程图;2 is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图3为本申请实施例中调整终端功耗的方法另一流程图;3 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图4为本申请实施例中调整终端功耗的方法另一流程图;4 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图5为本申请实施例中调整终端功耗的方法另一流程图;5 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图6为本申请实施例中调整终端功耗的方法另一流程图;6 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图7为本申请实施例中调整终端功耗的方法另一流程图;7 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图8为本申请实施例中调整终端功耗的方法另一流程图;8 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图9为本申请实施例中调整终端功耗的方法另一流程图;FIG. 9 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图10为本申请实施例中调整终端功耗的方法另一流程图;10 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图11为本申请实施例中调整终端功耗的方法另一流程图;11 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图12为本申请实施例中调整终端功耗的方法另一流程图;12 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图13为本申请实施例中调整终端功耗的方法另一流程图;13 is another flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application;
图14为本申请实施例中码率的调整方法一个流程图;14 is a flowchart of a method for adjusting a code rate in an embodiment of the present application;
图15为本申请实施例中码率的调整方法另一流程图;FIG. 15 is another flowchart of a method for adjusting a code rate in an embodiment of the present application;
图16为本申请实施例中码率的调整方法另一流程图;16 is another flowchart of a method for adjusting a code rate in an embodiment of the present application;
图17为本申请实施例中码率的调整方法另一流程图;17 is another flowchart of a method for adjusting a code rate in an embodiment of the present application;
图18为本申请实施例中服务器一个结构示意图;18 is a schematic structural diagram of a server in an embodiment of the present application;
图19为本申请实施例中终端一个结构示意图。FIG. 19 is a schematic structural diagram of a terminal in an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供了一种调整终端功耗的方法,在终端处于使用状态时调整终端功耗。The embodiment of the present application provides a method for adjusting the power consumption of a terminal, which adjusts the power consumption of the terminal when the terminal is in a use state.
在本申请实施例中,终端的功耗表示终端功率或能量的消耗,是对接收到的数据进行处理所需要的或产生的资源,具体可以包括剩余电量或CPU占用率等。In this embodiment of the present application, the power consumption of the terminal represents the power or energy consumption of the terminal, which is a resource required or generated for processing received data, and may specifically include remaining power or CPU occupancy.
请参阅图1,图1为服务器提供向终端提供视频流的场景示意图。基于该场景,终端可将来自服务器的视频流处理后向用户播放。Please refer to FIG. 1 , which is a schematic diagram of a scenario in which a server provides a video stream to a terminal. Based on this scenario, the terminal can process the video stream from the server and play it to the user.
接下来对本申请实施例中出现的一些数据进行说明。片源数据为服务器获取的数据,视频流为服务器向终端发送的数据,播放数据为终端向用户输出的数据。Next, some data appearing in the examples of the present application will be described. The film source data is the data obtained by the server, the video stream is the data sent by the server to the terminal, and the playback data is the data output by the terminal to the user.
具体的,服务器获取片源数据,根据片源数据获取视频流,再向终端发送视频流。终端接收到视频流后对该视频流进行解码等处理,得到用于向用户输出的播放数据。Specifically, the server obtains slice source data, obtains a video stream according to the slice source data, and then sends the video stream to the terminal. After receiving the video stream, the terminal performs processing such as decoding the video stream to obtain playback data for output to the user.
在本申请实施例中,终端也称为用户设备(user equipment,UE)。In this embodiment of the present application, the terminal is also referred to as user equipment (user equipment, UE).
在本申请实施例中,除了解码,服务器还可以有其他对视频流的处理方法,例如渲染等,具体此处不做限定。In this embodiment of the present application, in addition to decoding, the server may also have other processing methods for the video stream, such as rendering, which is not specifically limited here.
终端处理视频流会产生功耗,为了防止终端功耗过高,在一个示例中,调整终端功耗的方式为检测终端的使用状态,当检测到未被用户使用时关闭终端。但该方法只能实现在终端处于未使用状态时降低终端功耗,当终端处于使用状态时,无法调整终端功耗。本申请实施例将提供一种数据处理方法,实现终端处于使用状态时,对终端功耗的调整。Processing video streams by a terminal will generate power consumption. To prevent excessive power consumption of the terminal, in an example, the method of adjusting the power consumption of the terminal is to detect the use state of the terminal, and turn off the terminal when it is detected that the terminal is not being used by the user. However, this method can only reduce the power consumption of the terminal when the terminal is not in use, and cannot adjust the power consumption of the terminal when the terminal is in use. The embodiment of the present application will provide a data processing method to realize the adjustment of the power consumption of the terminal when the terminal is in a use state.
本申请实施例中调整终端功耗的方式为:终端向服务器上报第一功耗相关信息,第一功耗相关信息用于表示终端的功耗,终端的功耗与终端对视频流的播放相关。服务器根据第一功耗相关信息确定并实现对码率大小的调整,码率为发送给终端的视频流的码率,使得调整后的视频流与调整前的视频流的码率不同。通过对视频流码率的调整实现对终端功耗的调整。The method for adjusting the power consumption of the terminal in the embodiment of the present application is as follows: the terminal reports the first power consumption related information to the server, and the first power consumption related information is used to indicate the power consumption of the terminal, and the power consumption of the terminal is related to the playback of the video stream by the terminal. . The server determines and adjusts the bit rate according to the first power consumption related information, and the bit rate is the bit rate of the video stream sent to the terminal, so that the bit rate of the adjusted video stream is different from that of the pre-adjusted video stream. The power consumption of the terminal is adjusted by adjusting the bit rate of the video stream.
在本申请实施例中,服务器根据第一功耗相关信息确定终端的功耗信息,当终端功耗信息满足第一预设条件时,触发调整视频流的码率。In the embodiment of the present application, the server determines the power consumption information of the terminal according to the first power consumption related information, and when the terminal power consumption information satisfies the first preset condition, triggers to adjust the bit rate of the video stream.
第一功耗相关信息用于表示终端的功耗。除了以CPU占用率为代表的,表示终端处理视频流所消耗资源的信息,第一功耗相关信息还可以是其他信息,此处不作限定。例如,第一功耗相关信息还可以是表示终端当前可用于处理视频流的资源,该资源可以是剩余电量。除了剩余电量,该资源还可以是网络带宽等其他资源,此处不作限定。接下来将对不同的第一功耗相关信息分别举例说明。The first power consumption related information is used to represent the power consumption of the terminal. In addition to the information that is represented by the CPU occupancy rate and represents the resources consumed by the terminal to process the video stream, the first power consumption related information may also be other information, which is not limited here. For example, the first power consumption related information may also be a resource indicating that the terminal is currently available for processing a video stream, and the resource may be the remaining power. In addition to the remaining power, the resource may also be other resources such as network bandwidth, which are not limited here. Next, different first power consumption related information will be illustrated by example.
一、第一功耗相关信息为CPU占用率。1. The first power consumption related information is the CPU occupancy rate.
在本申请实施例中,可以通过调整处理参数,实现对视频流码率的调整。In this embodiment of the present application, the video stream bit rate can be adjusted by adjusting processing parameters.
在本申请实施例中,服务器在接收第一状态信息前发送的视频流称为第一视频流,服务器在调整处理参数后获取的视频流称为第二视频流。第一视频流的码率大于第二视频流的码率,也就是说,本申请实施例通过对处理参数的调整,实现对视频流码率的调整,将视频流的码率调小,从而降低终端的功耗。In this embodiment of the present application, the video stream sent by the server before receiving the first state information is called the first video stream, and the video stream obtained by the server after adjusting the processing parameters is called the second video stream. The bit rate of the first video stream is greater than the bit rate of the second video stream, that is to say, the embodiment of the present application realizes the adjustment of the bit rate of the video stream by adjusting the processing parameters, and reduces the bit rate of the video stream, thereby reducing the bit rate of the video stream. Reduce the power consumption of the terminal.
在本申请实施例中,处理参数可分为初始处理参数和第一目标处理参数,初始处理参数为接收第一功耗相关信息前的处理参数,第一目标处理参数为调小后的处理参数。根据初始处理参数可获取第一视频流,根据第一目标处理参数可获取第二视频流。In this embodiment of the present application, the processing parameters can be divided into initial processing parameters and first target processing parameters. The initial processing parameters are processing parameters before receiving the first power consumption related information, and the first target processing parameters are the processing parameters after being reduced. . The first video stream can be obtained according to the initial processing parameters, and the second video stream can be obtained according to the first target processing parameters.
在本申请实施例中,处理参数可以是视场(field of view,Fov)角度大小。除了Fov角度大小,处理参数还有多种可能,例如、预设码率、峰均比、关键帧I与参考帧P的比值、帧率、分辨率、量化参数(quantization parameter,QP)或关键帧周期(group of pictures,GOP)等,具体此处不作限定。接下来将对不同的处理参数进行举例说明。In this embodiment of the present application, the processing parameter may be a field of view (field of view, Fov) angle size. In addition to the Fov angle, there are many possible processing parameters, such as preset bit rate, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, resolution, quantization parameter (QP) or key The frame period (group of pictures, GOP), etc., is not specifically limited here. The different processing parameters are exemplified next.
在本申请实施例中,作为处理参数的码率,为获取视频流的一个预设值,也称为预设码率。服务器可以通过调整预设码率,实现对视频流码率的调整。In this embodiment of the present application, the bit rate as a processing parameter is a preset value for obtaining a video stream, which is also referred to as a preset bit rate. The server can adjust the bit rate of the video stream by adjusting the preset bit rate.
1、处理参数为Fov角度大小和预设码率。1. The processing parameters are the Fov angle and the preset bit rate.
请参阅图2,图2为本申请实施例中调整终端功耗的方法的一个流程图。当第一状态信息为CPU占用率,调整的处理参数为Fov角度大小和预设码率时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 2 , which is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application. When the first state information is the CPU occupancy rate, and the adjusted processing parameters are the Fov angle and the preset bit rate, the process of the method for adjusting the power consumption of a terminal provided by the embodiment of the present application includes:
201、服务器获取片源数据。201. The server obtains the film source data.
在服务器接收到来自终端的播放指令的情况下,服务器可以获取片源数据。播放指令表示终端需要获取用于播放的视频流。When the server receives a play instruction from the terminal, the server can obtain the source data of the film. The play instruction indicates that the terminal needs to obtain the video stream for playing.
在本申请实施例中,获取片源数据还可以由其他条件触发,例如,触发条件还可以是服务器接收到来自终端的数据标识等,数据标识用于指示片源数据,具体此处不作限定。In this embodiment of the present application, obtaining slice source data may also be triggered by other conditions. For example, the trigger condition may also be that the server receives a data identifier from the terminal, etc. The data identifier is used to indicate slice source data, which is not specifically limited here.
202、服务器生成第一视频流,并向终端发送第一视频流。202. The server generates a first video stream, and sends the first video stream to the terminal.
服务器根据初始处理参数,对片源数据进行编码处理,以获取第一视频流。The server performs encoding processing on the slice source data according to the initial processing parameters to obtain the first video stream.
具体的,可以采用h264标准进行编码,除了h264,也可以采用h265等其他标准进行编码,此处不作限定。Specifically, the h264 standard may be used for encoding, and in addition to h264, other standards such as h265 may also be used for encoding, which is not limited here.
在本申请实施例中,初始处理参数的具体数值是:Fov角度大小为120×120,预设码率为30Mbps。In the embodiment of the present application, the specific values of the initial processing parameters are: the Fov angle size is 120×120, and the preset bit rate is 30 Mbps.
值得注意的是,初始处理参数的具体数值仅是对初始处理参数的举例,并不造成对初始处理参数的类型和数值的限定。初始处理参数也可以是其他类型和数值,例如,处理参数的类型为帧率,具体数值为每秒120帧等,此处不做限定。It should be noted that the specific values of the initial processing parameters are only examples of the initial processing parameters, and do not limit the types and values of the initial processing parameters. The initial processing parameter may also be of other types and values. For example, the type of the processing parameter is frame rate, and the specific value is 120 frames per second, etc., which is not limited here.
在本申请实施例中,除了编码,服务器还可以有其他获取视频流的处理方法,例如采样等,此处不做限定。In this embodiment of the present application, in addition to encoding, the server may also have other processing methods for acquiring video streams, such as sampling, which is not limited here.
在本申请实施例中,初始处理参数是服务器预设的处理参数,初始处理参数也可以有其他来源,具体此处不作限定。例如,初始处理参数可以是上一次的播放任务中,服务器 获取视频流所依据的处理参数。In this embodiment of the present application, the initial processing parameters are processing parameters preset by the server, and the initial processing parameters may also come from other sources, which are not specifically limited here. For example, the initial processing parameter may be the processing parameter on which the server obtains the video stream in the last play task.
获取第一视频流后,服务器向终端发送第一视频流。After acquiring the first video stream, the server sends the first video stream to the terminal.
具体的,服务器可以通过Box协议封装第一视频流后,通过基于HTTP的动态自适应流(dynamic adaptive streaming over HTTP,DASH)协议进行封包。在本申请实施例中,除了box协议,还可以通过其他协议封装视频流,例如传输流(transport stream,TS)协议等,此处不作限定。除了DASH协议,还可以通过其他协议进行封包,例如超文本传输协议实时流媒体(HTTP Live Streaming,HLS)协议等,此处不作限定。Specifically, the server may encapsulate the first video stream through the Box protocol, and then encapsulate the first video stream through the HTTP-based dynamic adaptive streaming (dynamic adaptive streaming over HTTP, DASH) protocol. In this embodiment of the present application, in addition to the box protocol, the video stream can also be encapsulated by other protocols, such as a transport stream (transport stream, TS) protocol, which is not limited here. In addition to the DASH protocol, other protocols can also be used for encapsulation, such as a hypertext transfer protocol real-time streaming (HTTP Live Streaming, HLS) protocol, which is not limited here.
具体的,服务器可以通过以超文本传输协议(hypertext transfer protocol,HTTP)为代表的网络协议发送视频流。除了HTTP,服务器也可通过其他协议发送,例如快速UDP网络连接(quick UDP internet connection,QUIC)协议等,此处不作限定。Specifically, the server may send the video stream through a network protocol represented by a hypertext transfer protocol (HTTP). In addition to HTTP, the server can also send through other protocols, such as the quick UDP internet connection (QUIC) protocol, etc., which are not limited here.
203、终端解码第一视频流,并向用户输出播放数据。203. The terminal decodes the first video stream, and outputs playback data to the user.
接收到第一视频流后,终端对第一视频流解码得到播放数据,并向用户输出播放数据。After receiving the first video stream, the terminal decodes the first video stream to obtain playback data, and outputs the playback data to the user.
输出播放数据具体可以是将播放数据显示在终端的屏幕上,屏幕用于用户接收来自终端的播放数据。终端还可以通过其他方式输出播放数据,例如将播放数据传输至用于向用户显示播放数据的模块或单元中,具体此处不作限定。Specifically, outputting the playing data may be displaying the playing data on the screen of the terminal, and the screen is used for the user to receive the playing data from the terminal. The terminal may also output the playback data in other ways, for example, transmitting the playback data to a module or unit for displaying the playback data to the user, which is not specifically limited here.
在本申请实施例中,除了解码,终端还可以通过其他方式处理第一视频流以获取播放数据,例如渲染等,具体此处不作限定。In this embodiment of the present application, in addition to decoding, the terminal may process the first video stream in other ways to obtain playback data, such as rendering, which is not specifically limited here.
204、终端向服务器上报CPU占用率。204. The terminal reports the CPU usage to the server.
处理接收到的视频流,会占用终端的CPU运行资源。此时终端获取CPU的占用率,CPU占用率表示终端处理接收到的视频流所消耗的资源。在本申请实施例中,此时上报的CPU占用率,即为第一功耗相关信息。Processing the received video stream will occupy the CPU running resources of the terminal. At this time, the terminal obtains the CPU occupancy rate, and the CPU occupancy rate represents the resources consumed by the terminal to process the received video stream. In this embodiment of the present application, the reported CPU occupancy rate at this time is the first power consumption related information.
具体的,终端可以采集多个CPU的平均占用率,当单个CPU占用过多时,可协调其他CPU核的处理资源来分担该CPU核的工作量,采集平均值可保证对多个CPU核的处理资源的合理使用,防止过度调节。Specifically, the terminal can collect the average occupancy rate of multiple CPUs. When a single CPU occupies too much, it can coordinate the processing resources of other CPU cores to share the workload of the CPU core. Collecting the average value can ensure the processing of multiple CPU cores. Reasonable use of resources to prevent over-regulation.
具体的,终端可以周期上报第一功耗相关信息,例如每5秒上报一次。除了周期上报,也可以通过其他方式上报,例如满足某上报条件时上报等,此处不作限定。Specifically, the terminal may report the first power consumption related information periodically, for example, once every 5 seconds. In addition to periodic reporting, it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
具体的,5秒仅是对上报周期的举例,上报周期还可以是10秒或12秒等,此处不作限定。Specifically, 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
具体的,上报条件可以是终端确定CPU占用率超过40%,也可以是其他形式的条件,例如终端确定剩余电量小于20%等,此处不作限定。Specifically, the reporting condition may be that the terminal determines that the CPU occupancy rate exceeds 40%, or may be other forms of conditions, for example, the terminal determines that the remaining power is less than 20%, etc., which is not limited here.
具体的,此处上报的CPU占用率,可能是终端处理第一视频流所产生的CPU占用率。也可能是处理在第一视频流之前或之后接收的视频流所产生的CPU占用率,只要处理的视频流是根据初始处理参数获取的即可,此处不做限定。对于终端来说,这些视频流的共同点体现在码率相同。Specifically, the CPU occupancy rate reported here may be the CPU occupancy rate generated by the terminal processing the first video stream. It may also be the CPU occupancy rate generated by processing the video stream received before or after the first video stream, as long as the processed video stream is obtained according to the initial processing parameters, which is not limited here. For the terminal, the common point of these video streams is that the bit rate is the same.
具体的,终端可以通过以HTTP为代表的网络协议上报第一功耗相关信息。除了HTTP,终端也可通过其他协议上报,例如传输控制协议(transmission control protocol,TCP)等,此处不作限定。Specifically, the terminal may report the first power consumption related information through a network protocol represented by HTTP. In addition to HTTP, the terminal can also report through other protocols, such as transmission control protocol (transmission control protocol, TCP), etc., which are not limited here.
205、服务器根据终端上报的CPU占用率确定终端的功耗满足第一预设条件。205. The server determines, according to the CPU occupancy rate reported by the terminal, that the power consumption of the terminal satisfies the first preset condition.
接收到终端上报的CPU占用率后,服务器可以根据CPU占用率确定终端的功耗,并在确定CPU占用率满足第一预设条件时,调整处理参数,以获取码率小于第一视频流的视频流。After receiving the CPU occupancy rate reported by the terminal, the server may determine the power consumption of the terminal according to the CPU occupancy rate, and when it is determined that the CPU occupancy rate meets the first preset condition, adjust the processing parameters to obtain a video stream with a bit rate lower than the first video stream. video stream.
在本申请实施例中,终端的功耗满足第一预设条件,表示终端处于功耗过高的状态,需要降低终端的功耗。具体的,在本实施例中,第一预设条件可以包括终端的CPU占用率大于或等于第一预设值。除了终端的CPU占用率,其他的终端功耗信息也可以满足第一预设条件,例如终端的剩余电量小于或等于第二预设值等,此处不作限定。In the embodiment of the present application, the power consumption of the terminal satisfies the first preset condition, indicating that the terminal is in a state of excessive power consumption, and the power consumption of the terminal needs to be reduced. Specifically, in this embodiment, the first preset condition may include that the CPU occupancy rate of the terminal is greater than or equal to the first preset value. In addition to the CPU occupancy rate of the terminal, other terminal power consumption information may also satisfy the first preset condition, for example, the remaining power of the terminal is less than or equal to the second preset value, etc., which is not limited here.
具体的,在本实施例中,由于第一功耗相关信息为CPU占用率,服务器可以根据接收到的CPU占用率确定终端的CPU占用率,并在确定CPU占用率大于或等于40%时开始计时。在从计时开始的30秒内记录终端的CPU占用率。当服务器确定30秒内的平均值大于或等于40%时,调整处理参数。也就是说,本实施例中的终端功耗为终端的CPU占用率。Specifically, in this embodiment, since the first power consumption related information is the CPU occupancy rate, the server may determine the CPU occupancy rate of the terminal according to the received CPU occupancy rate, and start when it is determined that the CPU occupancy rate is greater than or equal to 40% timing. The CPU usage of the terminal is recorded within 30 seconds from the timing. When the server determines that the average over 30 seconds is greater than or equal to 40%, the processing parameters are adjusted. That is to say, the power consumption of the terminal in this embodiment is the CPU occupancy rate of the terminal.
在本申请实施例中,终端的CPU占用率在30秒内的平均值大于或等于40%,40%称为第一预设值。在本申请实施例中,第一预设值为终端的CPU占用率的一个阈值,当终端的CPU占用率超过该阈值时,表示终端的CPU占用率过高,需要降低终端的CPU占用率。除了40%,第一预设值也可以是其他数值,例如30%、50%、60%、70%、80%或90%等,此处不作限定。In this embodiment of the present application, the average value of the CPU occupancy rate of the terminal within 30 seconds is greater than or equal to 40%, and 40% is referred to as the first preset value. In this embodiment of the present application, the first preset value is a threshold of the terminal's CPU occupancy. When the terminal's CPU occupancy exceeds the threshold, it means that the terminal's CPU occupancy is too high, and the terminal's CPU occupancy needs to be reduced. Besides 40%, the first preset value may also be other values, such as 30%, 50%, 60%, 70%, 80% or 90%, etc., which are not limited here.
在本申请实施例中,终端的CPU占用率在30秒内的平均值大于或等于40%,是第一预设条件。终端功耗满足第一预设条件表示当前终端用于处理视频流的资源不足以处理当前的视频流,或依据当前的资源处理当前的视频流,效果不好,此时调整处理参数以减小视频流的码率大小。除了CPU占用率在30秒内的平均值大于或等于40%,第一预设条件还可以是其他的条件,例如终端的剩余电量小于某一阈值且处于下降趋势等,具体此处不作限定。In this embodiment of the present application, the average value of the CPU occupancy rate of the terminal within 30 seconds is greater than or equal to 40%, which is the first preset condition. If the power consumption of the terminal satisfies the first preset condition, it means that the resources used by the current terminal for processing the video stream are insufficient to process the current video stream, or the current video stream is processed according to the current resources, and the effect is not good. In this case, the processing parameters are adjusted to reduce the The bitrate size of the video stream. In addition to the average CPU usage within 30 seconds being greater than or equal to 40%, the first preset condition may also be other conditions, such as the remaining power of the terminal is less than a certain threshold and is in a downward trend, which is not specifically limited here.
206、服务器减小Fov角度大小和预设码率,得到第二视频流。206. The server reduces the Fov angle size and the preset bit rate to obtain a second video stream.
服务器确定终端功耗满足第一预设条件时,确定终端功耗过高,需要调小终端的功耗。When the server determines that the power consumption of the terminal meets the first preset condition, it determines that the power consumption of the terminal is too high, and needs to reduce the power consumption of the terminal.
具体的,服务器通过调小视频流的码率实现对终端功耗的降低,并通过调整处理参数实现对视频流码率的调整。Specifically, the server reduces the power consumption of the terminal by reducing the bit rate of the video stream, and adjusts the bit rate of the video stream by adjusting the processing parameters.
具体的,服务器减小Fov角度大小,同时降低预设码率,并根据调整后的Fov角度大小和预设码率处理片源数据,得到第二视频流。第二视频流的码率小于第一视频流的码率。处理方式参见步骤202,此处不再赘述。Specifically, the server reduces the Fov angle size and the preset bit rate, and processes the source data according to the adjusted Fov angle size and the preset bit rate to obtain the second video stream. The bit rate of the second video stream is smaller than the bit rate of the first video stream. For the processing method, refer to step 202, which will not be repeated here.
减小后的Fov角度和降低后的预设码率,称为第一目标处理参数。The reduced Fov angle and the reduced preset code rate are called the first target processing parameter.
具体的,可以将Fov角度大小定为90*90,将预设码率定为20Mbps。即本实施例中,第一目标处理参数为90×90的Fov角度大小和20Mbps的预设码率。服务器对VR球形高清图片进行90×90的截取,再将截取后的图片根据20Mbps的预设码率进行编码,获取第二视频流。Specifically, the size of the Fov angle can be set as 90*90, and the preset bit rate can be set as 20Mbps. That is, in this embodiment, the first target processing parameters are the Fov angle size of 90×90 and the preset bit rate of 20 Mbps. The server intercepts the VR spherical high-definition picture at 90×90, and then encodes the intercepted picture according to the preset bit rate of 20 Mbps to obtain the second video stream.
由于第一目标处理参数的Fov角度大小,小于初始处理参数的Fov角度大小,第二视频流所包含的高清数据就少于第一视频流。且第一目标处理参数的预设码率,小于初始处 理参数的预设码率,则第二视频流的码率小于第一视频流的码率。Since the Fov angle size of the first target processing parameter is smaller than the Fov angle size of the initial processing parameter, the second video stream contains less high-definition data than the first video stream. And the preset code rate of the first target processing parameter is smaller than the preset code rate of the initial processing parameter, then the code rate of the second video stream is smaller than the code rate of the first video stream.
在本申请实施例中,除了Fov角度大小和预设码率,还可以调整其他的处理参数来调整视频流的码率,例如峰均比、关键帧(intra picture,I)与参考帧(predictive picture,P)的比值、帧率、分辨率、量化参数(quantization parameter,QP)或关键帧周期(Group of Pictures,GOP)等,此处不作限定。P帧也称为前后预测编码帧,此处不作限定。例如,当初始处理参数为每秒120帧的帧率时,步骤206可以为服务器减小帧率,第一目标处理参数可以是每秒100帧的帧率,此处不做限定。In this embodiment of the present application, in addition to the Fov angle and the preset bit rate, other processing parameters can also be adjusted to adjust the bit rate of the video stream, such as peak-to-average ratio, key frame (intra picture, I) and reference frame (predictive frame) picture, P) ratio, frame rate, resolution, quantization parameter (quantization parameter, QP) or key frame period (Group of Pictures, GOP), etc., which are not limited here. The P frame is also referred to as a pre- and post-prediction coded frame, which is not limited here. For example, when the initial processing parameter is a frame rate of 120 frames per second, step 206 may reduce the frame rate for the server, and the first target processing parameter may be a frame rate of 100 frames per second, which is not limited here.
207、服务器向终端发送第二视频流。207. The server sends the second video stream to the terminal.
服务器获取第二视频流后,就可以向终端发送第二视频流。After acquiring the second video stream, the server can send the second video stream to the terminal.
对于第二视频流的编码、封装和传输方式,参见步骤202,此处不再赘述。For the encoding, encapsulation and transmission manner of the second video stream, refer to step 202, and details are not repeated here.
208、终端解码第二视频流,并向用户输出播放数据。208. The terminal decodes the second video stream, and outputs playback data to the user.
终端解码第二视频流并向用户输出播放数据的过程,参见步骤203中终端解码第一视频流并向用户输出播放数据的过程,此处不再赘述。For the process of the terminal decoding the second video stream and outputting the playback data to the user, refer to the process of the terminal decoding the first video stream and outputting the playback data to the user in step 203, and details are not repeated here.
由于第二视频流的Fov角度大小比第一视频流的小,第二视频流比第一视频流包含更少的高清数据。终端对第二视频流进行渲染处理所产生的功耗,小于对第一视频流进行渲染处理所产生的功耗。并且,由于第二视频流的码率小于第一视频流,终端处理第二视频流产生的功耗小于处理第一视频流产生的功耗。Since the Fov angle size of the second video stream is smaller than that of the first video stream, the second video stream contains less high-definition data than the first video stream. The power consumption generated by the terminal performing rendering processing on the second video stream is smaller than the power consumption generated by performing rendering processing on the first video stream. Moreover, since the bit rate of the second video stream is lower than that of the first video stream, the power consumption of the terminal for processing the second video stream is smaller than the power consumption for processing the first video stream.
本申请实施例通过服务器与终端交互,在服务器侧减小向终端发送的视频流的码率,从而降低终端处理视频流的功耗。In the embodiment of the present application, through the interaction between the server and the terminal, the bit rate of the video stream sent to the terminal is reduced on the server side, thereby reducing the power consumption of the terminal for processing the video stream.
2、处理参数为Fov角度大小:2. The processing parameter is the Fov angle size:
接下来说明第一状态信息为终端的CPU占用率。调整的处理参数为Fov角度大小时,本申请实施例提供的一种数据处理方法。请参阅图3,图3为本申请实施例提供的调整终端功耗的方法的一个流程示意图,该调整终端功耗的方法的流程包括:Next, it is explained that the first state information is the CPU occupancy rate of the terminal. When the adjusted processing parameter is the size of the Fov angle, a data processing method is provided in the embodiment of the present application. Please refer to FIG. 3. FIG. 3 is a schematic flowchart of a method for adjusting power consumption of a terminal provided by an embodiment of the present application. The flow of the method for adjusting power consumption of a terminal includes:
301-305。301-305.
步骤301至步骤305参见图2所示实施例的步骤201至步骤205,此处不再赘述。Steps 301 to 305 refer to steps 201 to 205 in the embodiment shown in FIG. 2 , and details are not described herein again.
306、服务器减小Fov角度大小,得到第二视频流。306. The server reduces the size of the Fov angle to obtain a second video stream.
当满足第一预设条件时,服务器可以通过减小Fov角度大小,降低视频流的码率。在本实施例中,减小后的Fov角度,称为第一目标处理参数。When the first preset condition is met, the server may reduce the bit rate of the video stream by reducing the Fov angle size. In this embodiment, the reduced Fov angle is referred to as the first target processing parameter.
具体的,可以将Fov角度大小定为90×90。即本实施例中,第一目标处理参数为90×90的Fov角度大小。服务器对VR球形高清图片进行90×90的截取,再经过相应的处理,获取第二视频流。第二视频流的码率小于第一视频流的码率。Specifically, the size of the Fov angle can be set as 90×90. That is, in this embodiment, the first target processing parameter is the Fov angle size of 90×90. The server intercepts the VR spherical high-definition picture at 90×90, and then performs corresponding processing to obtain the second video stream. The bit rate of the second video stream is smaller than the bit rate of the first video stream.
由于第一目标处理参数的Fov角度大小,小于初始处理参数的Fov角度大小,第二视频流所包含的高清数据就少于第一视频流。Since the Fov angle size of the first target processing parameter is smaller than the Fov angle size of the initial processing parameter, the second video stream contains less high-definition data than the first video stream.
在本申请实施例中,除了Fov角度大小,还可以调整其他的处理参数来调整视频流的码率,例如预设码率、峰均比、关键帧I与参考帧P的比值、帧率、分辨率、量化参数QP或关键帧周期GOP等,此处不作限定。In this embodiment of the present application, in addition to the Fov angle, other processing parameters can also be adjusted to adjust the bit rate of the video stream, such as preset bit rate, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, Resolution, quantization parameter QP or key frame period GOP, etc., are not limited here.
对第一预设条件的说明,参见图2所实施示例的步骤205,此处不再赘述。For the description of the first preset condition, refer to step 205 in the example implementation example in FIG. 2 , which will not be repeated here.
307、服务器向终端发送第二视频流。307. The server sends the second video stream to the terminal.
服务器获取第二视频流后,就向终端发送第二视频流。After acquiring the second video stream, the server sends the second video stream to the terminal.
对于第二视频流的编码、封装和传输方式,参见图2所示实施例的步骤202,此处不再赘述。For the encoding, encapsulation, and transmission manner of the second video stream, refer to step 202 in the embodiment shown in FIG. 2 , and details are not repeated here.
308、终端解码第二视频流,并向用户输出播放数据。308. The terminal decodes the second video stream, and outputs playback data to the user.
该步骤参见图2所示实施例的步骤208,此处不再赘述。For this step, refer to step 208 in the embodiment shown in FIG. 2 , and details are not repeated here.
由于第二视频流的Fov角度大小比第一视频流的小,第二视频流比第一视频流包含更少的高清数据。终端对第二视频流进行渲染处理所产生的功耗,小于对第一视频流进行渲染处理所产生的功耗。并且,由于第二视频流的Fov角度大小小于第一视频流,在预设码率相同的情况下,第二视频流的码率也会小于第一视频流的码率。Since the Fov angle size of the second video stream is smaller than that of the first video stream, the second video stream contains less high-definition data than the first video stream. The power consumption generated by the terminal performing rendering processing on the second video stream is smaller than the power consumption generated by performing rendering processing on the first video stream. Moreover, since the Fov angle size of the second video stream is smaller than that of the first video stream, under the condition of the same preset bit rate, the bit rate of the second video stream will also be smaller than that of the first video stream.
3、处理参数为预设码率:3. The processing parameter is the preset bit rate:
接下来说明第一功耗相关信息为终端的CPU占用率。调整的处理参数为预设码率时,本申请实施例提供的一种数据处理方法。请参阅图4,图4为本申请实施例提供的调整终端功耗的方法的一个流程示意图,该调整终端功耗的方法的流程包括:Next, it is explained that the first power consumption related information is the CPU occupancy rate of the terminal. When the adjusted processing parameter is a preset bit rate, a data processing method is provided in an embodiment of the present application. Please refer to FIG. 4. FIG. 4 is a schematic flowchart of a method for adjusting power consumption of a terminal provided by an embodiment of the present application. The flow of the method for adjusting power consumption of a terminal includes:
401-405。401-405.
步骤401至步骤405参见图2所示实施例的步骤201至步骤205,此处不再赘述。For steps 401 to 405, reference may be made to steps 201 to 205 in the embodiment shown in FIG. 2, and details are not repeated here.
406、服务器减小预设码率,得到第二视频流。406. The server reduces the preset bit rate to obtain a second video stream.
当满足第一预设条件时,服务器可以通过减小预设码率,降低视频流的码率。在本实施例中,减小后的预设码率,称为第一目标处理参数。When the first preset condition is met, the server may reduce the code rate of the video stream by reducing the preset code rate. In this embodiment, the reduced preset code rate is called the first target processing parameter.
具体的,可以将预设码率定为20Mbps。即本实施例中,第一目标处理参数为20Mbps的预设码率。服务器对片源数据以20Mbps的预设码率进行编码,获取第二视频流。Specifically, the preset bit rate may be set as 20Mbps. That is, in this embodiment, the first target processing parameter is a preset bit rate of 20 Mbps. The server encodes the film source data at a preset bit rate of 20 Mbps, and obtains the second video stream.
由于第一目标处理参数的预设码率,小于初始处理参数的预设码率,第二视频流的码率就小于第一视频流的码率。Since the preset bit rate of the first target processing parameter is smaller than the preset bit rate of the initial processing parameter, the bit rate of the second video stream is smaller than the bit rate of the first video stream.
在本申请实施例中,除了Fov角度大小,还可以调整其他的处理参数来调整视频流的码率,例如Fov角度大小、峰均比、关键帧I与参考帧P的比值、帧率、分辨率、量化参数QP或关键帧周期GOP等,此处不作限定。In this embodiment of the present application, in addition to the Fov angle, other processing parameters can also be adjusted to adjust the bit rate of the video stream, such as the Fov angle, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, resolution rate, quantization parameter QP or key frame period GOP, etc., which are not limited here.
对第一预设条件的说明,参见图2所实施示例的步骤205,此处不再赘述。For the description of the first preset condition, refer to step 205 in the example implementation example in FIG. 2 , which will not be repeated here.
407、服务器向终端发送第二视频流。407. The server sends the second video stream to the terminal.
服务器获取第二视频流后,就向终端发送第二视频流。After acquiring the second video stream, the server sends the second video stream to the terminal.
对于第二视频流的编码、封装和传输方式,参见图2所示实施例的步骤202,此处不再赘述。For the encoding, encapsulation, and transmission manner of the second video stream, refer to step 202 in the embodiment shown in FIG. 2 , and details are not repeated here.
408、终端解码第二视频流,并向用户输出播放数据。408. The terminal decodes the second video stream, and outputs playback data to the user.
该步骤参见图2所示实施例的步骤208,此处不再赘述。For this step, refer to step 208 in the embodiment shown in FIG. 2 , and details are not repeated here.
由于第二视频流的预设码率比第一视频流的小,第二视频流的码率小于第一视频流的码率。终端处理第二视频流比处理第一视频流消耗,所需或产生的功耗更少。Since the preset bit rate of the second video stream is smaller than that of the first video stream, the bit rate of the second video stream is smaller than that of the first video stream. The processing of the second video stream by the terminal consumes, requires or generates less power consumption than processing the first video stream.
在本申请实施例中,除了能实现对终端功耗的降低,也能实现在资源允许的情况下,提升视频流的码率,以提升播放数据的视频质量。In the embodiments of the present application, in addition to reducing the power consumption of the terminal, it is also possible to increase the bit rate of the video stream when the resources allow, so as to improve the video quality of the playback data.
4、处理参数为Fov角度大小和预设码率,降功耗后提升视频质量。4. The processing parameters are the Fov angle size and the preset bit rate, and the video quality can be improved after reducing the power consumption.
请参阅图5,图5为本申请实施例中调整终端功耗的方法的一个流程图。基于图2的流程,即第一功耗相关信息为CPU占用率,调整的处理参数为Fov角度大小和预设码率时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 5 , which is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application. Based on the process of FIG. 2 , that is, when the first power consumption related information is the CPU occupancy rate, and the adjusted processing parameters are the Fov angle and the preset code rate, the process of the method for adjusting the power consumption of a terminal provided by an embodiment of the present application includes the following steps: :
501-508。501-508.
步骤501至步骤508参见图2所实施示例的步骤201至步骤208,此处不再赘述。For steps 501 to 508, refer to steps 201 to 208 in the implementation example of FIG. 2, and details are not repeated here.
509、终端向服务器上报CPU占用率。509. The terminal reports the CPU usage to the server.
处理接收到的视频流,会占用终端的CPU运行资源。此时终端获取CPU的占用率,CPU占用率表示终端处理接收到的视频流所消耗的资源。在本申请实施例中,此时上报的CPU占用率,即为第二功耗相关信息。Processing the received video stream will occupy the CPU running resources of the terminal. At this time, the terminal obtains the CPU occupancy rate, and the CPU occupancy rate represents the resources consumed by the terminal to process the received video stream. In this embodiment of the present application, the reported CPU occupancy rate at this time is the second power consumption related information.
具体的,终端可以采集多个CPU的平均占用率,当单个CPU占用过多时,可协调其他CPU核的处理资源来分担该CPU核的工作量,采集平均值可保证对多个CPU核的处理资源的合理使用,防止过度调节。Specifically, the terminal can collect the average occupancy rate of multiple CPUs. When a single CPU occupies too much, it can coordinate the processing resources of other CPU cores to share the workload of the CPU core. Collecting the average value can ensure the processing of multiple CPU cores. Reasonable use of resources to prevent over-regulation.
具体的,终端可以周期上报第二功耗相关信息,例如每5秒上报一次。除了周期上报,也可以通过其他方式上报,例如满足某上报条件时上报等,此处不作限定。Specifically, the terminal may report the second power consumption related information periodically, for example, once every 5 seconds. In addition to periodic reporting, it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
具体的,5秒仅是对上报周期的举例,上报周期还可以是10秒或12秒等,此处不作限定。Specifically, 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
具体的,上报条件可以是终端确定CPU占用率小于40%,也可以是其他形式的条件,例如终端确定剩余电量大于20%等,此处不作限定。Specifically, the reporting condition may be that the terminal determines that the CPU occupancy rate is less than 40%, or may be other forms of conditions, for example, the terminal determines that the remaining power is greater than 20%, etc., which is not limited here.
具体的,此处上报的CPU占用率,可能是终端处理第二视频流所产生的CPU占用率。也可能是处理在第二视频流之前或之后接收的视频流所产生的CPU占用率,只要处理的视频流是根据第一目标处理参数获取的即可,此处不做限定。对于终端来说,这些视频流的共同点体现在码率相同。Specifically, the CPU usage reported here may be the CPU usage generated by the terminal processing the second video stream. It may also be the CPU occupancy rate generated by processing the video stream received before or after the second video stream, as long as the processed video stream is obtained according to the first target processing parameter, which is not limited here. For the terminal, the common point of these video streams is that the bit rate is the same.
具体的,终端可以通过以HTTP为代表的网络协议上报第二功耗相关信息。除了HTTP,终端也可通过其他协议上报,例如TCP等,此处不作限定。Specifically, the terminal may report the second power consumption related information through a network protocol represented by HTTP. In addition to HTTP, the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
510、服务器根据终端上报的CPU占用率确定终端的功耗满足第二预设条件。510. The server determines, according to the CPU occupancy rate reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
接收到终端上报的CPU占用率后,服务器可以根据CPU占用率确定终端的功耗,并在确定CPU占用率满足第二预设条件时,调整处理参数,以获取码率大于第二视频流的视频流。After receiving the CPU occupancy rate reported by the terminal, the server may determine the power consumption of the terminal according to the CPU occupancy rate, and when it is determined that the CPU occupancy rate meets the second preset condition, adjust the processing parameters to obtain a video stream with a bit rate greater than that of the second video stream. video stream.
在本申请实施例中,终端的功耗满足第二预设条件,表示终端不处于功耗过高的状态,可以提升终端的功耗。具体的,在本实施例中,第二预设条件可以包括终端的CPU占用率小于或等于第三预设值。除了终端的CPU占用率,其他的终端功耗信息也可以满足第二预设条件,例如终端的剩余电量大于或等于第二预设值等,此处不作限定。In the embodiment of the present application, the power consumption of the terminal satisfies the second preset condition, indicating that the terminal is not in a state of excessive power consumption, and the power consumption of the terminal can be improved. Specifically, in this embodiment, the second preset condition may include that the CPU occupancy rate of the terminal is less than or equal to the third preset value. In addition to the CPU occupancy rate of the terminal, other terminal power consumption information may also satisfy the second preset condition, for example, the remaining power of the terminal is greater than or equal to the second preset value, etc., which is not limited here.
具体的,在本实施例中,由于第二功耗相关信息为CPU占用率,服务器可以根据接收到的CPU占用率确定终端的CPU占用率。当距离初始处理参数调整为第一目标处理参数超过一分钟,且确定CPU占用率小于或等于40%时开始计时。在从计时开始的30秒内记录终端的CPU占用率。当服务器确定30秒内的平均值小于或等于40%时,调整处理参数。也就 是说,本实施例中的终端功耗为终端的CPU占用率。Specifically, in this embodiment, since the second power consumption related information is the CPU occupancy rate, the server may determine the CPU occupancy rate of the terminal according to the received CPU occupancy rate. When it is more than one minute before the initial processing parameter is adjusted to the first target processing parameter, and it is determined that the CPU occupancy rate is less than or equal to 40%, the timing starts. The CPU usage of the terminal is recorded within 30 seconds from the timing. When the server determines that the average over 30 seconds is less than or equal to 40%, the processing parameters are adjusted. That is to say, the power consumption of the terminal in this embodiment is the CPU occupancy rate of the terminal.
在本申请实施例中,终端的CPU占用率在30秒内的平均值小于或等于40%,40%称为第三预设值。在本申请实施例中,第三预设值为终端的CPU占用率的一个阈值,当终端的CPU占用率小于该阈值时,表示终端的CPU处于未被过度占用的状态,可以提升终端的CPU占用率。除了40%,第三预设值也可以是其他数值,例如30%、50%、60%、70%、80%或90%等,此处不作限定。In this embodiment of the present application, the average value of the CPU occupancy rate of the terminal within 30 seconds is less than or equal to 40%, and 40% is referred to as the third preset value. In this embodiment of the present application, the third preset value is a threshold of the CPU usage of the terminal. When the CPU usage of the terminal is less than the threshold, it means that the CPU of the terminal is not over-occupied, and the CPU of the terminal can be improved. Occupancy rate. Besides 40%, the third preset value can also be other values, such as 30%, 50%, 60%, 70%, 80% or 90%, etc., which are not limited here.
在本申请实施例中,计时的30秒仅是对计时时间的举例,并不造成对计时时间的限定。In the embodiment of the present application, the 30 seconds of timing is only an example of the timing time, and does not limit the timing time.
在本申请实施例中,终端的CPU占用率在30秒内的平均值小于或等于40%,是第二预设条件。当满足第二预设条件时调整处理参数以增大视频流的码率大小。除了CPU占用率在30秒内的平均值小于或等于40%,第二预设条件还可以是其他的条件,例如终端的剩余电量大于某一阈值或处于上升趋势等,具体此处不作限定。In this embodiment of the present application, the average value of the CPU occupancy rate of the terminal within 30 seconds is less than or equal to 40%, which is the second preset condition. When the second preset condition is met, the processing parameter is adjusted to increase the bit rate of the video stream. In addition to the average CPU occupancy rate within 30 seconds being less than or equal to 40%, the second preset condition may also be other conditions, such as the remaining power of the terminal is greater than a certain threshold or is in an upward trend, which is not specifically limited here.
511、服务器增大Fov角度大小和预设码率,得到第三视频流。511. The server increases the Fov angle size and the preset bit rate to obtain a third video stream.
服务器确定30秒内CPU占用率的平均值小于或等于40%时,确定终端的资源足以支持对更高码率的视频流的播放,即可以提升播放数据的视频质量。When the server determines that the average CPU occupancy rate within 30 seconds is less than or equal to 40%, it determines that the resources of the terminal are sufficient to support the playback of a video stream with a higher bit rate, that is, the video quality of the playback data can be improved.
具体的,服务器通过提升Fov角度大小和预设码率提升视频流的码率,从而提升播放数据的视频质量。Specifically, the server increases the bit rate of the video stream by increasing the Fov angle size and the preset bit rate, thereby improving the video quality of the playback data.
具体的,服务器增大Fov角度大小,同时增大预设码率,并根据调整后的Fov角度大小和预设码率处理片源数据,得到第三视频流。第三视频流的码率大于第二视频流的码率。处理方式参见图2所示实施例的步骤202,此处不再赘述。Specifically, the server increases the Fov angle size and at the same time increases the preset bit rate, and processes the film source data according to the adjusted Fov angle size and the preset bit rate to obtain the third video stream. The bit rate of the third video stream is greater than the bit rate of the second video stream. For the processing method, refer to step 202 in the embodiment shown in FIG. 2 , and details are not repeated here.
增大后的Fov角度和预设码率,称为第二目标处理参数。The increased Fov angle and the preset code rate are called the second target processing parameter.
具体的,可以将Fov角度大小定为120×120,将预设码率定为30Mbps。即本实施例中,第二目标处理参数为120×120的Fov角度大小和30Mbps的预设码率。服务器对VR球形高清图片进行120×120的截取,再将截取后的图片根据30Mbps的预设码率进行编码,获取第三视频流。Specifically, the size of the Fov angle can be set as 120×120, and the preset bit rate can be set as 30Mbps. That is, in this embodiment, the second target processing parameters are the Fov angle size of 120×120 and the preset bit rate of 30 Mbps. The server intercepts the VR spherical high-definition picture at 120×120, and then encodes the intercepted picture according to the preset bit rate of 30 Mbps to obtain a third video stream.
由于第二目标处理参数的Fov角度大小,大于第一目标处理参数的Fov角度大小,第三视频流所包含的高清数据就多于第二视频流。且第二目标处理参数的预设码率,大于第一目标处理参数的预设码率,则第三视频流的码率大于第二视频流的码率,且根据第三视频流获取的播放数据,比根据第二视频流获取的播放数据,具有更好的视频质量。Since the Fov angle size of the second target processing parameter is larger than the Fov angle size of the first target processing parameter, the third video stream contains more high-definition data than the second video stream. And the preset code rate of the second target processing parameter is greater than the preset code rate of the first target processing parameter, then the code rate of the third video stream is greater than the code rate of the second video stream, and the playback obtained according to the third video stream The data has better video quality than the playback data obtained from the second video stream.
在本申请实施例中,除了Fov角度大小和预设码率,还可以调整其他的处理参数来调整播放数据的质量,例如峰均比、关键帧I与参考帧P的比值、帧率、分辨率、量化参数QP或关键帧周期GOP等,此处不作限定。例如,当第一目标处理参数为每秒100帧的帧率时,步骤511可以为服务器增大帧率,第二目标处理参数可以是每秒120帧的帧率,此处不做限定。In this embodiment of the present application, in addition to the Fov angle and the preset bit rate, other processing parameters can also be adjusted to adjust the quality of the playback data, such as peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, resolution rate, quantization parameter QP or key frame period GOP, etc., which are not limited here. For example, when the first target processing parameter is a frame rate of 100 frames per second, step 511 may increase the frame rate for the server, and the second target processing parameter may be a frame rate of 120 frames per second, which is not limited here.
512、服务器向终端发送第三视频流。512. The server sends a third video stream to the terminal.
服务器获取第三视频流后,就可以向终端发送第三视频流。After acquiring the third video stream, the server can send the third video stream to the terminal.
对于第三视频流的编码、封装和传输方式,参见图2所示实施例的步骤202,此处不再赘述。For the encoding, encapsulation, and transmission methods of the third video stream, refer to step 202 in the embodiment shown in FIG. 2 , and details are not repeated here.
513、终端解码第三视频流,并向用户输出播放数据。513. The terminal decodes the third video stream, and outputs playback data to the user.
终端解码第三视频流并向用户输出播放数据的过程,参见步骤203中终端解码第一视频流并向用户输出播放数据的过程,此处不再赘述。For the process of the terminal decoding the third video stream and outputting the playback data to the user, refer to the process of the terminal decoding the first video stream and outputting the playback data to the user in step 203, and details are not repeated here.
由于第三视频流的Fov角度大小比第二视频流的大,第三视频流比第二视频流包含更多的高清数据。并且第三视频流的预设码率比第二视频流的大,第三视频流的码率就大于第二视频流的码率。Since the Fov angle size of the third video stream is larger than that of the second video stream, the third video stream contains more high-definition data than the second video stream. And the preset bit rate of the third video stream is larger than that of the second video stream, and the bit rate of the third video stream is greater than the bit rate of the second video stream.
由于第三视频流具有比第二视频流更大的Fov角度大小和预设码率,因此对第三视频流处理得到的播放数据,比对第二视频流处理得到的播放数据,具有更好的视频质量。Since the third video stream has a larger Fov angle size and preset bit rate than the second video stream, the playback data obtained by processing the third video stream is better than the playback data obtained by processing the second video stream. video quality.
在本申请实施例中,不仅实现了在资源不足时对终端功耗的降低,还实现了当资源充足时,对播放数据的视频质量的提升。In the embodiment of the present application, not only the power consumption of the terminal is reduced when the resources are insufficient, but also the video quality of the playback data is improved when the resources are sufficient.
5、处理参数为Fov角度大小,降功耗后提升视频质量。5. The processing parameter is the size of the Fov angle, and the video quality is improved after reducing power consumption.
请参阅图6,图6为本申请实施例中调整终端功耗的方法的一个流程图。基于图3的流程,即第一功耗相关信息为CPU占用率,调整的处理参数为Fov角度大小时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 6 , which is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application. Based on the process of FIG. 3 , that is, when the first power consumption related information is the CPU occupancy rate, and the adjusted processing parameter is the Fov angle, the process of a method for adjusting the power consumption of a terminal provided by an embodiment of the present application includes:
601-608。601-608.
步骤601至步骤608参见图3所实施示例的步骤301至步骤308,此处不再赘述。For steps 601 to 608, refer to steps 301 to 308 of the implementation example in FIG. 3, and details are not repeated here.
609、终端向服务器上报CPU占用率。609. The terminal reports the CPU usage to the server.
610、服务器根据终端上报的CPU占用率确定终端的功耗满足第二预设条件。610. The server determines, according to the CPU occupancy rate reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
步骤609-610参见图5所示实施例的步骤509-510,此处不再赘述。For steps 609-610, refer to steps 509-510 in the embodiment shown in FIG. 5, and details are not repeated here.
611、服务器增大Fov角度大小,得到第三视频流。611. The server increases the size of the Fov angle to obtain a third video stream.
服务器确定30秒内CPU占用率的平均值小于或等于40%时,确定终端的资源足以支持对更高码率的视频流的播放,即可以提升播放数据的视频质量。When the server determines that the average CPU occupancy rate within 30 seconds is less than or equal to 40%, it determines that the resources of the terminal are sufficient to support the playback of a video stream with a higher bit rate, that is, the video quality of the playback data can be improved.
具体的,服务器通过提升Fov角度大小提升视频流的码率,从而提升播放数据的视频质量。Specifically, the server increases the bit rate of the video stream by increasing the Fov angle size, thereby improving the video quality of the playback data.
具体的,服务器增大Fov角度大小,并根据调整后的Fov角度大小处理片源数据,得到第三视频流。第三视频流的码率大于第二视频流的码率。处理方式参见图2所示实施例的步骤202,此处不再赘述。Specifically, the server increases the Fov angle size, and processes the film source data according to the adjusted Fov angle size to obtain the third video stream. The bit rate of the third video stream is greater than the bit rate of the second video stream. For the processing method, refer to step 202 in the embodiment shown in FIG. 2 , and details are not repeated here.
增大后的Fov角度,称为第二目标处理参数。The increased Fov angle is called the second target processing parameter.
具体的,可以将Fov角度大小定为120×120。即本实施例中,第二目标处理参数为120×120的Fov角度大小。服务器对VR球形高清图片进行120×120的截取,再对截取后的图片进行相应的处理,获取第三视频流。Specifically, the size of the Fov angle can be set as 120×120. That is, in this embodiment, the second target processing parameter is the Fov angle size of 120×120. The server performs 120×120 interception on the VR spherical high-definition picture, and then performs corresponding processing on the intercepted picture to obtain a third video stream.
由于第二目标处理参数的Fov角度大小,大于第一目标处理参数的Fov角度大小,第三视频流所包含的高清数据就多于第二视频流。即使第三视频流和第二视频流是依据相同的预设码率获取的,第三视频流的码率也会大于第二视频流的码率,且根据第三视频流获取的播放数据,比根据第二视频流获取的播放数据,具有更好的视频质量。Since the Fov angle size of the second target processing parameter is larger than the Fov angle size of the first target processing parameter, the third video stream contains more high-definition data than the second video stream. Even if the third video stream and the second video stream are obtained according to the same preset bit rate, the bit rate of the third video stream will be greater than the bit rate of the second video stream, and according to the playback data obtained from the third video stream, It has better video quality than the playback data obtained according to the second video stream.
在本申请实施例中,除了Fov角度大小,还可以调整其他的处理参数来调整播放数据的质量,例如预设码率、峰均比、关键帧I与参考帧P的比值、帧率、分辨率、量化参数 QP或关键帧周期GOP等,此处不作限定。例如,当第一目标处理参数为每秒100帧的帧率时,步骤611可以为服务器增大帧率,第二目标处理参数可以是每秒120帧的帧率,此处不做限定。In this embodiment of the present application, in addition to the Fov angle, other processing parameters can also be adjusted to adjust the quality of playback data, such as preset bit rate, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, resolution rate, quantization parameter QP or key frame period GOP, etc., which are not limited here. For example, when the first target processing parameter is a frame rate of 100 frames per second, step 611 may increase the frame rate for the server, and the second target processing parameter may be a frame rate of 120 frames per second, which is not limited here.
612、服务器向终端发送第三视频流。612. The server sends a third video stream to the terminal.
613、终端解码第三视频流,并向用户输出播放数据。613. The terminal decodes the third video stream, and outputs playback data to the user.
步骤612-613参见图5所示实施例的步骤512-513,此处不再赘述。For steps 612-613, refer to steps 512-513 in the embodiment shown in FIG. 5, and details are not repeated here.
由于第三视频流的Fov角度大小比第二视频流的大,第三视频流比第二视频流包含更多的高清数据,且第三视频流与第二视频流的其他处理参数并没有变化,因此第三视频流的码率大于第二视频流的码率。Since the Fov angle of the third video stream is larger than that of the second video stream, the third video stream contains more high-definition data than the second video stream, and other processing parameters of the third video stream and the second video stream do not change. , so the bit rate of the third video stream is greater than the bit rate of the second video stream.
由于第三视频流具有比第二视频流更大的Fov角度大小,因此对第三视频流处理得到的播放数据,比对第二视频流处理得到的播放数据,具有更好的视频质量。Since the third video stream has a larger Fov angle size than the second video stream, the playback data obtained by processing the third video stream has better video quality than the playback data obtained by processing the second video stream.
在本申请实施例中,不仅实现了在资源不足时对终端功耗的降低,还实现了当资源充足时,对播放数据的视频质量的提升。In the embodiment of the present application, not only the power consumption of the terminal is reduced when the resources are insufficient, but also the video quality of the playback data is improved when the resources are sufficient.
6、处理参数为预设码率,降功耗后提升视频质量。6. The processing parameter is the preset bit rate, and the video quality is improved after reducing power consumption.
请参阅图7,图7为本申请实施例中调整终端功耗的方法的一个流程图。基于图4的流程,即第一状态信息为CPU占用率,调整的处理参数为预设码率时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 7 , which is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application. Based on the process of FIG. 4 , that is, when the first state information is the CPU occupancy rate and the adjusted processing parameter is the preset code rate, the process of the method for adjusting the power consumption of a terminal provided by the embodiment of the present application includes:
701-708。701-708.
步骤701至步骤708参见图4所实施示例的步骤401至步骤408,此处不再赘述。For steps 701 to 708, refer to steps 401 to 408 in the implementation example of FIG. 4, and details are not repeated here.
709、终端向服务器上报CPU占用率。709. The terminal reports the CPU usage to the server.
710、服务器根据终端上报的CPU占用率确定终端的功耗满足第二预设条件。710. The server determines, according to the CPU occupancy rate reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
步骤709-710参见图5所实施示例的步骤509-510,此处不再赘述。For steps 709-710, refer to steps 509-510 in the implementation example of FIG. 5, and details are not repeated here.
711、服务器增大预设码率,得到第三视频流。711. The server increases the preset bit rate to obtain a third video stream.
服务器确定30秒内CPU占用率的平均值小于或等于40%时,确定终端的资源足以支持对更高码率的视频流的播放,即可以提升播放数据的视频质量。When the server determines that the average CPU occupancy rate within 30 seconds is less than or equal to 40%, it determines that the resources of the terminal are sufficient to support the playback of a video stream with a higher bit rate, that is, the video quality of the playback data can be improved.
具体的,服务器通过增大预设码率提升视频流的码率,从而提升播放数据的视频质量。Specifically, the server increases the bit rate of the video stream by increasing the preset bit rate, thereby improving the video quality of the playback data.
具体的,服务器增大预设码率,并根据调整后的预设码率处理片源数据,得到第三视频流。第三视频流的码率大于第二视频流的码率。处理方式参见图2所示实施例的步骤202,此处不再赘述。Specifically, the server increases the preset bit rate, and processes the slice source data according to the adjusted preset bit rate to obtain the third video stream. The bit rate of the third video stream is greater than the bit rate of the second video stream. For the processing method, refer to step 202 in the embodiment shown in FIG. 2 , and details are not repeated here.
增大后的预设码率,称为第二目标处理参数。The increased preset code rate is called the second target processing parameter.
具体的,可以将预设码率定为30Mbps。即本实施例中,第二目标处理参数为30Mbps的预设码率。服务器根据30Mbps的预设码率对片源数据进行编码,获取第三视频流。Specifically, the preset bit rate may be set as 30Mbps. That is, in this embodiment, the second target processing parameter is a preset bit rate of 30 Mbps. The server encodes the film source data according to the preset bit rate of 30 Mbps, and obtains the third video stream.
由于第二目标处理参数的预设码率,大于第一目标处理参数的预设码率,第三视频流的码率就大于第二视频流。根据第三视频流获取的播放数据,比根据第二视频流获取的播放数据,具有更好的视频质量。Since the preset bit rate of the second target processing parameter is greater than the preset bit rate of the first target processing parameter, the bit rate of the third video stream is greater than that of the second video stream. The playback data obtained according to the third video stream has better video quality than the playback data obtained according to the second video stream.
在本申请实施例中,除了Fov角度大小,还可以调整其他的处理参数来调整播放数据的质量,例如Fov角度大小、峰均比、关键帧I与参考帧P的比值、帧率、分辨率、量化 参数QP或关键帧周期GOP等,此处不作限定。例如,当第一目标处理参数为每秒100帧的帧率时,步骤711可以为服务器增大帧率,第二目标处理参数可以是每秒120帧的帧率,此处不做限定。In this embodiment of the present application, in addition to the Fov angle, other processing parameters can also be adjusted to adjust the quality of the playback data, such as the Fov angle, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, resolution , quantization parameter QP or key frame period GOP, etc., which are not limited here. For example, when the first target processing parameter is a frame rate of 100 frames per second, step 711 may increase the frame rate for the server, and the second target processing parameter may be a frame rate of 120 frames per second, which is not limited here.
712、服务器向终端发送第三视频流。712. The server sends a third video stream to the terminal.
713、终端解码第三视频流,并向用户输出播放数据。713. The terminal decodes the third video stream, and outputs playback data to the user.
步骤712-713参见图5所示实施例的步骤512-513,此处不再赘述。For steps 712-713, refer to steps 512-513 in the embodiment shown in FIG. 5, and details are not repeated here.
由于第三视频流的预设码率比第二视频流的大,因此第三视频流的码率大于第二视频流的码率。Since the preset bit rate of the third video stream is larger than that of the second video stream, the bit rate of the third video stream is greater than that of the second video stream.
由于第三视频流具有比第二视频流更大的预设码率,因此对第三视频流处理得到的播放数据,比对第二视频流处理得到的播放数据,具有更好的视频质量。Since the third video stream has a larger preset bit rate than the second video stream, the playback data obtained by processing the third video stream has better video quality than the playback data obtained by processing the second video stream.
在本申请实施例中,不仅实现了在资源不足时对终端功耗的降低,还实现了当资源充足时,对播放数据的视频质量的提升。In the embodiment of the present application, not only the power consumption of the terminal is reduced when the resources are insufficient, but also the video quality of the playback data is improved when the resources are sufficient.
接下来将对第一状态信息为剩余电量时,本申请实施例提供的数据处理方法进行说明:Next, when the first state information is the remaining power, the data processing method provided by the embodiment of the present application will be described:
二、状态信息为剩余电量:2. The status information is the remaining power:
1、处理参数为Fov角度大小和预设码率:1. The processing parameters are Fov angle size and preset bit rate:
请参阅图8,图8为本申请实施例中的一种调整终端功耗的方法的流程图。当第一功耗相关信息为剩余电量,处理参数为Fov角度大小和预设码率时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 8 , which is a flowchart of a method for adjusting power consumption of a terminal according to an embodiment of the present application. When the first power consumption related information is the remaining power, and the processing parameters are the Fov angle and the preset bit rate, the process of the method for adjusting the power consumption of the terminal provided by the embodiment of the present application includes:
801、服务器获取片源数据。801. The server obtains the data of the film source.
802、服务器生成第一视频流,并向终端发送第一视频流。802. The server generates a first video stream, and sends the first video stream to the terminal.
803、终端解码第一视频流,并向用户输出播放数据。803. The terminal decodes the first video stream, and outputs playback data to the user.
步骤801-803参见图2所示实施例的步骤201-203,此处不再赘述。For steps 801-803, refer to steps 201-203 in the embodiment shown in FIG. 2, and details are not repeated here.
804、终端向服务器上报剩余电量。804. The terminal reports the remaining power to the server.
处理接收到的视频流,会消耗终端的电量。此时终端获取终端的剩余电量,剩余电量表示终端用于处理接收到的视频流的资源。在本申请实施例中,此时上报的剩余电量,即为第一功耗相关信息。Processing the received video stream consumes the power of the terminal. At this time, the terminal acquires the remaining power of the terminal, and the remaining power represents the resources used by the terminal to process the received video stream. In the embodiment of the present application, the remaining power reported at this time is the first power consumption related information.
具体的,终端可以周期上报第一功耗相关信息,例如每5秒上报一次。除了周期上报,也可以通过其他方式上报,例如满足某上报条件时上报等,此处不作限定。Specifically, the terminal may report the first power consumption related information periodically, for example, once every 5 seconds. In addition to periodic reporting, it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
具体的,5秒仅是对上报周期的举例,上报周期还可以是10秒或12秒等,此处不作限定。Specifically, 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
可选的,上报条件可以是终端确定剩余电量小于或等于20%,也可以是其他形式的条件,例如终端确定CPU占用率大于或等于40%等,此处不作限定。Optionally, the reporting condition may be that the terminal determines that the remaining power is less than or equal to 20%, or may be other forms of conditions, such as the terminal determining that the CPU occupancy rate is greater than or equal to 40%, etc., which is not limited here.
具体的,终端可以通过以HTTP为代表的网络协议上报第一功耗相关信息。除了HTTP,终端也可通过其他协议上报,例如TCP等,此处不作限定。Specifically, the terminal may report the first power consumption related information through a network protocol represented by HTTP. In addition to HTTP, the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
805、服务器根据终端上报的剩余电量确定终端的功耗满足第一预设条件。805. The server determines, according to the remaining power reported by the terminal, that the power consumption of the terminal satisfies the first preset condition.
接收到终端上报的剩余电量后,服务器可以根据剩余电量确定终端的功耗,并在确定剩余电量满足第一预设条件时,调整处理参数,以获取码率小于第一视频流的视频流。After receiving the remaining power reported by the terminal, the server may determine the power consumption of the terminal according to the remaining power, and when determining that the remaining power meets the first preset condition, adjust processing parameters to obtain a video stream with a bit rate lower than the first video stream.
具体的,在本实施例中,由于第一功耗相关信息为剩余电量,服务器可以根据接收到的剩余电量确定终端的剩余电量,并在确定剩余电量小或等于20%时开始计时。在从计时开始的2分钟后,每隔1分钟记录终端的剩余电量。第一时刻早于第二时刻,当服务器确定第二时刻的剩余电量小于第一时刻的剩余电量时,即电量在下降时,调整处理参数。也就是说,本实施例中的终端功耗为终端的剩余电量。Specifically, in this embodiment, since the first power consumption related information is the remaining power, the server may determine the remaining power of the terminal according to the received remaining power, and start timing when it is determined that the remaining power is less than or equal to 20%. After 2 minutes from the timing, the remaining power of the terminal is recorded every 1 minute. The first time is earlier than the second time, and when the server determines that the remaining power at the second time is less than the remaining power at the first time, that is, when the power is decreasing, the processing parameter is adjusted. That is to say, the power consumption of the terminal in this embodiment is the remaining power of the terminal.
在本申请实施例中,终端的剩余电量小于或等于20%,20%称为第二预设值。在本申请实施例中,第二预设值为终端的剩余电量的一个阈值,当终端的剩余电量等于或低于该阈值时,表示终端的剩余电量过低,需要降低终端的功耗。除了20%,第二预设值也可以是其他数值,例如10%、15%、25%或30%等,此处不作限定。In this embodiment of the present application, the remaining power of the terminal is less than or equal to 20%, and 20% is referred to as the second preset value. In the embodiment of the present application, the second preset value is a threshold of the remaining power of the terminal. When the remaining power of the terminal is equal to or lower than the threshold, it means that the remaining power of the terminal is too low, and the power consumption of the terminal needs to be reduced. Besides 20%, the second preset value can also be other values, such as 10%, 15%, 25% or 30%, etc., which are not limited here.
在本申请实施例中,计时的2分钟和每相隔一分钟记录,2分钟与1分钟都是对时间的举例,并不造成对计时时间和相隔时间的限定。In the embodiments of the present application, 2 minutes of timing and every one minute interval are recorded. Both 2 minutes and 1 minute are examples of time, and do not limit the timing time and interval time.
在本申请实施例中,终端的剩余电量小于或等于20%且正在下降,是第一预设条件。终端功耗满足第一预设条件表示当前终端用于处理视频流的资源不足以处理当前的视频流,或依据当前的资源处理当前的视频流,效果不好,此时调整处理参数以减小视频流的码率大小。除了剩余电量小于或等于20%且正在下降,第一预设条件还可以是其他的条件,例如终端的CPU占用率大于或等于某一阈值等,具体此处不作限定。In this embodiment of the present application, the remaining power of the terminal is less than or equal to 20% and is decreasing, which is the first preset condition. If the power consumption of the terminal satisfies the first preset condition, it means that the resources used by the current terminal for processing the video stream are insufficient to process the current video stream, or the current video stream is processed according to the current resources, and the effect is not good. In this case, the processing parameters are adjusted to reduce the The bitrate size of the video stream. Except that the remaining power is less than or equal to 20% and is decreasing, the first preset condition may also be other conditions, for example, the CPU occupancy rate of the terminal is greater than or equal to a certain threshold, etc., which is not specifically limited here.
806、服务器减小Fov角度大小和预设码率,得到第二视频流。806. The server reduces the size of the Fov angle and the preset bit rate to obtain a second video stream.
807、服务器向终端发送第二视频流。807. The server sends the second video stream to the terminal.
808、终端解码第二视频流,并向用户输出播放数据。808. The terminal decodes the second video stream, and outputs playback data to the user.
806-808参见图2所示实施例的步骤206-208,此处不再赘述。806-808 refer to steps 206-208 in the embodiment shown in FIG. 2, and details are not repeated here.
由于第二视频流的Fov角度大小比第一视频流的小,第二视频流比第一视频流包含更少的高清数据。终端对第二视频流进行渲染处理所产生的功耗,小于对第一视频流进行渲染处理所产生的功耗。并且,由于第二视频流的码率小于第一视频流,终端处理第二视频流产生的功耗小于处理第一视频流产生的功耗。在剩余电量相同的情况下,终端处理第二视频流比处理第一视频流,可以保持终端运行更长的时间,从而保证观影时间。Since the Fov angle size of the second video stream is smaller than that of the first video stream, the second video stream contains less high-definition data than the first video stream. The power consumption generated by the terminal performing rendering processing on the second video stream is smaller than the power consumption generated by performing rendering processing on the first video stream. Moreover, since the bit rate of the second video stream is lower than that of the first video stream, the power consumption of the terminal for processing the second video stream is smaller than the power consumption for processing the first video stream. Under the condition that the remaining power is the same, the terminal can keep the terminal running for a longer time than processing the first video stream when processing the second video stream, thereby ensuring the viewing time.
本申请实施例通过服务器与终端交互,在服务器侧减小向终端发送的视频流的码率,从而降低终端处理视频流的功耗。In the embodiment of the present application, through the interaction between the server and the terminal, the bit rate of the video stream sent to the terminal is reduced on the server side, thereby reducing the power consumption of the terminal for processing the video stream.
2、处理参数为Fov角度大小:2. The processing parameter is the Fov angle size:
请参阅图9,图9为本申请实施例中的一种调整终端功耗的方法的流程图。当第一功耗相关信息为剩余电量,处理参数为Fov角度大小时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 9, which is a flowchart of a method for adjusting power consumption of a terminal according to an embodiment of the present application. When the first power consumption related information is the remaining power, and the processing parameter is the Fov angle, the process of the method for adjusting the power consumption of the terminal provided by the embodiment of the present application includes:
901-905。901-905.
步骤901-905参见图8所示实施例的步骤801-805,此处不再赘述。For steps 901-905, refer to steps 801-805 in the embodiment shown in FIG. 8, and details are not repeated here.
906、服务器减小Fov角度大小,得到第二视频流。906. The server reduces the size of the Fov angle to obtain a second video stream.
907、服务器向终端发送第二视频流。907. The server sends the second video stream to the terminal.
908、终端解码第二视频流,并向用户输出播放数据。908. The terminal decodes the second video stream, and outputs playback data to the user.
步骤906-908参见图3所示实施例的步骤306-308,此处不再赘述。For steps 906-908, refer to steps 306-308 in the embodiment shown in FIG. 3, and details are not repeated here.
由于第二视频流的Fov角度大小比第一视频流的小,第二视频流比第一视频流包含更少的高清数据。终端对第二视频流进行渲染处理所产生的功耗,小于对第一视频流进行渲染处理所产生的功耗。并且,由于第二视频流的Fov角度大小小于第一视频流,在预设码率相同的情况下,第二视频流的码率也会小于第一视频流的码率。终端处理第二视频流比处理第一视频流消耗,所需或产生的功耗更少。Since the Fov angle size of the second video stream is smaller than that of the first video stream, the second video stream contains less high-definition data than the first video stream. The power consumption generated by the terminal performing rendering processing on the second video stream is smaller than the power consumption generated by performing rendering processing on the first video stream. Moreover, since the Fov angle size of the second video stream is smaller than that of the first video stream, under the condition of the same preset bit rate, the bit rate of the second video stream will also be smaller than that of the first video stream. The processing of the second video stream by the terminal consumes, requires or generates less power consumption than processing the first video stream.
3、处理参数为预设码率:3. The processing parameter is the preset bit rate:
请参阅图10,图10为本申请实施例中的一种调整终端功耗的方法的流程图。当第一功耗相关信息为剩余电量,处理参数为预设码率时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 10. FIG. 10 is a flowchart of a method for adjusting power consumption of a terminal according to an embodiment of the present application. When the first power consumption related information is the remaining power and the processing parameter is the preset bit rate, the process of the method for adjusting the power consumption of the terminal provided by the embodiment of the present application includes:
1001-1005。1001-1005.
步骤1001-1005参见图8所示实施例的步骤801-805,此处不再赘述。For steps 1001-1005, refer to steps 801-805 in the embodiment shown in FIG. 8, and details are not repeated here.
1006、服务器减小预设码率,得到第二视频流。1006. The server reduces the preset bit rate to obtain a second video stream.
1007、服务器向终端发送第二视频流。1007. The server sends the second video stream to the terminal.
1008、终端解码第二视频流,并向用户输出播放数据。1008. The terminal decodes the second video stream, and outputs playback data to the user.
步骤1006-1008参见图4所示实施例的步骤406-408,此处不再赘述。For steps 1006-1008, refer to steps 406-408 in the embodiment shown in FIG. 4, and details are not repeated here.
由于第二视频流的预设码率比第一视频流的小,第二视频流的码率小于第一视频流的码率。终端处理第二视频流比处理第一视频流消耗,所需或产生的功耗更少。Since the preset bit rate of the second video stream is smaller than that of the first video stream, the bit rate of the second video stream is smaller than that of the first video stream. The processing of the second video stream by the terminal consumes, requires or generates less power consumption than processing the first video stream.
在本申请实施例中,除了能实现对终端功耗的降低,也能实现在资源允许的情况下,提升视频流的码率,以提升播放数据的视频质量。In the embodiments of the present application, in addition to reducing the power consumption of the terminal, it is also possible to increase the bit rate of the video stream when the resources allow, so as to improve the video quality of the playback data.
4、处理参数为Fov角度大小和预设码率,降功耗后提升视频质量。4. The processing parameters are the Fov angle size and the preset bit rate, and the video quality can be improved after reducing the power consumption.
请参阅图11,图11为本申请实施例中调整终端功耗的方法的一个流程图。基于图8的流程,即第一功耗相关信息为CPU占用率,调整的处理参数为Fov角度大小和预设码率时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 11 , which is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application. Based on the process of FIG. 8 , that is, when the first power consumption related information is the CPU occupancy rate, and the adjusted processing parameters are the Fov angle and the preset code rate, the process of the method for adjusting the power consumption of a terminal provided by an embodiment of the present application includes the following steps: :
1101-1108。1101-1108.
步骤1101至步骤1108参见图8所实施示例的步骤801至步骤808,此处不再赘述。For steps 1101 to 1108, refer to steps 801 to 808 of the example implementation in FIG. 8, and details are not repeated here.
1109、终端向服务器上报剩余电量。1109. The terminal reports the remaining power to the server.
处理接收到的视频流,会消耗终端的电量。此时终端获取终端的剩余电量,剩余电量表示终端用于处理接收到的视频流的资源。在本申请实施例中,此时上报的剩余电量,即为第二功耗相关信息。Processing the received video stream consumes the power of the terminal. At this time, the terminal acquires the remaining power of the terminal, and the remaining power represents the resources used by the terminal to process the received video stream. In this embodiment of the present application, the remaining power reported at this time is the second power consumption related information.
具体的,终端可以周期上报第二功耗相关信息,例如每5秒上报一次。除了周期上报,也可以通过其他方式上报,例如满足某上报条件时上报等,此处不作限定。Specifically, the terminal may report the second power consumption related information periodically, for example, once every 5 seconds. In addition to periodic reporting, it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
具体的,5秒仅是对上报周期的举例,上报周期还可以是10秒或12秒等,此处不作限定。Specifically, 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
可选的,上报条件可以是终端确定剩余电量大于或等于20%,也可以是其他形式的条件,例如终端确定CPU占用率小于或等于40%等,此处不作限定。Optionally, the reporting condition may be that the terminal determines that the remaining power is greater than or equal to 20%, or may be other forms of conditions, such as the terminal determining that the CPU occupancy rate is less than or equal to 40%, etc., which is not limited here.
具体的,终端可以通过以HTTP为代表的网络协议上报第二功耗相关信息。除了HTTP,终端也可通过其他协议上报,例如TCP等,此处不作限定。Specifically, the terminal may report the second power consumption related information through a network protocol represented by HTTP. In addition to HTTP, the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
1110、服务器根据终端上报的剩余电量确定终端的功耗满足第二预设条件。1110. The server determines, according to the remaining power reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
接收到终端上报的剩余电量后,服务器可以根据剩余电量确定终端的功耗,并在确定剩余电量满足第二预设条件时,调整处理参数,以获取码率大于第二视频流的视频流。After receiving the remaining power reported by the terminal, the server may determine the power consumption of the terminal according to the remaining power, and adjust processing parameters to obtain a video stream with a bit rate greater than the second video stream when determining that the remaining power meets the second preset condition.
具体的,在本实施例中,由于第二功耗相关信息为剩余电量,服务器可以根据接收到的剩余电量确定终端的剩余电量。当确定剩余电量大于或等于20%时,调整处理参数。也就是说,本实施例中的终端功耗为终端的剩余电量。Specifically, in this embodiment, since the second power consumption related information is the remaining power, the server may determine the remaining power of the terminal according to the received remaining power. When it is determined that the remaining power is greater than or equal to 20%, the processing parameters are adjusted. That is to say, the power consumption of the terminal in this embodiment is the remaining power of the terminal.
在本申请实施例中,终端的剩余电量大于或等于20%,20%称为第四预设值。在本申请实施例中,第四预设值为终端的剩余电量的一个阈值,当终端的剩余电量不低于该阈值时,表示终端的剩余电量不处于过低的状态,可以提升终端的功耗。除了20%,第四预设值也可以是其他数值,例如10%、15%、25%或30%等,此处不作限定。In this embodiment of the present application, the remaining power of the terminal is greater than or equal to 20%, and 20% is referred to as the fourth preset value. In the embodiment of the present application, the fourth preset value is a threshold value of the remaining power of the terminal. When the remaining power of the terminal is not lower than the threshold, it means that the remaining power of the terminal is not too low, and the function of the terminal can be improved. consumption. Besides 20%, the fourth preset value can also be other values, such as 10%, 15%, 25% or 30%, etc., which are not limited here.
在本申请实施例中,终端的剩余电量大于或等于20%,是第二预设条件。当满足第二预设条件时调整处理参数以增大视频流的码率大小。除了剩余电量大于或等于20%,第二预设条件还可以是其他的条件,例如终端的剩余电量不变或处于上升趋势等,具体此处不作限定。In this embodiment of the present application, the remaining power of the terminal is greater than or equal to 20%, which is the second preset condition. When the second preset condition is met, the processing parameter is adjusted to increase the bit rate of the video stream. In addition to the remaining power being greater than or equal to 20%, the second preset condition may also be other conditions, for example, the remaining power of the terminal remains unchanged or is in an upward trend, which is not specifically limited here.
1111、服务器增大Fov角度大小和预设码率,得到第三视频流。1111. The server increases the Fov angle size and the preset bit rate to obtain a third video stream.
1112、服务器向终端发送第三视频流。1112. The server sends a third video stream to the terminal.
1113、终端解码第三视频流,并向用户输出播放数据。1113. The terminal decodes the third video stream, and outputs playback data to the user.
步骤1111-1113参见图5所示实施例的步骤511-513,此处不再赘述。For steps 1111-1113, refer to steps 511-513 in the embodiment shown in FIG. 5, and details are not repeated here.
由于第三视频流的Fov角度大小比第二视频流的大,第三视频流比第二视频流包含更多的高清数据。并且第三视频流的预设码率比第二视频流的大,第三视频流的码率就大于第二视频流的码率。Since the Fov angle size of the third video stream is larger than that of the second video stream, the third video stream contains more high-definition data than the second video stream. And the preset bit rate of the third video stream is larger than that of the second video stream, and the bit rate of the third video stream is greater than the bit rate of the second video stream.
由于第三视频流具有比第二视频流更大的Fov角度大小和预设码率,因此对第三视频流处理得到的播放数据,比对第二视频流处理得到的播放数据,具有更好的视频质量。Since the third video stream has a larger Fov angle size and preset bit rate than the second video stream, the playback data obtained by processing the third video stream is better than the playback data obtained by processing the second video stream. video quality.
在本申请实施例中,不仅实现了在资源不足时对终端功耗的降低,还实现了当资源充足时,对播放数据的视频质量的提升。In the embodiment of the present application, not only the power consumption of the terminal is reduced when the resources are insufficient, but also the video quality of the playback data is improved when the resources are sufficient.
5、处理参数为Fov角度大小,降功耗后提升视频质量。5. The processing parameter is the size of the Fov angle, and the video quality is improved after reducing power consumption.
请参阅图12,图12为本申请实施例中调整终端功耗的方法的一个流程图。基于图9的流程,即第一功耗相关信息为CPU占用率,调整的处理参数为Fov角度大小时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 12 , which is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application. Based on the process of FIG. 9 , that is, when the first power consumption related information is the CPU occupancy rate and the adjusted processing parameter is the Fov angle, the process of a method for adjusting the power consumption of a terminal provided by an embodiment of the present application includes:
1201-1208。1201-1208.
步骤1101至步骤1108参见图9所实施示例的步骤901至步骤908,此处不再赘述。Steps 1101 to 1108 refer to steps 901 to 908 in the example of implementation in FIG. 9 , and details are not repeated here.
1209、终端向服务器上报剩余电量。1209. The terminal reports the remaining power to the server.
1210、服务器根据终端上报的剩余电量确定终端的功耗满足第二预设条件。1210. The server determines, according to the remaining power reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
步骤1209-1210参见图11所示实施例的步骤1109-1110,此处不再赘述。For steps 1209-1210, refer to steps 1109-1110 in the embodiment shown in FIG. 11, and details are not repeated here.
1211、服务器增大Fov角度大小,得到第三视频流。1211. The server increases the size of the Fov angle to obtain a third video stream.
1212、服务器向终端发送第三视频流。1212. The server sends a third video stream to the terminal.
1213、终端解码第三视频流,并向用户输出播放数据。1213. The terminal decodes the third video stream, and outputs playback data to the user.
步骤1211-1213参见图6所示实施例的步骤611-613,此处不再赘述。For steps 1211-1213, refer to steps 611-613 in the embodiment shown in FIG. 6, and details are not repeated here.
由于第三视频流具有比第二视频流更大的Fov角度大小,因此对第三视频流处理得到的播放数据,比对第二视频流处理得到的播放数据,具有更好的视频质量。Since the third video stream has a larger Fov angle size than the second video stream, the playback data obtained by processing the third video stream has better video quality than the playback data obtained by processing the second video stream.
在本申请实施例中,不仅实现了在资源不足时对终端功耗的降低,还实现了当资源充足时,对播放数据的视频质量的提升。In the embodiment of the present application, not only the power consumption of the terminal is reduced when the resources are insufficient, but also the video quality of the playback data is improved when the resources are sufficient.
6、处理参数为预设码率,降功耗后提升视频质量。6. The processing parameter is the preset bit rate, and the video quality is improved after reducing power consumption.
请参阅图13,图13为本申请实施例中调整终端功耗的方法的一个流程图。基于图10的流程,即第一状态信息为CPU占用率,调整的处理参数为预设码率时,本申请实施例提供的一种调整终端功耗的方法的流程包括:Please refer to FIG. 13 , which is a flowchart of a method for adjusting power consumption of a terminal in an embodiment of the present application. Based on the process of FIG. 10 , that is, when the first state information is the CPU occupancy rate and the adjusted processing parameter is the preset bit rate, the process of the method for adjusting the power consumption of a terminal provided by the embodiment of the present application includes:
1301-1308。1301-1308.
步骤1301至步骤1308参见图10所实施示例的步骤1001至步骤1008,此处不再赘述。For steps 1301 to 1308, refer to steps 1001 to 1008 in the implementation example of FIG. 10, and details are not repeated here.
1309、终端向服务器上报剩余电量。1309. The terminal reports the remaining power to the server.
1310、服务器根据终端上报的剩余电量确定终端的功耗满足第二预设条件。1310. The server determines, according to the remaining power reported by the terminal, that the power consumption of the terminal satisfies the second preset condition.
步骤1309-1310参见图11所示实施例的步骤1109-1110,此处不再赘述。For steps 1309-1310, refer to steps 1109-1110 in the embodiment shown in FIG. 11, and details are not repeated here.
1311、服务器增大预设码率,得到第三视频流。1311. The server increases the preset bit rate to obtain a third video stream.
1312、服务器向终端发送第三视频流。1312. The server sends a third video stream to the terminal.
1313、终端解码第三视频流,并向用户输出播放数据。1313. The terminal decodes the third video stream, and outputs playback data to the user.
步骤1311-1313参见图7所示实施例的步骤711-713,此处不再赘述。For steps 1311-1313, refer to steps 711-713 in the embodiment shown in FIG. 7, and details are not repeated here.
由于第三视频流具有比第二视频流更大的预设码率,因此对第三视频流处理得到的播放数据,比对第二视频流处理得到的播放数据,具有更好的视频质量。Since the third video stream has a larger preset bit rate than the second video stream, the playback data obtained by processing the third video stream has better video quality than the playback data obtained by processing the second video stream.
在本申请实施例中,不仅实现了在资源不足时对终端功耗的降低,还实现了当资源充足时,对播放数据的视频质量的提升。In the embodiment of the present application, not only the power consumption of the terminal is reduced when the resources are insufficient, but also the video quality of the playback data is improved when the resources are sufficient.
三、根据网络带宽调整视频流的码率:3. Adjust the bit rate of the video stream according to the network bandwidth:
视频流需要占用网络带宽实现从服务器向终端的传输,当网络带宽不足以承载视频流的传输时,会出现卡顿等现象。本申请实施例提供了一种数据处理方法,根据网络带宽调整视频流的码率,从而避免视频流的码率过大导致的卡顿现象。The video stream needs to occupy the network bandwidth to realize the transmission from the server to the terminal. When the network bandwidth is not enough to carry the transmission of the video stream, phenomena such as freezing will occur. The embodiment of the present application provides a data processing method, which adjusts the bit rate of the video stream according to the network bandwidth, so as to avoid the stuck phenomenon caused by the excessively large bit rate of the video stream.
在本申请实施例中,服务器根据带宽信息确定网络带宽,当网络带宽满足第三预设条件时,触发调整视频流的码率。第一带宽信息用于表示网络带宽。In this embodiment of the present application, the server determines the network bandwidth according to the bandwidth information, and when the network bandwidth meets the third preset condition, triggers adjustment of the bit rate of the video stream. The first bandwidth information is used to represent the network bandwidth.
在本申请实施例中,终端的网络带宽满足第三预设条件,表示视频流的传输可能大于终端的网络的承载能力,因此可能需要降低视频流的码率。具体的,在本申请实施例中,第三预设条件可以包括终端的网络带宽小于或等于第五预设值。除了终端的网络带宽,其他的带宽信息也可以满足第三预设条件,例如终端的网络带宽在一定时段内的平均值小于或等于第五预设值等,此处不作限定。In the embodiment of the present application, the network bandwidth of the terminal satisfies the third preset condition, indicating that the transmission of the video stream may be greater than the carrying capacity of the network of the terminal, and therefore the bit rate of the video stream may need to be reduced. Specifically, in this embodiment of the present application, the third preset condition may include that the network bandwidth of the terminal is less than or equal to the fifth preset value. In addition to the network bandwidth of the terminal, other bandwidth information may also satisfy the third preset condition, for example, the average value of the network bandwidth of the terminal within a certain period is less than or equal to the fifth preset value, etc., which is not limited here.
1、处理参数为Fov角度大小和预设码率:1. The processing parameters are Fov angle size and preset bit rate:
请参阅图14,图14为本申请实施例中的一种码率的调整方法的流程图。当处理参数为Fov角度大小和预设码率时,本申请实施例提供的一种码率的调整方法的流程包括:Please refer to FIG. 14. FIG. 14 is a flowchart of a method for adjusting a code rate according to an embodiment of the present application. When the processing parameters are the Fov angle size and the preset code rate, the flow of the code rate adjustment method provided by the embodiment of the present application includes:
1401、服务器获取片源数据。1401. The server obtains the data of the film source.
1402、服务器生成第一视频流,并向终端发送第一视频流。1402. The server generates a first video stream, and sends the first video stream to the terminal.
1403、终端解码第一视频流,并向用户输出播放数据。1403. The terminal decodes the first video stream, and outputs playback data to the user.
步骤1401-1403参见图2所实施示例的步骤201-203,此处不再赘述。For steps 1401-1403, refer to steps 201-203 in the implementation example of FIG. 2, and details are not repeated here.
1404、终端向服务器上报网络带宽。1404. The terminal reports the network bandwidth to the server.
传输视频流将会占用网络带宽,此时终端获取终端的网络带宽,终端的网络带宽表示终端的网络资源。在本申请实施例中,此时上报的网络带宽,即为第一带宽信息。Transmitting video streams will occupy network bandwidth. At this time, the terminal obtains the network bandwidth of the terminal, and the network bandwidth of the terminal represents the network resources of the terminal. In this embodiment of the present application, the network bandwidth reported at this time is the first bandwidth information.
具体的,终端可以周期上报第一带宽信息,例如每5秒上报一次。除了周期上报,也可以通过其他方式上报,例如满足某上报条件时上报等,此处不作限定。Specifically, the terminal may report the first bandwidth information periodically, for example, once every 5 seconds. In addition to periodic reporting, it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
具体的,5秒仅是对上报周期的举例,上报周期还可以是10秒或12秒等,此处不作限定。Specifically, 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
具体的,上报条件可以是终端确定网络带宽小于或等于30Mbps,也可以是其他形式的条件,例如终端确定网络带宽波动较大等,此处不作限定。Specifically, the reporting condition may be that the terminal determines that the network bandwidth is less than or equal to 30 Mbps, or may be other forms of conditions, such as the terminal determines that the network bandwidth fluctuates greatly, which is not limited here.
具体的,终端可以通过以HTTP为代表的网络协议上报第一带宽信息。除了HTTP,终端也可通过其他协议上报,例如TCP等,此处不作限定。Specifically, the terminal may report the first bandwidth information through a network protocol represented by HTTP. In addition to HTTP, the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
1405、服务器根据终端上报的网络带宽确定终端的网络带宽满足第三预设条件。1405. The server determines, according to the network bandwidth reported by the terminal, that the network bandwidth of the terminal satisfies the third preset condition.
接收到终端上报的网络带宽后,服务器可以根据接收到的网络带宽确定终端的网络带宽,并在确定终端的网络带宽满足第三预设条件时,调整处理参数,以获取码率小于第一视频流的视频流。After receiving the network bandwidth reported by the terminal, the server may determine the network bandwidth of the terminal according to the received network bandwidth, and when it is determined that the network bandwidth of the terminal meets the third preset condition, adjust the processing parameters to obtain a bit rate less than the first video. streaming video stream.
具体的,在本实施例中,服务器可以根据接收到的网络带宽确定终端的网络带宽,并在确定终端的网络带宽小于或等于30Mbps记录终端的网络带宽。当服务器确定10秒内的网络带宽平均值小于或等于30Mbps时,调整处理参数。Specifically, in this embodiment, the server may determine the network bandwidth of the terminal according to the received network bandwidth, and record the network bandwidth of the terminal when it is determined that the network bandwidth of the terminal is less than or equal to 30 Mbps. When the server determines that the average network bandwidth within 10 seconds is less than or equal to 30 Mbps, the processing parameters are adjusted.
在本申请实施例中,终端的网络带宽在10秒内的平均值小于或等于30Mbps,30Mbps称为第五预设值。除了30Mbps,第五预设值也可以是其他数值,例如20Mbps、25Mbps、35Mbps或40Mbps等,此处不作限定。In this embodiment of the present application, the average value of the network bandwidth of the terminal within 10 seconds is less than or equal to 30 Mbps, and 30 Mbps is referred to as the fifth preset value. Besides 30Mbps, the fifth preset value may also be other values, such as 20Mbps, 25Mbps, 35Mbps, or 40Mbps, etc., which is not limited here.
在本申请实施例中,终端的网络带宽在10秒内的平均值小于或等于30Mbps,是第三预设条件。终端功耗满足第三预设条件表示当前终端当前的网络资源不足以传输当前的视频流,或依据当前的网络资源传输当前的视频流,效果不好,此时调整处理参数以减小视频流的码率大小。除了终端的网络带宽在10秒内的平均值小于或等于30Mbps,第三预设条件还可以是其他的条件,例如终端的网络带宽小于或等于30Mbps等,具体此处不作限定。In this embodiment of the present application, the average value of the network bandwidth of the terminal within 10 seconds is less than or equal to 30 Mbps, which is the third preset condition. If the power consumption of the terminal satisfies the third preset condition, it means that the current network resources of the current terminal are insufficient to transmit the current video stream, or the current video stream is transmitted according to the current network resources, and the effect is not good. In this case, the processing parameters are adjusted to reduce the video stream. bit rate size. In addition to the average value of the terminal's network bandwidth within 10 seconds being less than or equal to 30 Mbps, the third preset condition may also be other conditions, for example, the terminal's network bandwidth is less than or equal to 30 Mbps, which is not specifically limited here.
在本申请实施例中,终端的网络带宽在10秒内的平均值小于或等于30Mbps,或网络带宽小于或等于30Mbps,30Mbps称为第五预设值。在本申请实施例中,第五预设值为终端的网络带宽的一个阈值,当终端的网络带宽不高于该阈值时,表示终端的网络带宽处于过低的状态,可能需要降低视频流的码率。In this embodiment of the present application, the average value of the network bandwidth of the terminal within 10 seconds is less than or equal to 30 Mbps, or the network bandwidth is less than or equal to 30 Mbps, and 30 Mbps is referred to as the fifth preset value. In the embodiment of the present application, the fifth preset value is a threshold of the network bandwidth of the terminal. When the network bandwidth of the terminal is not higher than the threshold, it means that the network bandwidth of the terminal is in a state of being too low, and it may be necessary to reduce the bandwidth of the video stream. code rate.
1406、服务器减小Fov角度大小和预设码率,得到第二视频流。1406. The server reduces the Fov angle size and the preset bit rate to obtain a second video stream.
服务器确定终端功耗满足第三预设条件时,确定终端的网络带宽不足以承担当前视频流的传输,需要调小视频流的码率以匹配当前的网络。When the server determines that the power consumption of the terminal satisfies the third preset condition, it determines that the network bandwidth of the terminal is insufficient to transmit the current video stream, and needs to reduce the bit rate of the video stream to match the current network.
具体的,服务器减小Fov角度大小,同时降低预设码率,并根据调整后的Fov角度大 小和预设码率处理片源数据,得到第二视频流。第二视频流的码率小于第一视频流的码率。处理方式参见图2所实施示例的步骤202,此处不再赘述。Specifically, the server reduces the Fov angle size, reduces the preset code rate, and processes the slice source data according to the adjusted Fov angle size and the preset code rate to obtain the second video stream. The bit rate of the second video stream is smaller than the bit rate of the first video stream. For the processing method, refer to step 202 in the implementation example of FIG. 2 , and details are not repeated here.
减小后的Fov角度和降低后的预设码率,称为第一目标处理参数。The reduced Fov angle and the reduced preset code rate are called the first target processing parameter.
具体的,可以将Fov角度大小定为90×90,将预设码率定为第一目标码率,第一目标码率的大小等于第一带宽信息与预设比率的乘积。即本实施例中,第一目标处理参数为90×90的Fov角度大小和大小为第一目标码率的预设码率。服务器对VR球形高清图片进行90×90的截取,再将截取后的图片根据第一目标码率进行编码,获取第二视频流。Specifically, the Fov angle may be set as 90×90, the preset code rate may be set as the first target code rate, and the size of the first target code rate is equal to the product of the first bandwidth information and the preset ratio. That is, in this embodiment, the first target processing parameter is the Fov angle size of 90×90 and the size is the preset code rate of the first target code rate. The server intercepts the VR spherical high-definition picture at 90×90, and then encodes the intercepted picture according to the first target bit rate to obtain the second video stream.
或者,也可以取第一带宽信息在10秒内的平均值,将该平均值与预设比率的乘积,作为第一目标码率。Alternatively, the average value of the first bandwidth information within 10 seconds may also be taken, and the product of the average value and the preset ratio may be taken as the first target code rate.
在本申请实施例中,第一带宽信息10秒内的平均值,10秒称为第四时段,除了10秒,第四时段也可以具有其他时长,例如5秒、8秒、12秒或15秒等,此处不作限定。In this embodiment of the present application, the average value of the first bandwidth information within 10 seconds is referred to as the fourth time period. Besides 10 seconds, the fourth time period may also have other durations, such as 5 seconds, 8 seconds, 12 seconds, or 15 seconds. seconds, etc., which are not limited here.
在本申请实施例中,第一带宽信息在第四时段内的平均值,称为第一带宽平均值。In this embodiment of the present application, the average value of the first bandwidth information in the fourth time period is referred to as the first bandwidth average value.
具体的,预设比率可以为0至100%内的任一数值,例如50%、40%或60&,此处不作限定。Specifically, the preset ratio may be any value from 0 to 100%, such as 50%, 40% or 60%, which is not limited here.
具体的,第一目标码率也可以为一固定值,例如20Mbps、25Mbps或30Mbps等,此处不作限定。Specifically, the first target bit rate may also be a fixed value, such as 20 Mbps, 25 Mbps, or 30 Mbps, which is not limited here.
由于第一目标处理参数的Fov角度大小,小于初始处理参数的Fov角度大小,第二视频流所包含的高清数据就少于第一视频流。且第一目标处理参数的预设码率,小于初始处理参数的预设码率,则第二视频流的码率小于第一视频流的码率。Since the Fov angle size of the first target processing parameter is smaller than the Fov angle size of the initial processing parameter, the second video stream contains less high-definition data than the first video stream. And the preset bit rate of the first target processing parameter is smaller than the preset bit rate of the initial processing parameter, then the bit rate of the second video stream is smaller than the bit rate of the first video stream.
在本申请实施例中,除了Fov角度大小和预设码率,还可以调整其他的处理参数来调整视频流的码率,例如峰均比、关键帧(intra picture,I)与参考帧(predictive picture,P)的比值、帧率、分辨率、量化参数(quantization parameter,QP)或关键帧周期(Group of Pictures,GOP)等,此处不作限定。P帧也称为前后预测编码帧,此处不作限定。例如,当初始处理参数为每秒120帧的帧率时,步骤1406可以为服务器减小帧率,第一目标处理参数可以是每秒100帧的帧率,此处不做限定。In this embodiment of the present application, in addition to the Fov angle and the preset bit rate, other processing parameters can also be adjusted to adjust the bit rate of the video stream, such as peak-to-average ratio, key frame (intra picture, I) and reference frame (predictive frame) picture, P) ratio, frame rate, resolution, quantization parameter (quantization parameter, QP) or key frame period (Group of Pictures, GOP), etc., which are not limited here. The P frame is also referred to as a pre- and post-prediction coded frame, which is not limited here. For example, when the initial processing parameter is a frame rate of 120 frames per second, step 1406 may reduce the frame rate for the server, and the first target processing parameter may be a frame rate of 100 frames per second, which is not limited here.
1407、服务器向终端发送第二视频流。1407. The server sends the second video stream to the terminal.
1408、终端解码第二视频流,并向用户输出播放数据。1408. The terminal decodes the second video stream, and outputs playback data to the user.
步骤1407-1408参见图2所示实施例的步骤207-208,此处不再赘述。For steps 1407-1408, refer to steps 207-208 in the embodiment shown in FIG. 2, and details are not repeated here.
由于第二视频流的Fov角度大小比第一视频流的小,第二视频流比第一视频流包含更少的高清数据。且第二视频流的预设码率小于第一视频流,第二视频流比第一视频流具有更小的码率。Since the Fov angle size of the second video stream is smaller than that of the first video stream, the second video stream contains less high-definition data than the first video stream. And the preset bit rate of the second video stream is smaller than that of the first video stream, and the second video stream has a smaller bit rate than the first video stream.
本申请实施例通过服务器与终端交互,在服务器侧减小向终端发送的视频流的码率,从而实现对当前网络带宽的适配。In this embodiment of the present application, through the interaction between the server and the terminal, the bit rate of the video stream sent to the terminal is reduced on the server side, thereby realizing adaptation to the current network bandwidth.
2、处理参数为Fov角度大小:2. The processing parameter is the Fov angle size:
请参阅图15,图15为本申请实施例中的一种码率的调整方法的流程图。当处理参数为Fov角度大小时,本申请实施例提供的一种码率的调整方法的流程包括:Please refer to FIG. 15. FIG. 15 is a flowchart of a method for adjusting a code rate according to an embodiment of the present application. When the processing parameter is the size of the Fov angle, the flow of the method for adjusting the code rate provided by the embodiment of the present application includes:
1501-1505。1501-1505.
步骤1501-1505参见图14所实施示例的步骤1401-1405,此处不再赘述。For steps 1501-1505, refer to steps 1401-1405 in the implementation example of FIG. 14, and details are not repeated here.
1506、服务器减小Fov角度大小,得到第二视频流。1506. The server reduces the size of the Fov angle to obtain a second video stream.
当满足第三预设条件时,服务器可以通过减小Fov角度大小,降低视频流的码率。在本实施例中,减小后的Fov角度,称为第一目标处理参数。When the third preset condition is satisfied, the server may reduce the bit rate of the video stream by reducing the Fov angle size. In this embodiment, the reduced Fov angle is referred to as the first target processing parameter.
具体的,可以将Fov角度大小定为90×90。即本实施例中,第一目标处理参数为90×90的Fov角度大小。服务器对VR球形高清图片进行90×90的截取,再经过相应的处理,获取第二视频流。第二视频流的码率小于第一视频流的码率。Specifically, the size of the Fov angle can be set as 90×90. That is, in this embodiment, the first target processing parameter is the Fov angle size of 90×90. The server intercepts the VR spherical high-definition picture at 90×90, and then performs corresponding processing to obtain the second video stream. The bit rate of the second video stream is smaller than the bit rate of the first video stream.
在本申请实施例中,除了Fov角度大小,还可以调整其他的处理参数来调整视频流的码率,例如预设码率、峰均比、关键帧I与参考帧P的比值、帧率、分辨率、量化参数QP或关键帧周期GOP等,此处不作限定。In this embodiment of the present application, in addition to the Fov angle, other processing parameters can also be adjusted to adjust the bit rate of the video stream, such as preset bit rate, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, Resolution, quantization parameter QP or key frame period GOP, etc., are not limited here.
对第一预设条件的说明,参见图2所实施示例的步骤205,此处不再赘述。For the description of the first preset condition, refer to step 205 in the example implementation example in FIG. 2 , which will not be repeated here.
1507、服务器向终端发送第二视频流。1507. The server sends the second video stream to the terminal.
1508、终端解码第二视频流,并向用户输出播放数据。1508. The terminal decodes the second video stream, and outputs playback data to the user.
步骤1507-1508参见图2所示实施例的步骤207-208,此处不再赘述。For steps 1507-1508, refer to steps 207-208 in the embodiment shown in FIG. 2, and details are not repeated here.
由于第二视频流的Fov角度大小比第一视频流的小,第二视频流比第一视频流包含更少的高清数据。在其他条件相同的情况下,第二视频流的码率会小于第一视频流的码率。Since the Fov angle size of the second video stream is smaller than that of the first video stream, the second video stream contains less high-definition data than the first video stream. Under other conditions being the same, the bit rate of the second video stream will be smaller than the bit rate of the first video stream.
3、处理参数为预设码率:3. The processing parameter is the preset bit rate:
请参阅图16,图16为本申请实施例中的一种码率的调整方法的流程图。当处理参数为预设码率时,本申请实施例提供的一种码率的调整方法的流程包括:Please refer to FIG. 16. FIG. 16 is a flowchart of a method for adjusting a code rate according to an embodiment of the present application. When the processing parameter is the preset code rate, the process of the method for adjusting the code rate provided by the embodiment of the present application includes:
1601-1605。1601-1605.
步骤1601-1605参见图14所实施示例的步骤1401-1405,此处不再赘述。For steps 1601-1605, refer to steps 1401-1405 in the implementation example of FIG. 14, and details are not repeated here.
1606、服务器减小预设码率,得到第二视频流。1606. The server reduces the preset bit rate to obtain a second video stream.
当满足第一预设条件时,服务器可以通过减小预设码率,降低视频流的码率。在本实施例中,减小后的预设码率,称为第一目标处理参数。When the first preset condition is met, the server may reduce the code rate of the video stream by reducing the preset code rate. In this embodiment, the reduced preset code rate is called the first target processing parameter.
具体的,可以将预设码率定为第一目标码率,第一目标码率的大小等于第一带宽信息与预设比率的乘积。即本实施例中,第一目标处理参数为大小为第一目标码率的预设码率。服务器根据第一目标码率对片源数据进行编码,获取第二视频流。Specifically, the preset code rate may be set as the first target code rate, and the size of the first target code rate is equal to the product of the first bandwidth information and the preset rate. That is, in this embodiment, the first target processing parameter is a preset code rate whose size is the first target code rate. The server encodes the slice source data according to the first target bit rate, and obtains the second video stream.
或者,也可以取第一带宽信息在10秒内的平均值,将该平均值与预设比率的乘积,作为第一目标码率。Alternatively, the average value of the first bandwidth information within 10 seconds may also be taken, and the product of the average value and the preset ratio may be taken as the first target code rate.
在本申请实施例中,第一带宽信息10秒内的平均值,10秒称为第四时段,除了10秒,第四时段也可以具有其他时长,例如5秒、8秒、12秒或15秒等,此处不作限定。In this embodiment of the present application, the average value of the first bandwidth information within 10 seconds is referred to as the fourth time period. Besides 10 seconds, the fourth time period may also have other durations, such as 5 seconds, 8 seconds, 12 seconds, or 15 seconds. seconds, etc., which are not limited here.
在本申请实施例中,第一带宽信息在第四时段内的平均值,称为第一带宽平均值。In this embodiment of the present application, the average value of the first bandwidth information in the fourth time period is referred to as the first bandwidth average value.
具体的,预设比率可以为0至100%内的任一数值,例如50%、40%或60&,此处不作限定。Specifically, the preset ratio may be any value from 0 to 100%, such as 50%, 40% or 60%, which is not limited here.
具体的,第一目标码率也可以为一固定值,例如20Mbps、25Mbps或30Mbps等,此处不作限定。Specifically, the first target bit rate may also be a fixed value, such as 20 Mbps, 25 Mbps, or 30 Mbps, which is not limited here.
由于第一目标处理参数的预设码率,小于初始处理参数的预设码率,第二视频流的码 率就小于第一视频流的码率。Since the preset code rate of the first target processing parameter is smaller than the preset code rate of the initial processing parameter, the code rate of the second video stream is smaller than the code rate of the first video stream.
在本申请实施例中,除了Fov角度大小,还可以调整其他的处理参数来调整视频流的码率,例如Fov角度大小、峰均比、关键帧I与参考帧P的比值、帧率、分辨率、量化参数QP或关键帧周期GOP等,此处不作限定。In this embodiment of the present application, in addition to the Fov angle, other processing parameters can also be adjusted to adjust the bit rate of the video stream, such as the Fov angle, peak-to-average ratio, ratio of key frame I to reference frame P, frame rate, resolution rate, quantization parameter QP or key frame period GOP, etc., which are not limited here.
1607、服务器向终端发送第二视频流。1607. The server sends the second video stream to the terminal.
1608、终端解码第二视频流,并向用户输出播放数据。1608. The terminal decodes the second video stream, and outputs playback data to the user.
步骤1607-1608参见图2所示实施例的步骤207-208,此处不再赘述。For steps 1607-1608, refer to steps 207-208 in the embodiment shown in FIG. 2, and details are not repeated here.
由于第二视频流的预设码率比第一视频流的小,在其他条件相同的情况下,第二视频流的码率会小于第一视频流的码率。Since the preset bit rate of the second video stream is smaller than that of the first video stream, under other conditions being the same, the bit rate of the second video stream will be smaller than that of the first video stream.
4、将视频流的码率与网络带宽实时匹配:4. Match the bit rate of the video stream with the network bandwidth in real time:
请参阅图17,图17为本申请实施例中的一种码率的调整方法的流程图,本申请实施例提供的一种码率的调整方法的流程包括:Please refer to FIG. 17. FIG. 17 is a flowchart of a method for adjusting a code rate according to an embodiment of the present application. The flowchart of a method for adjusting a code rate provided by the embodiment of the present application includes:
1701-1705。1701-1705.
步骤1701-1705参见图14所示实施例的步骤1401-1405,此处不再赘述。For steps 1701-1705, refer to steps 1401-1405 in the embodiment shown in FIG. 14, and details are not repeated here.
1706、服务器根据第一带宽信息得到第二视频流。1706. The server obtains the second video stream according to the first bandwidth information.
服务器可以根据第一带宽信息确定第一目标码率,第一目标码率的大小等于第一带宽信息与预设比率的乘积。The server may determine the first target code rate according to the first bandwidth information, and the size of the first target code rate is equal to the product of the first bandwidth information and a preset ratio.
当第一目标码率小于或等于30Mbps时,以第一目标码率作为预设码率;当第一目标码率大于30Mbps时,以30Mbps作为预设码率。服务器根据该预设码率对片源数据进行编码,获取第二视频流。When the first target code rate is less than or equal to 30 Mbps, the first target code rate is used as the preset code rate; when the first target code rate is greater than 30 Mbps, 30 Mbps is used as the preset code rate. The server encodes the slice source data according to the preset bit rate, and obtains the second video stream.
在本申请实施例中,30Mbps作为确定预设码率的一个阈值。当第一目标码率超过该阈值时,预设码率即为该阈值;当第一目标码率低于该阈值时,预设码率即为第一目标码率。30Mbps仅是对该阈值的举例,并不造成限定没该阈值也可以是25Mbps、35Mbps等,此处不做限定。In this embodiment of the present application, 30 Mbps is used as a threshold for determining the preset bit rate. When the first target code rate exceeds the threshold, the preset code rate is the threshold; when the first target code rate is lower than the threshold, the preset code rate is the first target code rate. 30 Mbps is only an example of the threshold, and does not limit the threshold, which can also be 25 Mbps, 35 Mbps, etc., which is not limited here.
或者,也可以取第一带宽信息在10秒内的平均值,将该平均值与预设比率的乘积,作为第一目标码率。Alternatively, the average value of the first bandwidth information within 10 seconds may also be taken, and the product of the average value and the preset ratio may be taken as the first target code rate.
在本申请实施例中,第一带宽信息10秒内的平均值,10秒称为第四时段,除了10秒,第四时段也可以具有其他时长,例如5秒、8秒、12秒或15秒等,此处不作限定。In this embodiment of the present application, the average value of the first bandwidth information within 10 seconds is referred to as the fourth time period. Besides 10 seconds, the fourth time period may also have other durations, such as 5 seconds, 8 seconds, 12 seconds, or 15 seconds. seconds, etc., which are not limited here.
在本申请实施例中,第一带宽信息在第四时段内的平均值,称为第一带宽平均值。In this embodiment of the present application, the average value of the first bandwidth information in the fourth time period is referred to as the first bandwidth average value.
具体的,预设比率可以为0至100%内的任一数值,例如50%、40%或60&,此处不作限定。Specifically, the preset ratio may be any value from 0 to 100%, such as 50%, 40% or 60%, which is not limited here.
1707、服务器向终端发送第二视频流。1707. The server sends the second video stream to the terminal.
1708、终端解码第二视频流,并向用户输出播放数据。1708. The terminal decodes the second video stream, and outputs playback data to the user.
步骤1407-1408参见图2所示实施例的步骤207-208,此处不再赘述。For steps 1407-1408, refer to steps 207-208 in the embodiment shown in FIG. 2, and details are not repeated here.
1709、终端向服务器上报第二带宽信息。1709. The terminal reports the second bandwidth information to the server.
终端获取终端的网络带宽,终端的网络带宽表示终端的网络资源。在本申请实施例中,此时上报的网络带宽,即为第二带宽信息。The terminal acquires the network bandwidth of the terminal, and the network bandwidth of the terminal represents the network resources of the terminal. In this embodiment of the present application, the network bandwidth reported at this time is the second bandwidth information.
具体的,终端可以周期上报第二带宽信息,例如每5秒上报一次。除了周期上报,也可以通过其他方式上报,例如满足某上报条件时上报等,此处不作限定。Specifically, the terminal may report the second bandwidth information periodically, for example, once every 5 seconds. In addition to periodic reporting, it can also be reported in other ways, such as reporting when certain reporting conditions are met, which is not limited here.
具体的,5秒仅是对上报周期的举例,上报周期还可以是10秒或12秒等,此处不作限定。Specifically, 5 seconds is only an example of the reporting period, and the reporting period may also be 10 seconds or 12 seconds, which is not limited here.
具体的,终端可以通过以HTTP为代表的网络协议上报第二带宽信息。除了HTTP,终端也可通过其他协议上报,例如TCP等,此处不作限定。Specifically, the terminal may report the second bandwidth information through a network protocol represented by HTTP. In addition to HTTP, the terminal can also report through other protocols, such as TCP, etc., which is not limited here.
1710、终端根据第二带宽信息,确定第二目标码率。1710. The terminal determines a second target code rate according to the second bandwidth information.
服务器可以根据第二带宽信息确定第二目标码率,第二目标码率的大小等于第二带宽信息与预设比率的乘积。The server may determine the second target code rate according to the second bandwidth information, and the size of the second target code rate is equal to the product of the second bandwidth information and the preset ratio.
或者,也可以取第二带宽信息在10秒内的平均值,将该平均值与预设比率的乘积,作为第二目标码率。Alternatively, the average value of the second bandwidth information within 10 seconds may also be taken, and the product of the average value and the preset ratio may be taken as the second target code rate.
在本申请实施例中,第二带宽信息10秒内的平均值,10秒称为第五时段,除了10秒,第五时段也可以具有其他时长,例如5秒、8秒、12秒或15秒等,此处不作限定。In this embodiment of the present application, the average value of the second bandwidth information within 10 seconds, 10 seconds is called the fifth time period. Besides 10 seconds, the fifth time period may also have other durations, such as 5 seconds, 8 seconds, 12 seconds, or 15 seconds. seconds, etc., which are not limited here.
在本申请实施例中,第二带宽信息在第五时段内的平均值,称为第二带宽平均值。In this embodiment of the present application, the average value of the second bandwidth information in the fifth time period is referred to as the second bandwidth average value.
具体的,预设比率可以为0至100%内的任一数值,例如50%、40%或60&,此处不作限定。Specifically, the preset ratio may be any value from 0 to 100%, such as 50%, 40% or 60%, which is not limited here.
1711、终端根据第二目标码率,得到第三视频流。1711. The terminal obtains a third video stream according to the second target bit rate.
当第二目标码率小于或等于30Mbps时,以第二目标码率作为预设码率;当第二目标码率大于30Mbps时,以30Mbps作为预设码率。服务器根据该预设码率对片源数据进行编码,获取第二视频流。When the second target code rate is less than or equal to 30 Mbps, the second target code rate is used as the preset code rate; when the second target code rate is greater than 30 Mbps, 30 Mbps is used as the preset code rate. The server encodes the slice source data according to the preset bit rate, and obtains the second video stream.
在本申请实施例中,30Mbps作为确定预设码率的一个阈值。当第二目标码率超过该阈值时,预设码率即为该阈值;当第二目标码率低于该阈值时,预设码率即为第二目标码率。30Mbps仅是对该阈值的举例,并不造成限定没该阈值也可以是25Mbps、35Mbps等,此处不做限定。In this embodiment of the present application, 30 Mbps is used as a threshold for determining the preset bit rate. When the second target code rate exceeds the threshold, the preset code rate is the threshold; when the second target code rate is lower than the threshold, the preset code rate is the second target code rate. 30 Mbps is only an example of the threshold, and does not limit the threshold, which can also be 25 Mbps, 35 Mbps, etc., which is not limited here.
1712、服务器向终端发送第三视频流。1712. The server sends a third video stream to the terminal.
1713、终端解码第三视频流,并向用户输出播放数据。1713. The terminal decodes the third video stream, and outputs playback data to the user.
步骤1712-1713参见图5所述实施例的步骤512-513,此处不再赘述。For steps 1712-1713, refer to steps 512-513 in the embodiment shown in FIG. 5, and details are not repeated here.
在本申请实施例中,目标码率可以根据变化的网络带宽,实时调整视频流的带宽,实现了视频流码率大小对网络带宽的实时匹配,在保证视频流传输不卡顿的前期下充分利用了网络带宽。In the embodiment of the present application, the target bit rate can adjust the bandwidth of the video stream in real time according to the changing network bandwidth, so as to realize the real-time matching between the video stream bit rate and the network bandwidth, and fully ensure that the video stream transmission is not stuck in the early stage. utilizes network bandwidth.
下面对本申请实施例中的服务器进行描述。图18是本申请实施例提供的一种服务器结构示意图。该服务器1800可以包括一个或一个以上中央处理器(central processing units,CPU)1801和存储器1805。该存储器1805中存储有一个或一个以上的应用程序或数据。The server in the embodiment of the present application is described below. FIG. 18 is a schematic structural diagram of a server provided by an embodiment of the present application. The server 1800 may include one or more central processing units (CPUs) 1801 and memory 1805 . The memory 1805 stores one or more application programs or data.
其中,存储器1805可以是易失性存储或持久存储。存储在存储器1805的程序可以包括一个或一个以上模块,每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1801可以设置为与存储器1805通信,在服务器1800上执行存储器1805中的一系列指令操作。Among them, the memory 1805 may be volatile storage or persistent storage. A program stored in memory 1805 may include one or more modules, each of which may include a series of instructions to operate on the server. Furthermore, the central processing unit 1801 may be configured to communicate with the memory 1805 to execute a series of instruction operations in the memory 1805 on the server 1800 .
服务器1800还可以包括一个或一个以上电源1802,一个或一个以上有线或无线网络接口1803,一个或一个以上收发器接口1804,和/或,一个或一个以上操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等。 Server 1800 may also include one or more power supplies 1802, one or more wired or wireless network interfaces 1803, one or more transceiver interfaces 1804, and/or, one or more operating systems, such as Windows Server™, Mac OS X™ , UnixTM, LinuxTM, FreeBSDTM, etc.
该服务器1800可以执行前述图2至图17所示实施例中服务器所执行的操作,具体此处不再赘述。The server 1800 may perform the operations performed by the servers in the foregoing embodiments shown in FIG. 2 to FIG. 17 , and details are not repeated here.
下面对本申请实施例中的终端进行描述。图19是本申请实施例提供的一种终端结构示意图。该终端1900可以包括一个或一个以上中央处理器(central processing units,CPU)1601和存储器1905。该存储器1905中存储有一个或一个以上的应用程序或数据。The terminal in the embodiment of the present application is described below. FIG. 19 is a schematic structural diagram of a terminal provided by an embodiment of the present application. The terminal 1900 may include one or more central processing units (CPUs) 1601 and memory 1905 . The memory 1905 stores one or more application programs or data.
其中,存储器1905可以是易失性存储或持久存储。存储在存储器1905的程序可以包括一个或一个以上模块,每个模块可以包括对终端中的一系列指令操作。更进一步地,中央处理器1901可以设置为与存储器1905通信,在服务器1900上执行存储器1905中的一系列指令操作。Among them, the memory 1905 may be volatile storage or persistent storage. The program stored in the memory 1905 may include one or more modules, and each module may include a series of instruction operations on the terminal. Further, the central processing unit 1901 may be configured to communicate with the memory 1905 to execute a series of instruction operations in the memory 1905 on the server 1900.
终端1900还可以包括一个或一个以上电源1902,一个或一个以上有线或无线网络接口1903,一个或一个以上收发器接口1904,和/或,一个或一个以上操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等。Terminal 1900 may also include one or more power supplies 1902, one or more wired or wireless network interfaces 1903, one or more transceiver interfaces 1904, and/or, one or more operating systems, such as Windows Server™, Mac OS X™ , UnixTM, LinuxTM, FreeBSDTM, etc.
该终端1900可以执行前述图2至图17所示实施例中终端所执行的操作,具体此处不再赘述。The terminal 1900 can perform the operations performed by the terminal in the foregoing embodiments shown in FIG. 2 to FIG. 17 , and details are not repeated here.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which is not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus 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 may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-only memory)、 随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may 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 application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disk and other media that can store program codes .

Claims (25)

  1. 一种调整终端功耗的方法,其特征在于,包括:A method for adjusting power consumption of a terminal, comprising:
    服务器以第一码率向终端发送视频流;The server sends the video stream to the terminal at the first bit rate;
    所述服务器接收来自所述终端的第一功耗相关信息,所述第一功耗相关信息用于表示所述终端的功耗,所述终端的功耗与所述视频流的播放相关;receiving, by the server, first power consumption related information from the terminal, where the first power consumption related information is used to represent the power consumption of the terminal, and the power consumption of the terminal is related to the playback of the video stream;
    所述服务器根据所述第一功耗相关信息确定所述终端的功耗满足第一预设条件;The server determines, according to the first power consumption related information, that the power consumption of the terminal satisfies a first preset condition;
    所述服务器以低于所述第一码率的第二码率向所述终端发送所述视频流。The server sends the video stream to the terminal at a second bit rate lower than the first bit rate.
  2. 根据权利要求1所述的方法,其特征在于,The method of claim 1, wherein:
    所述第一功耗相关信息包括所述终端的CPU占用率,所述服务器根据所述第一功耗相关信息确定所述终端的功耗满足第一预设条件,包括:The first power consumption related information includes the CPU occupancy rate of the terminal, and the server determines, according to the first power consumption related information, that the power consumption of the terminal satisfies a first preset condition, including:
    所述服务器根据接收到的所述终端的CPU占用率,确定所述终端的CPU占用率大于或等于第一预设值。The server determines, according to the received CPU occupancy rate of the terminal, that the CPU occupancy rate of the terminal is greater than or equal to a first preset value.
  3. 根据权利要求1所述的方法,其特征在于,所述第一功耗相关信息包括所述终端的剩余电量,所述服务器根据所述第一功耗相关信息确定所述终端的功耗满足第一预设条件,包括:The method according to claim 1, wherein the first power consumption related information includes the remaining power of the terminal, and the server determines, according to the first power consumption related information, that the power consumption of the terminal satisfies the first power consumption. a preset condition, including:
    所述服务器根据接收到的所述终端的剩余电量,确定所述终端的剩余电量小于或等于第二预设值。The server determines, according to the received remaining power of the terminal, that the remaining power of the terminal is less than or equal to a second preset value.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述服务器以低于所述第一码率的第二码率向所述终端发送所述视频流之前,所述方法还包括:The method according to any one of claims 1 to 3, wherein before the server sends the video stream to the terminal at a second bit rate lower than the first bit rate, the method Also includes:
    所述服务器减小视场Fov角度大小;或者the server reduces the Fov angle size of the field of view; or
    所述服务器降低所述视频流的码率。The server reduces the bit rate of the video stream.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述服务器以低于所述第一码率的第二码率向所述终端发送所述视频流之后,所述方法还包括:The method according to any one of claims 1 to 4, wherein after the server sends the video stream to the terminal at a second bit rate lower than the first bit rate, the method Also includes:
    所述服务器接收来自所述终端的第二功耗相关信息,所述第二功耗相关信息用于表示所述终端的功耗;receiving, by the server, second power consumption related information from the terminal, where the second power consumption related information is used to represent the power consumption of the terminal;
    所述服务器根据所述第二功耗相关信息确定所述终端的功耗满足第二预设条件;The server determines, according to the second power consumption related information, that the power consumption of the terminal satisfies a second preset condition;
    所述服务器以高于所述第二码率的第三码率向所述终端发送所述视频流。The server sends the video stream to the terminal at a third bit rate higher than the second bit rate.
  6. 根据权利要求5所述的方法,其特征在于,所述第二功耗相关信息包括所述终端的CPU占用率,所述服务器根据所述第二功耗相关信息确定所述终端的功耗满足第二预设条件,包括:The method according to claim 5, wherein the second power consumption-related information includes a CPU occupancy rate of the terminal, and the server determines, according to the second power consumption-related information, that the power consumption of the terminal satisfies The second preset condition includes:
    所述服务器根据接收到的所述终端的CPU占用率,确定所述终端的CPU占用率小于或等于第三预设值;或者,The server determines, according to the received CPU occupancy rate of the terminal, that the CPU occupancy rate of the terminal is less than or equal to a third preset value; or,
    所述服务器根据接收到的所述终端的CPU占用率,确定所述终端的CPU占用率在第二时段内的平均值小于或等于所述第三预设值。The server determines, according to the received CPU occupancy rate of the terminal, that the average value of the CPU occupancy rate of the terminal in the second period is less than or equal to the third preset value.
  7. 根据权利要求5所述的方法,其特征在于,所述第二功耗相关信息包括所述终端的剩余电量,所述服务器根据所述第二功耗相关信息确定所述终端的功耗满足第二预设条件,包括:The method according to claim 5, wherein the second power consumption related information includes the remaining power of the terminal, and the server determines, according to the second power consumption related information, that the power consumption of the terminal satisfies the first power consumption. Two preset conditions, including:
    所述服务器根据接收到的所述终端的剩余电量,确定所述终端的剩余电量大于或等于第四预设值。The server determines, according to the received remaining power of the terminal, that the remaining power of the terminal is greater than or equal to a fourth preset value.
  8. 根据权利要求5至7中任一项所述的方法,其特征在于,所述服务器以高于所述第二码率的第三码率向所述终端发送所述视频流之前,所述方法还包括:The method according to any one of claims 5 to 7, wherein before the server sends the video stream to the terminal at a third bit rate higher than the second bit rate, the method Also includes:
    所述服务器增大视场Fov角度大小;或者The server increases the Fov angle size of the field of view; or
    所述服务器提升所述视频流的码率。The server increases the bit rate of the video stream.
  9. 一种调整终端功耗的方法,其特征在于,包括:A method for adjusting power consumption of a terminal, comprising:
    终端以第一码率接收来自服务器的视频流;The terminal receives the video stream from the server at the first bit rate;
    所述终端向所述服务器发送第一功耗相关信息,所述第一功耗相关信息用于表示所述终端的功耗,所述终端的功耗与所述视频流的播放相关;The terminal sends first power consumption related information to the server, where the first power consumption related information is used to indicate the power consumption of the terminal, and the power consumption of the terminal is related to the playback of the video stream;
    在所述终端的功耗满足第一预设条件的情况下,所述终端以第二码率接收来自所述服务器的视频流,所述第二码率低于所述第一码率。When the power consumption of the terminal satisfies the first preset condition, the terminal receives the video stream from the server at a second bit rate, and the second bit rate is lower than the first bit rate.
  10. 根据权利要求9所述的方法,其特征在于,所述第一功耗相关信息包括所述终端的CPU占用率,所述终端的功耗满足第一预设条件包括:The method according to claim 9, wherein the first power consumption related information comprises the CPU occupancy rate of the terminal, and the power consumption of the terminal satisfying the first preset condition comprises:
    所述终端的CPU占用率大于或等于第一预设值;或者,The CPU occupancy rate of the terminal is greater than or equal to the first preset value; or,
    所述终端的CPU占用率在第一时段内的平均值大于或等于所述第一预设值。The average value of the CPU occupancy rate of the terminal in the first time period is greater than or equal to the first preset value.
  11. 根据权利要求9所述的方法,其特征在于,所述第一功耗相关信息包括所述终端的剩余电量,所述终端的功耗满足第一预设条件包括:The method according to claim 9, wherein the first power consumption related information comprises the remaining power of the terminal, and the power consumption of the terminal satisfying the first preset condition comprises:
    所述终端的剩余电量小于或等于第二预设值。The remaining power of the terminal is less than or equal to the second preset value.
  12. 根据权利要求9至11中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9 to 11, wherein the method further comprises:
    所述终端向所述服务器发送第二功耗相关信息,所述第二功耗相关信息用于表示所述终端的功耗;sending, by the terminal, second power consumption related information to the server, where the second power consumption related information is used to indicate the power consumption of the terminal;
    在所述终端的功耗满足第二预设条件的情况下,所述终端以第三码率接收来自所述服务器的视频流,所述第三码率高于所述第二码率。In the case that the power consumption of the terminal satisfies the second preset condition, the terminal receives the video stream from the server at a third code rate, and the third code rate is higher than the second code rate.
  13. 根据权利要求12所述的方法,其特征在于,所述第二功耗相关信息包括所述终端的CPU占用率,所述终端的功耗满足第二预设条件包括:The method according to claim 12, wherein the second power consumption related information comprises the CPU occupancy rate of the terminal, and the power consumption of the terminal satisfying the second preset condition comprises:
    所述终端的CPU占用率小于或等于第三预设值;或者,The CPU occupancy rate of the terminal is less than or equal to the third preset value; or,
    所述终端的CPU占用率在第二时段内的平均值小于或等于所述第三预设值。The average value of the CPU occupancy rate of the terminal in the second time period is less than or equal to the third preset value.
  14. 根据权利要求12所述的方法,其特征在于,所述第二功耗相关信息包括所述终端的剩余电量,所述终端的功耗满足第二预设条件包括:The method according to claim 12, wherein the second power consumption related information comprises the remaining power of the terminal, and the power consumption of the terminal satisfying the second preset condition comprises:
    所述终端的剩余电量大于或等于第四预设值。The remaining power of the terminal is greater than or equal to the fourth preset value.
  15. 一种码率的调整方法,其特征在于,包括:A method for adjusting a code rate, comprising:
    服务器以第一码率向终端发送视频流;The server sends the video stream to the terminal at the first bit rate;
    所述服务器接收来自所述终端的第一带宽信息,所述第一带宽信息用于表示所述终端的网络带宽;receiving, by the server, first bandwidth information from the terminal, where the first bandwidth information is used to indicate the network bandwidth of the terminal;
    所述服务器根据所述第一带宽信息确定所述终端的网络带宽满足第三预设条件;The server determines, according to the first bandwidth information, that the network bandwidth of the terminal satisfies a third preset condition;
    所述服务器以低于所述第一码率的第二码率向所述终端发送所述视频流。The server sends the video stream to the terminal at a second bit rate lower than the first bit rate.
  16. 根据权利要求15所述的方法,其特征在于,所述第一带宽信息包括所述终端的网络带宽,所述服务器根据所述第一带宽信息确定所述终端的网络带宽满足第三预设条件,包括:The method according to claim 15, wherein the first bandwidth information includes a network bandwidth of the terminal, and the server determines, according to the first bandwidth information, that the network bandwidth of the terminal satisfies a third preset condition ,include:
    所述服务器根据接收到的所述终端的网络带宽,确定所述终端的网络带宽小于或等于第五预设值;或者,The server determines, according to the received network bandwidth of the terminal, that the network bandwidth of the terminal is less than or equal to a fifth preset value; or,
    所述服务器根据接收到的所述终端的网络带宽,确定所述终端的网络带宽在第三时段内的平均值小于或等于所述第五预设值。The server determines, according to the received network bandwidth of the terminal, that the average value of the network bandwidth of the terminal in the third time period is less than or equal to the fifth preset value.
  17. 根据权利要求15或16所述的方法,其特征在于,所述服务器以低于所述第一码率的第二码率向所述终端发送所述视频流之前,所述方法还包括:The method according to claim 15 or 16, wherein before the server sends the video stream to the terminal at a second bit rate lower than the first bit rate, the method further comprises:
    所述服务器减小视场Fov角度大小;或者the server reduces the Fov angle size of the field of view; or
    所述服务器降低所述视频流的码率。The server reduces the bit rate of the video stream.
  18. 根据权利要求15至17中任一项所述的方法,其特征在于,所述服务器以低于所述第一码率的第二码率向所述终端发送所述视频流之后,所述方法还包括:The method according to any one of claims 15 to 17, wherein after the server sends the video stream to the terminal at a second bit rate lower than the first bit rate, the method Also includes:
    所述服务器接收来自所述终端的第二带宽信息,所述第二带宽信息用于表示所述终端的网络带宽,所述第二带宽信息的数值大于所述第一带宽信息的数值;The server receives second bandwidth information from the terminal, where the second bandwidth information is used to represent the network bandwidth of the terminal, and the value of the second bandwidth information is greater than the value of the first bandwidth information;
    所述服务器根据所述第二带宽信息,以高于所述第二码率的第三码率向所述终端发送所述视频流。The server sends the video stream to the terminal at a third bit rate higher than the second bit rate according to the second bandwidth information.
  19. 一种码率的调整方法,其特征在于,包括:A method for adjusting a code rate, comprising:
    终端以第一码率接收来自服务器的视频流;The terminal receives the video stream from the server at the first bit rate;
    所述终端向所述服务器发送第一带宽信息,所述第一带宽信息用于表示所述终端的网络带宽;sending, by the terminal, first bandwidth information to the server, where the first bandwidth information is used to indicate the network bandwidth of the terminal;
    在所述终端的网络带宽满足第三预设条件的情况下,所述终端以第二码率接收来自所述服务器的视频流,所述第二码率低于所述第一码率。When the network bandwidth of the terminal satisfies the third preset condition, the terminal receives the video stream from the server at a second bit rate, where the second bit rate is lower than the first bit rate.
  20. 根据权利要求19所述的方法,其特征在于,所述第一带宽信息包括所述终端的网络带宽,所述终端的网络带宽满足第三预设条件包括:The method according to claim 19, wherein the first bandwidth information includes a network bandwidth of the terminal, and the network bandwidth of the terminal satisfying a third preset condition comprises:
    所述终端的网络带宽小于或等于第五预设值;或者,The network bandwidth of the terminal is less than or equal to the fifth preset value; or,
    所述终端的网络带宽在第三时段内的平均值小于或等于所述第五预设值。The average value of the network bandwidth of the terminal in the third time period is less than or equal to the fifth preset value.
  21. 根据权利要求19或20所述的方法,其特征在于,所述终端以第二码率接收来自所述服务器的视频流之后,所述方法还包括:The method according to claim 19 or 20, wherein after the terminal receives the video stream from the server at the second bit rate, the method further comprises:
    所述终端向所述服务器发送第二带宽信息,所述第二带宽信息用于表示所述终端的网络带宽,所述第二带宽信息的数值大于所述第一带宽信息的数值;The terminal sends second bandwidth information to the server, where the second bandwidth information is used to indicate the network bandwidth of the terminal, and the value of the second bandwidth information is greater than the value of the first bandwidth information;
    所述终端以第三码率接收来自所述服务器的视频流,所述第三码率高于所述第二码率。The terminal receives the video stream from the server at a third code rate, and the third code rate is higher than the second code rate.
  22. 一种调整码率的设备,其特征在于,包括:A device for adjusting a code rate, comprising:
    处理器和与所述处理器耦合的存储器;a processor and a memory coupled to the processor;
    所述存储器存储所述处理器执行的可执行指令,所述可执行指令指示所述处理器执行权利要求1至8或权利要求15至18中任一项所述的方法。The memory stores executable instructions executed by the processor, the executable instructions instructing the processor to perform the method of any one of claims 1 to 8 or claims 15 to 18.
  23. 一种调整码率的设备,其特征在于,包括:A device for adjusting a code rate, comprising:
    处理器和与所述处理器耦合的存储器;a processor and a memory coupled to the processor;
    所述存储器存储所述处理器执行的可执行指令,所述可执行指令指示所述处理器执行权利要求9至14或权利要求19至21中任一项所述的方法。The memory stores executable instructions executed by the processor, the executable instructions instructing the processor to perform the method of any one of claims 9 to 14 or claims 19 to 21 .
  24. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中保存有程序,当所述计算机执行所述程序时,执行如权利要求1至21中任一项所述的方法。A computer-readable storage medium, characterized in that a program is stored in the computer-readable storage medium, and when the computer executes the program, the method according to any one of claims 1 to 21 is executed.
  25. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上执行时,所述计算机执行如权利要求1至21中任一项所述的方法。A computer program product, characterized in that, when the computer program product is executed on a computer, the computer executes the method according to any one of claims 1 to 21 .
PCT/CN2021/133968 2020-11-30 2021-11-29 Method for adjusting power consumption of terminal, and method for adjusting bit rate, and related devices WO2022111684A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011377224.6 2020-11-30
CN202011377224.6A CN114584814A (en) 2020-11-30 2020-11-30 Method for adjusting power consumption of terminal, method for adjusting code rate and related equipment

Publications (1)

Publication Number Publication Date
WO2022111684A1 true WO2022111684A1 (en) 2022-06-02

Family

ID=81754021

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/133968 WO2022111684A1 (en) 2020-11-30 2021-11-29 Method for adjusting power consumption of terminal, and method for adjusting bit rate, and related devices

Country Status (2)

Country Link
CN (1) CN114584814A (en)
WO (1) WO2022111684A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116684668B (en) * 2023-08-03 2023-10-20 湖南马栏山视频先进技术研究院有限公司 Self-adaptive video frame processing method and playing terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090486A (en) * 2007-06-25 2007-12-19 中国联合通信有限公司 Monitoring device for multimedium monitoring information and its monitoring method
CN101115196A (en) * 2006-07-27 2008-01-30 腾讯科技(深圳)有限公司 Method, system and terminal for adjusting video quality
CN104410903A (en) * 2014-12-25 2015-03-11 安科智慧城市技术(中国)有限公司 Method and system for transcoding video based on mobile terminal
CN105635775A (en) * 2015-12-30 2016-06-01 惠州Tcl移动通信有限公司 Electricity saving method for mobile terminal video playing and system thereof and mobile terminal
KR101966588B1 (en) * 2018-06-15 2019-04-05 연세대학교 산학협력단 Method and apparatus for receiving video contents

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657321A (en) * 2015-11-09 2016-06-08 乐视致新电子科技(天津)有限公司 Adaptive video definition adjusting method, apparatus and terminal
KR102623391B1 (en) * 2017-01-10 2024-01-11 삼성전자주식회사 Method for Outputting Image and the Electronic Device supporting the same
CN109413525B (en) * 2018-09-30 2020-01-14 Oppo广东移动通信有限公司 Encoding rate adjustment method, encoding rate adjustment device, electronic device, and storage medium
CN111541915B (en) * 2020-07-07 2020-11-13 鹏城实验室 Low-power-consumption video processing method, device and equipment for mobile terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101115196A (en) * 2006-07-27 2008-01-30 腾讯科技(深圳)有限公司 Method, system and terminal for adjusting video quality
CN101090486A (en) * 2007-06-25 2007-12-19 中国联合通信有限公司 Monitoring device for multimedium monitoring information and its monitoring method
CN104410903A (en) * 2014-12-25 2015-03-11 安科智慧城市技术(中国)有限公司 Method and system for transcoding video based on mobile terminal
CN105635775A (en) * 2015-12-30 2016-06-01 惠州Tcl移动通信有限公司 Electricity saving method for mobile terminal video playing and system thereof and mobile terminal
KR101966588B1 (en) * 2018-06-15 2019-04-05 연세대학교 산학협력단 Method and apparatus for receiving video contents

Also Published As

Publication number Publication date
CN114584814A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
US11503307B2 (en) System and method for automatic encoder adjustment based on transport data
CA2962040C (en) Video quality of experience based on video quality estimation
US7984179B1 (en) Adaptive media transport management for continuous media stream over LAN/WAN environment
US10171815B2 (en) Coding manner switching method, transmit end, and receive end
CA2758763C (en) Method and device for fast pushing unicast stream in fast channel change
JP7496022B2 (en) Client, server, receiving method and transmitting method
CN105393583B (en) Media distributing network with media bursts transfer capability
US10104407B2 (en) Method and device for network-assisted client-centric QoE optimization
US20180351868A1 (en) Multicast abr flow prioritization using error detection thresholds in the receiver
US11146606B2 (en) Data buffering method, network device, and storage medium
US20170142029A1 (en) Method for data rate adaption in online media services, electronic device, and non-transitory computer-readable storage medium
CN107743252A (en) A kind of method for reducing live delay
CN108965807B (en) Real-time video playing control method and device, terminal and storage medium
WO2022111684A1 (en) Method for adjusting power consumption of terminal, and method for adjusting bit rate, and related devices
TWI723394B (en) Method for shaping video streams, set-up box and storage medium
US9258347B2 (en) Encoding of a video frame for transmission to a plurality of clients
WO2009103351A1 (en) Method and apparatus for obtaining media over a communications network
Zhao et al. Flexible dual tcp/udp streaming for h. 264 hd video over wlans
AU2019201095A1 (en) System and method for automatic encoder adjustment based on transport data
US8095955B2 (en) Methods and systems for improving network response during channel change
CN105306970B (en) A kind of control method and device of live streaming media transmission speed
CN114513620A (en) Video frame loss and frame supplement transmission method and system based on WebRTC (Web real-time communication) weak network environment and application
Laine et al. Network Capacity Estimators Predicting QoE in HTTP Adaptive Streaming
Podborski et al. Tile based panoramic streaming using shifted IDR representations
Luthra et al. Server-Based Smart Adaptive Bit Rate (SABR) Streaming With Statistical Multiplexing

Legal Events

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

Ref document number: 21897184

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21897184

Country of ref document: EP

Kind code of ref document: A1