Live broadcast power consumption control method and device, mobile terminal and readable storage medium
By adjusting the screen refresh rate to the live streaming frame rate during mobile terminal live streaming, the problems of rapid battery consumption and unstable display on mobile terminals are solved, extending battery life, improving image stability, and enhancing user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2024-12-03
- Publication Date
- 2026-06-05
AI Technical Summary
Mobile devices experience rapid battery drain and short battery life during live streaming, and the display is unstable, which can lead to issues such as inconsistent makeup effects.
When the mobile terminal is in live streaming mode, the live streaming frame rate of the live streaming application is obtained, and the screen refresh frame rate is adjusted to the live streaming frame rate to reduce unnecessary screen refreshes and reduce power consumption. At the same time, the screen refresh frame rate is adjusted under high load or high temperature conditions to control temperature and load.
It extends the battery life of mobile devices, improves the stability of the display screen, avoids problems such as unstable makeup effects and makeup smudging, and enhances the user experience.
Smart Images

Figure CN122160867A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a live power consumption control method, device, mobile terminal, and readable storage medium. Background Technology
[0002] With the continuous development of network technology, live streaming is becoming increasingly widespread. Due to the convenience of mobile devices, most users choose to use them for live streaming. However, mobile devices have limited battery power, while live streaming requires significant power consumption, resulting in short battery life for mobile devices. Summary of the Invention
[0003] Therefore, it is necessary to provide a live streaming power consumption control method, device, mobile terminal, and readable storage medium that can extend the battery life of mobile terminals, addressing the aforementioned technical problems.
[0004] Firstly, this application provides a live streaming power consumption control method applied to a mobile terminal, the method comprising:
[0005] When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application;
[0006] Obtain the current screen refresh rate of the mobile terminal;
[0007] If the current screen refresh rate is greater than the live streaming frame rate, the screen refresh rate of the mobile terminal is adjusted to the live streaming frame rate to adjust the power consumption of the mobile terminal.
[0008] Secondly, this application also provides a live streaming power consumption control method, applied to a mobile terminal, the method comprising:
[0009] When the mobile terminal is in live streaming mode, determine the information of the live streaming thread;
[0010] Based on the information of the live streaming thread, live streaming resources are scheduled to adjust the power consumption of the mobile terminal.
[0011] Thirdly, this application also provides a live streaming power consumption control device for use in a mobile terminal, the device comprising:
[0012] The acquisition unit is used to acquire the live frame rate of the live application when the mobile terminal is in a live streaming state.
[0013] The acquisition unit is further configured to acquire the current screen refresh rate of the mobile terminal;
[0014] An adjustment unit is configured to adjust the screen refresh rate of the mobile terminal to the live streaming frame rate when the current screen refresh rate is greater than the live streaming frame rate, so as to adjust the power consumption of the mobile terminal.
[0015] Fourthly, this application also provides a live streaming power consumption control device for use in a mobile terminal, the device comprising:
[0016] The determining unit is used to determine information about the live streaming thread when the mobile terminal is in a live streaming state.
[0017] The scheduling unit is used to schedule live streaming resources based on the information of the live streaming thread in order to adjust the power consumption of the mobile terminal.
[0018] Fifthly, this application also provides a mobile terminal, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0019] When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application;
[0020] Obtain the current screen refresh rate of the mobile terminal;
[0021] If the current screen refresh rate is greater than the live streaming frame rate, the screen refresh rate of the mobile terminal is adjusted to the live streaming frame rate to adjust the power consumption of the mobile terminal.
[0022] Sixthly, this application also provides a mobile terminal, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0023] When the mobile terminal is in live streaming mode, determine the information of the live streaming thread;
[0024] Based on the information of the live streaming thread, live streaming resources are scheduled to adjust the power consumption of the mobile terminal.
[0025] Seventhly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0026] When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application;
[0027] Obtain the current screen refresh rate of the mobile terminal;
[0028] If the current screen refresh rate is greater than the live streaming frame rate, the screen refresh rate of the mobile terminal is adjusted to the live streaming frame rate to adjust the power consumption of the mobile terminal.
[0029] Eighthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0030] When the mobile terminal is in live streaming mode, determine the information of the live streaming thread;
[0031] Based on the information of the live streaming thread, live streaming resources are scheduled to adjust the power consumption of the mobile terminal.
[0032] Ninthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0033] When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application;
[0034] Obtain the current screen refresh rate of the mobile terminal;
[0035] If the current screen refresh rate is greater than the live streaming frame rate, the screen refresh rate of the mobile terminal is adjusted to the live streaming frame rate to adjust the power consumption of the mobile terminal.
[0036] In a tenth aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0037] When the mobile terminal is in live streaming mode, determine the information of the live streaming thread;
[0038] Based on the information of the live streaming thread, live streaming resources are scheduled to adjust the power consumption of the mobile terminal.
[0039] In this embodiment, when the mobile terminal is in live streaming mode, the mobile terminal obtains the live streaming frame rate of the live streaming application and its current screen refresh frame rate. If the current screen refresh frame rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, the mobile terminal's screen refresh frame rate is adjusted to match the live streaming frame rate of the live streaming application to adjust the mobile terminal's power consumption. Therefore, during live streaming, if the mobile terminal's current screen refresh frame rate is greater than the live streaming frame rate of the live streaming application, the mobile terminal's screen refresh frame rate can be reduced to match the live streaming frame rate of the live streaming application. This reduces unnecessary screen refreshes and lowers the mobile terminal's power consumption without affecting the live streaming effect, thereby extending the mobile terminal's battery life. Furthermore, reducing the number of screen refreshes reduces the amount of video data that needs to be processed, allowing the mobile terminal sufficient time and computing power to process each frame of video data. This improves the stability of the mobile terminal's display and avoids problems such as unstable makeup effects or makeup fading during live streaming. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application;
[0042] Figure 2 This is a flowchart illustrating a live streaming power consumption control method provided in an embodiment of this application;
[0043] Figure 3 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application;
[0044] Figure 4 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application;
[0045] Figure 5 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application;
[0046] Figure 6 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application;
[0047] Figure 7 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application;
[0048] Figure 8 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application;
[0049] Figure 9 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application;
[0050] Figure 10 This is a schematic diagram of a system architecture provided in an embodiment of this application;
[0051] Figure 11 This is a schematic diagram of the structure of a screen service device provided in an embodiment of this application;
[0052] Figure 12 This is a schematic diagram of the structure of a frame rate determination module provided in an embodiment of this application;
[0053] Figure 13 This is a schematic diagram of the structure of a frame rate control module provided in an embodiment of this application;
[0054] Figure 14 This is a schematic diagram of a virtual VSync signal output by a screen service device according to an embodiment of this application;
[0055] Figure 15 This is a schematic diagram of a virtual VSync signal output by another screen service device provided in this application embodiment;
[0056] Figure 16 This is a schematic diagram of a virtual VSync signal output by another screen service device provided in the embodiments of this application;
[0057] Figure 17 This is a schematic diagram of a live screen recording process provided in an embodiment of this application;
[0058] Figure 18 This is a schematic diagram of the structure of a scheduling device provided in an embodiment of this application;
[0059] Figure 19 This is a schematic diagram of the structure of a frequency adjustment device provided in an embodiment of this application;
[0060] Figure 20 This is a schematic diagram of the structure of a live streaming power consumption control device provided in an embodiment of this application;
[0061] Figure 21 This is a schematic diagram of another live streaming power consumption control device provided in an embodiment of this application;
[0062] Figure 22 This is a schematic diagram of the structure of a mobile terminal provided in an embodiment of this application. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0064] To better understand the embodiments of this application, the network architecture of this application will be introduced first.
[0065] Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application. Figure 1 As shown, the network architecture may include a server 101 and multiple mobile terminals 102.
[0066] The mobile terminal 102 has a live streaming application installed or exists on it, i.e., a live streaming client. Server 101 is the server for the live streaming application.
[0067] The mobile terminal 102 and the server 101 are connected via a network, meaning the live streaming application connects to the server 101 via the mobile terminal 102. This network can be a local area network (LAN) or a wide area network (WAN).
[0068] When a user needs to broadcast live, the user can launch the live streaming application on their mobile terminal 102. Upon detecting this launch operation, the mobile terminal 102 can respond and launch the live streaming application. The user can then interact with the live streaming components within the application interface. Upon detecting this interaction, the mobile terminal 102 can respond and enter the live streaming interface, i.e., the user's live streaming room. Video data can be captured via the camera, and audio data can be captured via an audio capture device. The video and audio data can be combined into audio-visual data, which can be displayed on the live streaming interface according to the mobile terminal's screen refresh rate. Simultaneously, the audio-visual data can be encoded according to the live streaming application's frame rate and then sent to the server. Upon receiving the encoded audio-visual data from the mobile terminal, the server can store it. The server can also send the encoded audio-visual data to other mobile terminals watching the user's live stream. After other mobile terminals receive the encoded audio and video data from the server, they can decode the encoded audio and video data and then display the decoded audio and video data in the user's live streaming room in the live streaming application.
[0069] Mobile terminals can include, but are not limited to, smartphones, tablets, and portable wearable devices. Portable wearable devices can include smartwatches and smart bracelets.
[0070] A server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms.
[0071] It should be understood that Figure 1 This is an exemplary illustration of the network architecture of this application and does not limit the network architecture of this application.
[0072] To better understand the embodiments of this application, the relevant technologies will be introduced below.
[0073] During live streaming on mobile devices, the workload is typically substantial. Mobile devices utilize high computing power and bandwidth to meet these demands, making power consumption a significant concern. For example, in multi-user live streaming scenarios, large amounts of video and audio data need to be transmitted. Furthermore, the use of live streaming effects necessitates the invocation of image processing and effects generation algorithms. These complex live streaming scenarios place a heavy load on the Central Processing Unit (CPU) and Graphics Processing Unit (GPU), leading to rapid battery drain and shortened battery life.
[0074] In addition, because mobile terminals require high computing power, they do not have enough time and computing power to process each frame of video data, which can easily cause instability in the display of mobile terminals, such as unstable makeup effects for live streamers and makeup fading.
[0075] Based on the above network architecture Figure 2 This is a flowchart illustrating a live streaming power consumption control method provided in an embodiment of this application. The live streaming power consumption control method is applied to a mobile terminal. Figure 2 As shown, the live streaming power consumption control method may include the following steps.
[0076] 201. When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application.
[0077] The live streaming frame rate of a live streaming application can be the encoding frame rate of the audio and video data sent by the live streaming application, that is, the encoding frame rate of the audio and video data sent by the live streaming application to the server.
[0078] This live streaming application is a live streaming application that is running on a mobile device, that is, a live streaming application that is running in the foreground of the mobile device.
[0079] When a mobile device is in a live streaming state, it can be understood that a live streaming application is running in the foreground on the mobile device, and the live streaming application is in a live streaming state.
[0080] When a mobile device is in live streaming mode, it can obtain the live streaming frame rate of the live streaming application.
[0081] The frame rate of a live streaming application can be fixed or it can change over time.
[0082] When the live streaming frame rate of a live streaming application remains constant, the mobile device can obtain the live streaming frame rate when the application starts broadcasting, i.e., when entering the live streaming interface. Since the live streaming frame rate is fixed, the mobile device does not need to repeatedly obtain the live streaming frame rate, reducing unnecessary processing and thus lowering the processing resources and power consumption of the mobile device.
[0083] When the live frame rate of a live streaming application changes, the mobile terminal can periodically, in real time, at regular intervals, or when it detects a change in the live frame rate of the live streaming application, to obtain the live frame rate of the live streaming application. This ensures that the live frame rate of the live streaming application being used is the latest live frame rate and guarantees the validity of the live frame rate of the live streaming application being used.
[0084] Different live streaming applications can have different or the same frame rate.
[0085] 202. Obtain the current screen refresh rate of the mobile terminal.
[0086] The screen refresh rate of a mobile device is the number of times its display refreshes per second. The current screen refresh rate of a mobile device is the number of times its display is currently refreshing per second.
[0087] The mobile terminal can periodically, in real time, at regular intervals, or when it detects changes in the live streaming frame rate of the live streaming application to obtain the current screen refresh frame rate of the mobile terminal.
[0088] Steps 201 and 202 can be executed in parallel or sequentially.
[0089] 203. If the current screen refresh rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, adjust the screen refresh rate of the mobile terminal to the live streaming frame rate of the live streaming application in order to adjust the power consumption of the mobile terminal.
[0090] After obtaining the live streaming frame rate from the live streaming application and the mobile terminal's current screen refresh rate, it can compare the mobile terminal's current screen refresh rate with the live streaming application's frame rate. If the comparison result shows that the mobile terminal's current screen refresh rate is greater than the live streaming application's frame rate, it indicates that the screen refresh speed is faster than the speed required for live streaming, meaning the required frame rate for live streaming is less than the screen refresh rate. Since a higher screen refresh rate requires more CPU and GPU resources, resulting in higher power consumption for the mobile terminal, the mobile terminal's screen refresh rate can be adjusted to match the live streaming application's frame rate. This means reducing the mobile terminal's current screen refresh rate to match the live streaming application's frame rate, thereby reducing the number of screen refreshes, lowering power consumption, and extending battery life.
[0091] For example, suppose the live streaming application has a live streaming frame rate of 30 frames per second (FPS), and the mobile terminal's current screen refresh frame rate is 60 FPS. The mobile terminal's current screen refresh frame rate is 30 FPS higher than the live streaming application's live streaming frame rate. In order to extend the mobile terminal's battery life, the mobile terminal's screen refresh frame rate can be reduced from 60 FPS to 30 FPS.
[0092] exist Figure 2 In the live streaming power consumption control method shown, during live streaming on a mobile terminal, if the current screen refresh rate of the mobile terminal is higher than the live streaming application's frame rate, the mobile terminal's screen refresh rate can be reduced to the live streaming application's frame rate. This reduces unnecessary screen refreshes and lowers the mobile terminal's power consumption without affecting the live streaming effect, thereby extending the mobile terminal's battery life. Furthermore, reducing the number of screen refreshes reduces the amount of video data that needs to be processed, allowing the mobile terminal sufficient time and computing power to process each frame of video data. This improves the stability of the mobile terminal's display and avoids problems such as unstable makeup effects or makeup fading during live streaming.
[0093] Based on the above network architecture Figure 3 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application. This live streaming power consumption control method is applied to a mobile terminal. Figure 3 As shown, the live streaming power consumption control method may include the following steps.
[0094] 301. When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application.
[0095] 302. Obtain the current screen refresh rate of the mobile terminal.
[0096] For a detailed description of steps 301-302, please refer to the description of steps 201-202.
[0097] 303. Determine whether the current screen refresh frame rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application. If the current screen refresh frame rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, proceed to step 304. If the current screen refresh frame rate of the mobile terminal is less than or equal to the live streaming frame rate of the live streaming application, proceed to step 302.
[0098] 304. Determine whether the live streaming application's live streaming window is a full-screen window. If the live streaming application's live streaming window is determined to be a full-screen window, proceed to step 305. If the live streaming application's live streaming window is determined not to be a full-screen window, proceed to step 308.
[0099] 305. Determine whether there is a touch operation on the screen of the mobile terminal. If it is determined that there is no touch operation on the screen of the mobile terminal, proceed to step 306. If it is determined that there is a touch operation on the screen of the mobile terminal, proceed to step 307.
[0100] 306. Adjust the screen refresh rate of the mobile terminal to match the live streaming frame rate of the live streaming application.
[0101] 307. Adjust the screen refresh rate of the mobile terminal to the maximum screen refresh rate of the mobile terminal.
[0102] 308. Determine the screen refresh rate of the mobile terminal based on the live streaming frame rate of the live streaming application and the screen refresh rate required by the target application.
[0103] After the mobile terminal obtains the live frame rate of the live streaming application and the current screen refresh frame rate of the mobile terminal, it can first determine whether the current screen refresh frame rate of the mobile terminal is greater than the live frame rate of the live streaming application. If the current screen refresh frame rate of the mobile terminal is less than or equal to the live frame rate of the live streaming application, and the live frame rate of the live streaming application remains constant, the mobile terminal can execute step 302. If the live frame rate of the live streaming application is changing, if steps 301 and 302 are executed sequentially, either step 301 or step 302 can be executed. If steps 301 and 302 are executed in parallel, both steps 301 and 302 can be executed.
[0104] When users are live streaming on their mobile devices, they may also be using the devices for other tasks. For example, a user might be watching the live stream while simultaneously sending messages. Therefore, if the mobile device's current screen refresh rate is higher than the live streaming application's frame rate, the mobile device can determine if the live streaming application's window is full-screen. If it is, this indicates that the application running in the foreground is the live streaming application. The mobile device can then determine if there are any touch operations on its screen. If no touch operations are detected, the mobile device only needs to meet the user's live streaming needs. Since the mobile device's current screen refresh rate is higher than the live streaming application's frame rate, the mobile device can adjust its screen refresh rate to match the live streaming application's frame rate, reducing power consumption without affecting the live streaming experience.
[0105] When a touch operation is detected on the mobile terminal's screen, the mobile terminal must not only meet the user's live streaming needs but also their operational requirements. To ensure the mobile terminal can respond to user actions promptly, its screen refresh rate can be adjusted to its maximum screen refresh rate to improve the user experience. The maximum screen refresh rate of the mobile terminal is the highest refresh rate that the mobile terminal's display can achieve. This maximum screen refresh rate is determined by the mobile terminal's hardware. Therefore, given a fixed hardware configuration, the maximum screen refresh rate of the mobile terminal remains constant.
[0106] If it's determined that the live streaming application's window is not full-screen (i.e., it's a small window), it indicates that the mobile device may be running more than just the live streaming application in the foreground. The mobile device can first determine if a target application exists. If a target application exists, the mobile device's screen refresh rate can be determined based on the live streaming application's frame rate and the target application's required screen refresh rate. In other words, the mobile device's screen refresh rate can be adjusted to the larger of these two values. The target application is any application running in the foreground other than the live streaming application.
[0107] If no target application is found, the mobile terminal only needs to meet the user's live streaming requirements. The mobile terminal can adjust its screen refresh rate to match the live streaming application's frame rate, reducing power consumption without affecting the live streaming quality.
[0108] exist Figure 3In the live streaming power consumption control method shown, during live streaming on a mobile terminal, when the mobile terminal's current screen refresh rate is higher than the live streaming application's frame rate, the live streaming application's window is full-screen, and there are no touch operations on the mobile terminal's screen, the mobile terminal's screen refresh rate can be reduced to the live streaming application's frame rate. This reduces unnecessary screen refreshes and lowers the mobile terminal's power consumption without affecting the live streaming effect, thus extending the mobile terminal's battery life. Furthermore, reducing the number of screen refreshes reduces the amount of video data that needs to be processed, allowing the mobile terminal sufficient time and computing power to process each frame of video data, improving the stability of the mobile terminal's display and avoiding problems such as unstable makeup effects or makeup fading. Further, when the mobile terminal's current screen refresh rate is higher than the live streaming application's frame rate, the live streaming application's window is full-screen, and there are touch operations on the mobile terminal's screen, adjusting the mobile terminal's screen refresh rate to the mobile terminal's maximum screen refresh rate ensures that the mobile terminal can respond to user operations promptly, improving response efficiency and thus enhancing the user experience. When the current screen refresh rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, and the live streaming window of the live streaming application is a small window, the screen refresh rate of the mobile terminal can be determined based on the live streaming frame rate of the live streaming application and the screen refresh rate required by the target application. This can ensure the normal operation of all foreground applications and will not affect the user's use of these applications, thereby improving the user experience.
[0109] Based on the above network architecture Figure 4 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application. This live streaming power consumption control method is applied to a mobile terminal. Figure 4 As shown, the live streaming power consumption control method may include the following steps.
[0110] 401. Determine whether the current temperature of the mobile terminal is less than the first threshold. If the current temperature of the mobile terminal is less than the first threshold, proceed to step 402. If the current temperature of the mobile terminal is greater than or equal to the first threshold, proceed to step 405.
[0111] 402. When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application.
[0112] 403. Obtain the current screen refresh rate of the mobile terminal.
[0113] 404. If the current screen refresh rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, adjust the screen refresh rate of the mobile terminal to the live streaming frame rate of the live streaming application.
[0114] 405. Reduce the screen refresh rate of the mobile terminal based on its current temperature.
[0115] The mobile terminal can acquire its current temperature in real time or periodically. It can then determine whether the current temperature is below a first threshold. If the current temperature is below the first threshold, it indicates that the mobile terminal's temperature is within the normal range, and the mobile terminal can use normal live power consumption control methods to control its power consumption, i.e., execute steps 402-404. A detailed description of steps 402-404 can be found in the descriptions of steps 201-203 and steps 301-308. Figure 4 Corresponding embodiments and Figure 3 The corresponding embodiments can be combined.
[0116] If the current temperature of the mobile terminal is determined to be greater than or equal to the first threshold, it indicates that the temperature of the mobile terminal is too high. In order to prevent the mobile terminal from burning out due to excessive temperature, it is necessary to control the temperature of the mobile terminal. The mobile terminal can reduce the screen refresh rate according to the current temperature of the mobile terminal, so as to reduce the number of screen refreshes, reduce the load on the CPU and GPU, and thus reduce the temperature of the mobile terminal.
[0117] The temperature of a mobile terminal is inversely correlated with its screen refresh rate; that is, the higher the screen refresh rate, the higher the temperature, and the lower the screen refresh rate, the lower the temperature.
[0118] In some embodiments, the mobile terminal stores a first correspondence between temperature ranges and screen refresh rates. The mobile terminal can first determine a first target screen refresh rate corresponding to its current temperature based on this first correspondence, and then adjust its screen refresh rate to the first target screen refresh rate, i.e., reduce the current screen refresh rate to the first target screen refresh rate. The first target screen refresh rate is lower than the live streaming frame rate of the live streaming application.
[0119] Since each temperature range corresponds to a screen refresh rate, the number of times the screen refresh rate needs to be adjusted can be reduced, thereby reducing power consumption.
[0120] For example, if the first threshold is 45° and the live streaming application has a frame rate of 30 FPS, the first correspondence can be shown in Table 1:
[0121] Temperature range Screen refresh rate (FPS) [45°,47°) 20 [47°,+) 15
[0122] Table 1
[0123] It should be understood that the above is an exemplary description of the first threshold, the live streaming frame rate of the live streaming application, and the first correspondence, and does not constitute a limitation thereof. For example, the first threshold can be 40°, and the live streaming frame rate of the live streaming application can be 25 FPS.
[0124] In some embodiments, the mobile terminal stores a second correspondence between temperature and screen refresh rate. The mobile terminal can first determine a second target screen refresh rate corresponding to its current temperature based on this second correspondence, and then adjust its current screen refresh rate to match the second target screen refresh rate, i.e., reduce its current screen refresh rate to the second target screen refresh rate. The second target screen refresh rate is lower than the live streaming frame rate of the live streaming application.
[0125] Since each temperature corresponds to a screen refresh rate, the screen refresh rate can be accurately controlled based on the temperature of the mobile terminal, thereby improving the control capability of the screen refresh rate.
[0126] exist Figure 4 In the live streaming power consumption control method shown, when the current temperature of the mobile terminal is below a first threshold, the mobile terminal is in live streaming mode, and the current screen refresh rate of the mobile terminal is higher than the live streaming application's frame rate, the screen refresh rate of the mobile terminal can be reduced to the live streaming application's frame rate. This reduces unnecessary screen refreshes and lowers the power consumption of the mobile terminal without affecting the live streaming effect, thereby extending the mobile terminal's battery life. Furthermore, reducing the number of screen refreshes reduces the amount of video data that needs to be processed, allowing the mobile terminal sufficient time and computing power to process each frame of video data. This improves the stability of the mobile terminal's display and avoids problems such as unstable makeup effects or makeup fading during live streaming. When the current temperature of the mobile terminal is greater than or equal to the first threshold, reducing the screen refresh rate based on the current temperature ensures that the mobile terminal's temperature does not become too high, preventing the mobile terminal from burning out due to overheating.
[0127] Based on the above network architecture Figure 5 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application. This live streaming power consumption control method is applied to a mobile terminal. Figure 5 As shown, the live streaming power consumption control method may include the following steps.
[0128] 501. When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application.
[0129] 502. Obtain the current screen refresh rate of the mobile terminal.
[0130] 503. If the current screen refresh rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, adjust the screen refresh rate of the mobile terminal to the live streaming frame rate of the live streaming application.
[0131] For a detailed description of steps 501-503, please refer to the description of steps 201-203.
[0132] 504. Obtain the current load of the mobile terminal.
[0133] 505. If the current load of the mobile terminal is greater than or equal to the second threshold, freeze the background application.
[0134] The mobile terminal can periodically, in real-time, or at set intervals obtain its current load—that is, obtain all current load data. It can then determine if the current load exceeds a second threshold. If the current load is greater than or equal to the second threshold, it indicates a high load that may affect the live stream. In this case, the mobile terminal can freeze all background applications to ensure the normal operation of the live stream application. Freezing all background applications can be understood as either the applications still running in the background but not actually running, or as the background applications still running but with reduced resource usage, ensuring only the critical threads within those background applications are operational.
[0135] If it is determined that the current load of the mobile terminal is less than the second threshold, it indicates that the load of the mobile terminal is small, and the mobile terminal can continue to monitor the load and can continue to execute step 504.
[0136] After freezing background applications, the mobile terminal can re-obtain its current load, i.e., the adjusted load. It then determines whether the current load is greater than or equal to a second threshold. If the current load is greater than or equal to the second threshold, it indicates that the adjusted load is still high, and the screen refresh rate can be reduced to lower the load below the second threshold. If the current load is less than the second threshold, it indicates that the adjusted load is low, and step 504 can be continued.
[0137] Mobile terminals can reduce their screen refresh rate in fixed increments or in variable increments.
[0138] When reducing the screen refresh rate of a mobile terminal in fixed steps, the mobile terminal can first reduce the screen refresh rate by one step. Then, it can be determined whether the load of the adjusted mobile terminal is less than a second threshold. If it is less than the second threshold, the adjustment will stop. If the load of the adjusted mobile terminal is greater than or equal to the second threshold, the screen refresh rate can be reduced by another step, until the load of the mobile terminal is less than the second threshold.
[0139] When reducing the screen refresh rate of the mobile terminal by varying step sizes, the mobile terminal can store a third correspondence between the load or load range and the step size. The mobile terminal can determine the first step size corresponding to its current load based on the third correspondence, and then reduce the screen refresh rate by the first step size. Next, it can be determined whether the current load of the mobile terminal is less than a second threshold. If it is determined that the current load is less than the second threshold, step 504 can be executed. If it is determined that the current load is greater than or equal to the second threshold, the second step size corresponding to the current load can be determined based on the third correspondence, and then the screen refresh rate can be reduced by the second step size until the load of the mobile terminal is less than the second threshold.
[0140] exist Figure 5 In the live streaming power consumption control method shown, during live streaming on a mobile terminal, if the current screen refresh rate of the mobile terminal is higher than the live streaming application's frame rate, the mobile terminal's screen refresh rate can be reduced to the live streaming application's frame rate. This reduces unnecessary screen refreshes and lowers the mobile terminal's power consumption without affecting the live streaming effect, thus extending the mobile terminal's battery life. Furthermore, reducing the number of screen refreshes reduces the amount of video data that needs to be processed, allowing the mobile terminal sufficient time and computing power to process each frame of video data. This improves the stability of the mobile terminal's display and avoids problems such as unstable makeup effects or makeup fading during live streaming. Moreover, when the mobile terminal's current load is greater than or equal to a second threshold, background applications are frozen, ensuring that the live streaming application has sufficient resources to run and guaranteeing its normal operation.
[0141] Based on the above network architecture Figure 6 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application. This live streaming power consumption control method is applied to a mobile terminal. Figure 6 As shown, the live streaming power consumption control method may include the following steps.
[0142] 601. When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application.
[0143] 602. Obtain the current screen refresh rate of the mobile terminal.
[0144] 603. If the current screen refresh rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, adjust the screen refresh rate of the mobile terminal to the live streaming frame rate of the live streaming application.
[0145] For a detailed description of steps 601-603, please refer to the description of steps 201-203.
[0146] 604. When the mobile terminal is in live screen recording mode, obtain the current frame rate of the virtual screen.
[0147] 605. If the current frame rate of the virtual screen is greater than the live frame rate of the live application, determine the frame rate of the virtual screen based on the live frame rate of the live application so that the frame rate of the virtual screen is less than or equal to the live frame rate of the live application.
[0148] The frame rate of the virtual screen is the frame rate at which the video data is recorded on the virtual screen.
[0149] When mobile devices simultaneously stream and record screens, the device not only needs to output video and audio data but also needs to record both. During live streaming, a virtual screen can be created to record the currently displayed content. During recording, video data consumes a significant portion of the GPU resources, while audio data requires sustained high-frequency CPU processing. This increases the CPU and GPU load, leading to faster battery drain and potentially triggering thermal management strategies due to overheating. This can cause processor frequency degradation, resulting in stuttering and performance loss, severely impacting user experience.
[0150] Since the audio and video data from live screen recordings are also used for subsequent playback in live streaming applications, the power consumption of a mobile device is higher when it's recording compared to live streaming without recording. Therefore, to reduce power consumption, we can obtain the current frame rate of the virtual screen and then determine if it's higher than the live streaming application's frame rate. If it is, it indicates that the virtual screen's frame rate is exceeding the actual required frame rate, wasting valuable frame rate. The virtual screen's frame rate can then be determined based on the live streaming application's frame rate. Setting the virtual screen's frame rate to be less than or equal to the live streaming application's frame rate reduces power consumption while maintaining recording quality and avoids stuttering and performance degradation caused by overheating.
[0151] Mobile devices can directly adjust the frame rate of the virtual screen to match the live streaming frame rate of the live streaming application.
[0152] Mobile terminals can also determine whether the live streaming application's frame rate is less than or equal to the mobile terminal's current screen refresh rate. If the live streaming application's frame rate is less than or equal to the mobile terminal's current screen refresh rate, the virtual screen's frame rate can be adjusted to match the live streaming application's frame rate, reducing power consumption while maintaining screen recording quality. If the live streaming application's frame rate is greater than the mobile terminal's current screen refresh rate, it means the screen refresh rate is less than the live streaming application's frame rate. The virtual screen's frame rate can then be adjusted to match the mobile terminal's current screen refresh rate, avoiding resource waste caused by the virtual screen's frame rate exceeding the screen refresh rate, thus reducing power consumption.
[0153] When the mobile terminal is in live screen recording mode, it can first obtain its current temperature, and then determine whether the current temperature is greater than or equal to a sixth threshold. If the current temperature is less than the sixth threshold, steps 604-605 can be executed. If the current temperature is greater than or equal to the sixth threshold, it indicates that the mobile terminal's temperature is high. To prevent the mobile terminal from burning out due to overheating, its temperature needs to be controlled. The mobile terminal can reduce the frame rate of the virtual screen based on its current temperature. This reduces the load on the CPU and GPU, thereby lowering the mobile terminal's temperature.
[0154] The temperature of a mobile terminal is inversely correlated with the frame rate of the virtual screen; that is, the higher the frame rate of the virtual screen, the higher the temperature of the mobile terminal, and the lower the frame rate of the virtual screen, the lower the temperature of the mobile terminal.
[0155] The mobile terminal reduces the frame rate of the virtual screen based on the current temperature of the mobile terminal, which is similar to reducing the screen refresh frame rate of the mobile terminal based on the current temperature of the mobile terminal. For a detailed description, please refer to the relevant description.
[0156] exist Figure 6In the live streaming power consumption control method shown, during live streaming on a mobile terminal, if the current screen refresh rate of the mobile terminal is higher than the live streaming application's frame rate, the mobile terminal's screen refresh rate can be reduced to the live streaming application's frame rate. This reduces unnecessary screen refreshes and lowers power consumption without affecting the live streaming effect, thus extending the mobile terminal's battery life. Furthermore, reducing screen refreshes decreases the amount of video data that needs to be processed, allowing the mobile terminal sufficient time and computing power to process each frame, improving the stability of the displayed image and preventing issues such as unstable makeup effects or makeup fading. Further, when the mobile terminal is in live recording mode and the virtual screen's frame rate is higher than the live streaming application's frame rate, determining the virtual screen's frame rate based on the live streaming application's frame rate reduces the virtual screen's frame rate, decreasing the data processing load on the CPU and GPU, thereby lowering power consumption while maintaining the live recording effect.
[0157] Based on the above network architecture Figure 7 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application. This live streaming power consumption control method is applied to a mobile terminal. Figure 7 As shown, the live streaming power consumption control method may include the following steps.
[0158] 701. When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application.
[0159] 702. Obtain the current screen refresh rate of the mobile terminal.
[0160] 703. If the current screen refresh rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, adjust the screen refresh rate of the mobile terminal to the live streaming frame rate of the live streaming application.
[0161] For a detailed description of steps 701-703, please refer to the description of steps 201-203.
[0162] 704. Determine the information of the live streaming thread.
[0163] 705. Schedule live streaming resources based on the information of the live streaming thread.
[0164] When a mobile terminal is in live streaming mode, the mobile terminal can periodically, periodically, in real-time, or when the thread changes, determine the information of the live streaming thread. The live streaming thread is a thread related to the live streaming application. The information of the live streaming thread can be its priority, its load, or other relevant information.
[0165] Once the mobile terminal identifies the live streaming thread, it can schedule live streaming resources based on this information, essentially adjusting the resources for the live streaming application. Live streaming resources can include CPU and GPU resources. They may also include Video Processing Unit (VPU) resources, Double Data Rate (DDR) resources, and so on.
[0166] In some embodiments, the mobile terminal can determine the priorities of multiple threads and allocate CPU and GPU resources to them based on their priorities. The multiple threads refer to all threads currently running on the mobile terminal. These multiple threads may include live streaming threads and non-live streaming threads. Non-live streaming threads are those threads currently running on the mobile terminal other than the live streaming threads. Non-live streaming threads may include threads related to applications running in the background of the mobile terminal. Non-live streaming threads may also include threads related to applications running in the foreground of the mobile terminal other than the live streaming application.
[0167] Mobile terminals can determine the priority of multiple threads periodically, at set intervals, in real time, or when threads change. When the mobile terminal is in live streaming mode, in order to ensure the normal operation of the live stream, the mobile terminal can set, determine, or configure a higher priority for the live streaming thread. Therefore, the priority of the live streaming thread is higher than that of the non-live streaming thread.
[0168] After determining the priorities of multiple threads, the mobile terminal can allocate CPU and GPU resources to them based on these priorities, effectively scheduling CPU and GPU resources for each thread. The CPU and GPU resources allocated to a thread are positively correlated with its priority. Because the mobile terminal sets a high priority for the live streaming thread, it can ensure that more CPU and GPU resources are allocated to it, guaranteeing smooth live streaming.
[0169] In some embodiments, the mobile terminal can determine the information of the live streaming thread, and based on the information of the live streaming thread, determine the live streaming scene, CPU utilization, and GPU utilization of the live streaming application, and adjust the CPU and GPU frequencies based on one or more of the live streaming scene, CPU utilization, GPU utilization, and the temperature of the mobile terminal.
[0170] CPU utilization is the ratio of total CPU resources to the resources used by the CPU. GPU utilization is the ratio of total GPU resources to the resources used by the GPU.
[0171] Mobile devices can determine the live streaming scenario of a live streaming application based on information from the live streaming thread. The live streaming scenario can be a single-person live streaming scenario, a multi-person live streaming scenario, etc.
[0172] Mobile terminals can determine CPU utilization and GPU utilization based on the load of live streaming threads and the load of non-live streaming threads.
[0173] As can be seen, mobile terminals can adjust the CPU and GPU frequencies as needed, thereby improving the flexibility of CPU and GPU usage.
[0174] Since the higher the CPU and GPU frequency, the greater the power consumption of the mobile terminal, in the live streaming application's live streaming scenario (a preset scenario), if the CPU utilization is less than the third threshold, the GPU utilization is less than the fourth threshold, or the current temperature of the mobile terminal is greater than or equal to the fifth threshold, the mobile terminal can reduce the CPU and GPU frequency in order to reduce the power consumption of the mobile terminal.
[0175] When the live streaming application operates within a preset scenario, it indicates that the mobile terminal does not require high CPU and GPU frequencies. To reduce power consumption, the mobile terminal can lower the CPU and GPU frequencies. Conversely, when the live streaming application operates outside the preset scenario, it indicates that the mobile terminal requires higher CPU and GPU frequencies, and the mobile terminal can increase the CPU and GPU frequencies.
[0176] For example, in live streaming scenarios where the live stream is a one-person or no-person live stream, the mobile terminal can reduce the CPU and GPU frequencies. Conversely, in scenarios where the live stream is a multi-person live stream, the mobile terminal can increase the CPU and GPU frequencies to ensure smooth communication.
[0177] When CPU utilization is below the third threshold, it indicates low CPU utilization and sufficient CPU resources. The mobile terminal can reduce the CPU and GPU frequencies; the reduced CPU frequency is sufficient for business operations, ensuring normal operation while reducing power consumption. When CPU utilization is greater than or equal to the third threshold, it indicates high CPU utilization and potentially insufficient CPU resources. The mobile terminal can increase the CPU and GPU frequencies to ensure normal business operation.
[0178] When GPU utilization is below the fourth threshold, it indicates low GPU utilization and sufficient GPU resources. The mobile terminal can reduce CPU and GPU frequencies to lower power consumption while ensuring normal business operation. When GPU utilization is greater than or equal to the fourth threshold, it indicates high GPU utilization and potentially insufficient GPU resources. The mobile terminal can increase CPU and GPU frequencies to ensure normal business operation.
[0179] If the current temperature of the mobile terminal is greater than or equal to the fifth threshold, it indicates that the temperature of the mobile terminal is high. The mobile terminal can reduce the frequency of the CPU and GPU in order to reduce power consumption and thus reduce the temperature.
[0180] In the case of a live streaming application with a preset live streaming scenario and CPU utilization below the third threshold, it indicates that the mobile terminal does not need to have a high CPU and GPU frequency and the CPU utilization is low. The mobile terminal can reduce the CPU and GPU frequency.
[0181] In the case of a live streaming application with a preset live streaming scenario and GPU utilization below the fourth threshold, it indicates that the mobile terminal does not need to have a high CPU and GPU frequency and the GPU utilization is relatively low. The mobile terminal can reduce the CPU and GPU frequency.
[0182] In the case of a live streaming application with a preset live streaming scenario and the current temperature of the mobile terminal being greater than or equal to the fifth threshold, it indicates that the mobile terminal does not need to have a high CPU and GPU frequency, and that the mobile terminal has a high temperature, so the mobile terminal can reduce the CPU and GPU frequency.
[0183] When CPU utilization is below the third threshold and GPU utilization is below the fourth threshold, it indicates that the utilization of CPU and GPU is low, and the mobile terminal can reduce the CPU and GPU frequency.
[0184] If the CPU utilization is less than the third threshold and the current temperature of the mobile terminal is greater than or equal to the fifth threshold, it indicates that the CPU utilization is low and the temperature of the mobile terminal is high. The mobile terminal can reduce the frequency of the CPU and GPU.
[0185] If the GPU utilization is less than the fourth threshold and the current temperature of the mobile terminal is greater than or equal to the fifth threshold, it indicates that the GPU utilization is low and the temperature of the mobile terminal is high. The mobile terminal can reduce the frequency of the CPU and GPU.
[0186] In the live streaming application's preset scenario, where CPU utilization is less than the third threshold and GPU utilization is less than the fourth threshold, it indicates that the mobile terminal does not need to have a high CPU and GPU frequency, and the utilization of CPU and GPU is relatively low. The mobile terminal can reduce the CPU and GPU frequency.
[0187] In the live streaming application's preset scenario, where the CPU utilization is less than the third threshold and the current temperature of the mobile terminal is greater than or equal to the fifth threshold, it indicates that the mobile terminal does not need to have a high CPU and GPU frequency, the CPU utilization is low, and the mobile terminal temperature is high. Therefore, the mobile terminal can reduce the CPU and GPU frequency.
[0188] In the live streaming application's preset scenario, where the GPU utilization is less than the fourth threshold and the current temperature of the mobile terminal is greater than or equal to the fifth threshold, it indicates that the mobile terminal does not need to have a high CPU and GPU frequency, the GPU utilization is low, and the mobile terminal's temperature is high. Therefore, the mobile terminal can reduce the CPU and GPU frequency.
[0189] If the CPU utilization is less than the third threshold, the GPU utilization is less than the fourth threshold, and the current temperature of the mobile terminal is greater than or equal to the fifth threshold, it indicates that the utilization of the CPU and GPU is low and the temperature of the mobile terminal is high. The mobile terminal can reduce the frequency of the CPU and GPU.
[0190] In the live streaming application's preset scenario, where the CPU utilization is less than the third threshold, the GPU utilization is less than the fourth threshold, and the current temperature of the mobile terminal is greater than or equal to the fifth threshold, it indicates that the mobile terminal does not need to have a high CPU and GPU frequency, the CPU and GPU utilization is low, and the mobile terminal temperature is high. Therefore, the mobile terminal can reduce the CPU and GPU frequency.
[0191] There are no limitations on how the CPU and GPU frequencies are reduced. For example, a mobile terminal can reduce the frequency by a fixed step at a time. For example, when the CPU and GPU frequencies are high, the mobile terminal can reduce the frequency by multiple fixed steps at a time. For example, the mobile terminal can reduce the frequency by different steps at a time.
[0192] As can be seen, the frequencies of the CPU and GPU can be adjusted as needed, thereby increasing the flexibility of CPU and GPU usage.
[0193] exist Figure 7In the live streaming power consumption control method shown, during live streaming on a mobile terminal, if the current screen refresh rate of the mobile terminal is higher than the live streaming application's frame rate, the mobile terminal's screen refresh rate can be reduced to the live streaming application's frame rate. This reduces unnecessary screen refreshes and lowers the mobile terminal's power consumption without affecting the live streaming effect, thus extending the mobile terminal's battery life. Furthermore, reducing the number of screen refreshes reduces the amount of video data that needs to be processed, allowing the mobile terminal sufficient time and computing power to process each frame of video data. This improves the stability of the mobile terminal's display and avoids problems such as unstable makeup effects or makeup fading during live streaming. Moreover, by scheduling live streaming resources based on the live streaming thread information, resources can be scheduled as needed, thereby improving the flexibility of resource scheduling.
[0194] Based on the above network architecture Figure 8 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application. This live streaming power consumption control method is applied to a mobile terminal. Figure 8 As shown, the live streaming power consumption control method may include the following steps.
[0195] 801. When the mobile terminal is in live streaming mode, determine the information of the live streaming thread.
[0196] 802. Schedule live streaming resources based on the information of the live streaming thread.
[0197] For a detailed description of steps 801-802, please refer to the description of steps 704-705.
[0198] exist Figure 8 In the live streaming power consumption control method shown, during the live streaming process on the mobile terminal, live streaming resources are scheduled according to the information of the live streaming thread. The live streaming resources can be scheduled as needed, thereby improving the flexibility of resource scheduling.
[0199] Based on the above network architecture Figure 9 This is a flowchart illustrating another live streaming power consumption control method provided in an embodiment of this application. This live streaming power consumption control method is applied to a mobile terminal. Figure 9 As shown, the live streaming power consumption control method may include the following steps.
[0200] 901. Determine whether the current temperature of the mobile terminal is less than the first threshold. If the current temperature of the mobile terminal is less than the first threshold, proceed to step 902. If the current temperature of the mobile terminal is greater than or equal to the first threshold, proceed to step 910.
[0201] 902. When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application.
[0202] 903. Obtain the current screen refresh rate of the mobile terminal.
[0203] 904. Determine whether the current screen refresh frame rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application. If the current screen refresh frame rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, proceed to step 905. If the current screen refresh frame rate of the mobile terminal is less than or equal to the live streaming frame rate of the live streaming application, proceed to step 903.
[0204] 905. Determine whether the live streaming application's live streaming window is a full-screen window. If the live streaming application's live streaming window is determined to be a full-screen window, proceed to step 906. If the live streaming application's live streaming window is determined not to be a full-screen window, proceed to step 308.
[0205] 906. Determine whether there is a touch operation on the screen of the mobile terminal. If it is determined that there is no touch operation on the screen of the mobile terminal, proceed to step 907. If it is determined that there is a touch operation on the screen of the mobile terminal, proceed to step 909.
[0206] 907. Adjust the screen refresh rate of the mobile terminal to the live streaming frame rate of the live streaming application.
[0207] 908. Adjust the screen refresh rate of the mobile terminal to the maximum screen refresh rate of the mobile terminal.
[0208] 909. Determine the screen refresh rate of the mobile terminal based on the live streaming frame rate of the live streaming application and the screen refresh rate required by the target application.
[0209] 910. Reduce the screen refresh rate of the mobile terminal based on its current temperature.
[0210] 911. Obtain the current load of the mobile terminal.
[0211] 912. If the current load of the mobile terminal is greater than or equal to the second threshold, freeze the background application.
[0212] 913. When the mobile terminal is in live screen recording mode, obtain the current frame rate of the virtual screen.
[0213] 914. If the current frame rate of the virtual screen is greater than the live frame rate of the live application, determine the frame rate of the virtual screen based on the live frame rate of the live application so that the frame rate of the virtual screen is less than or equal to the live frame rate of the live application.
[0214] 915. Determine the information of the live streaming thread.
[0215] 916. Schedule live streaming resources based on the information of the live streaming thread.
[0216] in, Figure 9 The corresponding implementation example is Figures 3-7 The detailed description of steps 901-916 in the combined embodiment can be found in the above description and will not be repeated here. Correspondingly, the beneficial effects can also be found in the above description and will not be repeated here.
[0217] It should be understood that Figures 3-7 Any two embodiments in the corresponding examples can be combined with each other. Figures 3-7 Any three embodiments in the corresponding examples can be combined with each other. Figures 3-7 Any four embodiments in the corresponding examples can be combined with each other. Figures 3-7 Any five embodiments in the corresponding examples can be combined with each other, and there is no limitation on how they are combined. Figure 8 Corresponding embodiments and Figures 3-6 One or more embodiments in the corresponding examples can be combined with each other.
[0218] The above live streaming power consumption control method will be explained below in the context of specific scenarios.
[0219] For example, Figure 10 This is a schematic diagram of a system architecture provided in an embodiment of this application. For example... Figure 10 As shown, the system architecture may include live streaming applications, resource scheduling tools, variable refresh rate (VRR) service devices, refresh rate feature devices, management systems, screen service devices, and hardware composer (HWC) renderers.
[0220] When a live streaming application enters a direct interface or when the live streaming frame rate changes, it can send its live streaming frame rate and live streaming window information to the resource scheduling tool. The live streaming application can send these information to the resource scheduling tool in a request manner. For example, the live streaming application can send a first frame rate adjustment request to the resource scheduling tool. This first frame rate adjustment request can include the live streaming frame rate and live streaming window information. This request is used to request adjustment of the mobile terminal's screen refresh rate. The live streaming window information refers to the information of the live streaming window, which may include the window's name, hierarchy information, scaling information, and focus information. The hierarchy information refers to the stacking order of the live streaming windows on the mobile terminal's screen, i.e., the display hierarchy information. For example, a hierarchy information of 1 indicates that the live streaming window is displayed on top of the screen. The scaling information refers to the scaling status of the live streaming window. The focus information refers to whether the live streaming window can detect user interaction events. For example, the live streaming frame rate of the live streaming application can be 30 FPS.
[0221] The mobile terminal's operating system can also generate frame rate adjustment requests. For example, if the mobile terminal's current temperature is greater than or equal to a first threshold, the mobile terminal's operating system can generate a second frame rate adjustment request, which can then be sent to the resource scheduling tool. The second frame rate adjustment request may include the required screen refresh rate, live stream window information, and current temperature information.
[0222] After receiving a frame rate adjustment request, the resource scheduling tool can review the request. If the review is successful, it can forward the frame rate adjustment request to the VRR service device. The resource scheduling tool can perform permissions, integrity, and security checks on the frame rate adjustment request. The resource scheduling tool can be Hyper Boost or other resource scheduling software development kits (SDKs).
[0223] The refresh rate characteristic device can determine the maximum screen refresh rate of the mobile terminal based on the mobile terminal's hardware, and then send the maximum screen refresh rate of the mobile terminal to the management system. For example, the maximum screen refresh rate of the mobile terminal can be 60 FPS.
[0224] After receiving the maximum screen refresh rate of the mobile terminal from the refresh rate characteristic device, the management system can ensure that the mobile terminal's screen refresh rate does not exceed the maximum screen refresh rate. Furthermore, the management system can also send the mobile terminal's maximum screen refresh rate to the screen service device. The management system can be a Window Manager System (WMS), a Display Manager System (DMS), or other management systems.
[0225] The VRR service device can periodically, in real-time, or at regular intervals determine whether the number of received frame rate adjustment requests is greater than one. If the number of received frame rate adjustment requests is greater than one, it can select one frame rate adjustment request from multiple requests and then send the selected frame rate adjustment request to the screen service device. If the number of received frame rate adjustment requests is one, it can send this frame rate adjustment request to the screen service device.
[0226] The triggering conditions for generating frame rate adjustment requests may differ, leading to varying priorities for these requests. The VRR service device can select one frame rate adjustment request from multiple requests based on its priority. For example, the first frame rate adjustment request might be triggered by a live streaming application, while the second might be triggered due to excessively high temperatures. The second request has a higher priority than the first. Upon receiving both the first and second frame rate adjustment requests, the VRR service device can select the first request and send it to the screen service device.
[0227] Different mobile terminal scenarios may require different frame rate adjustment requests. Therefore, the VRR service device can select one frame rate adjustment request from multiple requests based on the current scenario of the mobile terminal. For example, the first frame rate adjustment request might be triggered by a live streaming application, while the third frame rate adjustment request might be triggered by excessive load. In a multi-person live streaming scenario, removing live streaming-related loads could lead to stuttering or other issues. Therefore, to ensure smooth live streaming, the VRR service device can select the first frame rate adjustment request from the first and third requests and send it to the screen service device, reducing power consumption without affecting the smoothness of the live stream.
[0228] It should be understood that the above is an exemplary description of a VRR service device selecting one frame rate adjustment request from multiple frame rate adjustment requests, and does not limit the selection method.
[0229] After receiving a frame rate adjustment request from the VRR service device, the screen service device can adjust the mobile terminal's screen refresh frame rate to the frame rate included in the frame rate adjustment request or the mobile terminal's maximum screen refresh frame rate. Once the screen service device determines the mobile terminal's screen refresh frame rate, it can send video data to the HWC renderer based on that frame rate. The screen service device can be SurfaceFlinger, or other modules or components with equivalent functionality.
[0230] For example, Figure 11 This is a schematic diagram of the structure of a screen service device provided in an embodiment of this application. Figure 11 As shown, the screen service device may include a frame rate determination module and a frame rate control module.
[0231] The frame rate determination module can determine the screen refresh frame rate of the mobile terminal based on the frame rate adjustment request and the mobile terminal's maximum screen refresh frame rate. For example, Figure 12 This is a schematic diagram of the structure of a frame rate determination module provided in an embodiment of this application. Figure 12 As shown, the frame rate determination unit may include a minimum frame rate unit, a window unit, a touch state unit, a maximum frame rate unit, and a decision unit. The input to the minimum frame rate unit is the frame rate included in the frame rate adjustment request. The input to the window unit is the live window information included in the frame rate adjustment request. The input to the touch state unit may be information about whether the mobile terminal is currently experiencing a touch operation. The input to the maximum frame rate unit is the maximum screen refresh frame rate of the mobile terminal. The decision unit can determine the screen refresh frame rate of the mobile terminal based on the output information of the window unit and the output information of the touch state unit, either the frame rate included in the frame rate adjustment request or the maximum screen refresh frame rate of the mobile terminal. For example, when the frame rate adjustment request is a first frame rate adjustment request, the decision unit can determine whether the live window is a full-screen window based on the output information of the window unit. If it is a full-screen window, it can determine whether there is a touch operation on the mobile terminal's screen based on the output result of the touch state unit. If there is no touch operation on the mobile terminal's screen, it can output the live frame rate of the live application; if there is a touch operation on the mobile terminal's screen, it can output the maximum screen refresh frame rate of the mobile terminal. If the output information of the window unit includes preset hierarchy, no scaling, and the ability of the live window to detect user operation events, the decision unit can determine that the live window is a full-screen window.
[0232] The frame rate control module can generate a virtual Vsync signal based on the screen refresh rate of the mobile terminal.
[0233] For example, Figure 13This is a schematic diagram of the structure of a frame rate control module provided in an embodiment of this application. Figure 13 As shown, the frame rate control module may include a decision unit, a first control unit, and a second control unit. The first and second control units can generate a virtual Vsync signal. The first control unit can be the native DispVsync of the mobile terminal's operating system, and the second control unit is an improved DispVsync. After receiving the screen refresh frame rate of the mobile terminal, the decision unit can determine whether the first control unit supports the mobile terminal's screen refresh frame rate. If it determines that the first control unit supports the mobile terminal's screen refresh frame rate, it can send the mobile terminal's screen refresh frame rate to the first control unit, which can then generate a virtual Vsync signal based on the mobile terminal's screen refresh frame rate. If it determines that the first control unit does not support the mobile terminal's screen refresh frame rate, the decision unit can send the mobile terminal's screen refresh frame rate to the second control unit, which can then generate a virtual Vsync signal based on the mobile terminal's screen refresh frame rate.
[0234] The frequency of the virtual Vsync signal generated by the first control unit is the same as the screen refresh rate of the mobile terminal input to the first control unit. The first control unit can provide one or more virtual Vsync signals with fixed frequencies.
[0235] The virtual Vsync signal generated by the second control unit has the same frequency as the screen refresh rate of the mobile terminal input to the second control unit. The second control unit can provide a virtual Vsync signal of any frequency within the maximum screen refresh rate range of the mobile terminal.
[0236] After receiving video data from the screen service device, the hardware hybrid renderer can render the received video data and then send the rendered video data to the display screen. Upon receiving the rendered audio and video data, the display screen can control the display to show the rendered audio and video data.
[0237] The VSync signal (vertical synchronization signal) is the signal emitted by the display device each time the screen refreshes, usually synchronized with the display's refresh rate. For example, a 60Hz display emits 60 VSync signals per second. The display controller generates a VSync signal each time it refreshes the frame buffer content onto the display, i.e., when a frame is completed, to notify the mobile terminal's operating system that the current frame has been displayed and the next frame needs to be prepared. The HWC can capture the VSync signals generated by the display controller and send them to the screen service device. With fixed mobile terminal hardware, the frequency of the VSync signals generated by the display controller is fixed. The screen service device can determine the virtual VSync signals to send to the CPU and GPU based on the mobile terminal's screen refresh rate. After receiving the virtual VSync signals, the CPU and GPU can process the next frame of data. The processed next frame of data is then placed into the frame buffer and waits for the next virtual VSync to display it on the screen.
[0238] For example, Figure 14 This is a schematic diagram of a virtual VSync signal output by a screen service device provided in an embodiment of this application. Figure 14 As shown, with a maximum screen refresh rate of 60 FPS on the mobile terminal, HWC can capture 60 VSync signals per second, meaning each VSync signal is captured approximately every 16.66 milliseconds. With a screen refresh rate of 60 FPS on the mobile terminal, the screen service device can generate a virtual Vsync signal and send it to the CPU and GPU after receiving each received VSync signal, based on the mobile terminal's screen refresh rate.
[0239] For example, Figure 15 This is a schematic diagram of a virtual VSync signal output by another screen service device provided in an embodiment of this application. For example... Figure 15 As shown, with a maximum screen refresh rate of 60 FPS on the mobile terminal and a screen refresh rate of 30 FPS, HWC can capture 60 VSync signals per second. The screen service device can generate a virtual Vsync signal and send it to the CPU and GPU approximately every 33.33 milliseconds after receiving two VSync signals, based on the mobile terminal's screen refresh rate. This demonstrates that the CPU and GPU processing tasks are reduced by half, lowering their load and thus reducing power consumption. Furthermore, the number of frame buffer swaps is reduced from 60 to 30 per second, further conserving system resources and reducing power consumption.
[0240] For example, Figure 16 This is a schematic diagram of a virtual VSync signal output by another screen service device provided in an embodiment of this application. For example... Figure 16 As shown, with a maximum screen refresh rate of 60 FPS on the mobile terminal and a screen refresh rate of 20 FPS, HWC can capture 60 VSync signals per second. The screen service device, based on the mobile terminal's screen refresh rate, generates a virtual Vsync signal approximately every 50 milliseconds after receiving three VSync signals and sends it to the CPU and GPU. This demonstrates that the CPU and GPU processing tasks are reduced by two-thirds, lowering their load and thus reducing power consumption. Furthermore, the number of frame buffer swaps is reduced from 60 to 20 per second, further conserving system resources and reducing power consumption.
[0241] Figure 17 This is a schematic diagram of a live screen recording process provided in an embodiment of this application. For example... Figure 17 As shown, the audio service device can play audio data. The audio service device can be AudioFlinger or other components. During live screen recording, i.e., when the mobile terminal is in live screen recording mode, the internal audio recording device can call an audio capture component (such as AudioPlaybackCapture) to obtain the audio data played by the audio service device, and then send the obtained audio data to the disk for caching. The audio data obtained by the internal audio recording device can be Pulse Code Modulation (PCM) data.
[0242] When the mobile terminal is in live screen recording mode, the screen service device can obtain the current frame rate of the virtual screen and the live frame rate of the live application. If the current frame rate of the virtual screen is higher than the live frame rate of the live application, the frame rate of the virtual screen can be determined based on the live frame rate of the live application, and then video data can be sent to the virtual screen according to the virtual screen's frame rate. After receiving the video data, the virtual screen can send the video data to the video encoding device. The video encoding device can encode the video data and send the encoded video data to the disk for caching. The encoded video data can be in H.264 format or other video file formats. For example, the live frame rate of the live application is 30 FPS, and the frame rate of the virtual screen can be 30 FPS, 20 FPS, or 15 FPS.
[0243] The disk can cache recorded audio data and encoded video data. Upon detecting a recording command, the disk can send the cached audio and video data to the audio-video mixing device.
[0244] An audio-video mixing device can encapsulate received audio and video data into a single audio-video data file. This audio-video data can be an MP4 file or other file formats.
[0245] As can be seen, the frame rate of the virtual screen can be controlled by controlling the video data sent to the virtual screen by the screen service device, which can reduce the amount of data that needs to be processed for screen recording and thus reduce power consumption.
[0246] During live streaming on mobile devices, intelligent optimization can be performed on the CPU and GPU to reduce power consumption. This intelligent optimization can include CPU and GPU resource scheduling optimization, as well as CPU and GPU frequency optimization.
[0247] Figure 18 This is a schematic diagram of the structure of a scheduling device provided in an embodiment of this application. Figure 18 As shown, the scheduling device may include an intelligent scheduler, an extended scheduler, and a sequence determination module. The intelligent scheduler entity can be a program of an extended Berkeley Packet Filter (eBPF), which can be loaded into the kernel and executed within the eBPF virtual machine. The extended scheduler, or Extensible SchedulerClass, is an extension class of the scheduler in the kernel, capable of implementing different types of scheduling policies. The sequence determination module has a scoring mechanism for measuring task scheduling priority in some scheduling policies.
[0248] During thread scheduling, the sequence determination module can determine the priorities of multiple threads to be scheduled and determine their scheduling order based on these priorities. After extending the intelligent scheduler, the extended scheduler can determine multiple scheduling queues based on thread priorities and allocate CPU and GPU resources to each queue based on their priorities. In other words, it allocates CPU and GPU resources to multiple threads based on their priorities. The extended scheduler can also allocate resources such as Video Processing Unit (VPU) resources and Double Data Rate (DDR) resources to multiple threads based on their priorities.
[0249] During live streaming on mobile devices, the priority determination module can assign higher priorities to live streaming threads and lower priorities to non-live streaming threads. The extended scheduler can allocate more CPU and GPU resources to live streaming threads based on their priorities to ensure the smooth operation of the live stream.
[0250] Figure 19This is a schematic diagram of the structure of a frequency adjustment device provided in an embodiment of this application. Figure 19 As shown, the frequency adjustment device may include a load monitoring module, an adjustment request module, a frequency adjustment module, and a status determination module. The status determination module can determine the required state of the CPU. The CPU state can be idle or non-idle. If the status determination module determines that the required state of the CPU is idle, and the current CPU state is non-idle, the status determination module can notify the CPU to enter the idle state. If the status determination module determines that the required state of the CPU is non-idle, and the current CPU state is idle, the status determination module can notify the CPU to exit the idle state.
[0251] The load monitoring module can periodically, in real-time, or at set intervals monitor CPU load, GPU load, thread load, and critical threads. When the mobile terminal is in live streaming mode, the critical thread is the live streaming thread. The load monitoring module can also monitor CPU load, GPU load, thread load, and critical threads when certain events occur. The load monitoring module can send CPU load, GPU load, thread load, and critical thread data to the adjustment request module.
[0252] The frequency adjustment request module can determine CPU utilization based on CPU load, GPU utilization based on GPU load, the live streaming scenario of the application based on critical threads, and the CPU and GPU utilization of critical threads based on thread load and critical threads. Then, based on one or more of these factors—CPU utilization, GPU utilization, CPU / GPU utilization of critical threads, the live streaming scenario of the application, and the temperature of the mobile terminal—it can determine whether to adjust the CPU and GPU frequencies. If adjusting CPU and GPU frequencies is determined, the required frequencies for the CPU and GPU are identified, and a frequency adjustment request can be sent to the frequency adjustment module. The frequency adjustment request includes the required frequencies for the CPU and GPU.
[0253] For example, if the current temperature of the mobile terminal is greater than or equal to a fifth threshold, the CPU utilization is less than a third threshold, and the GPU utilization is less than a fourth threshold, the mobile terminal can determine the required frequency of the CPU and GPU as a first frequency. If the current temperature of the mobile terminal is greater than or equal to the fifth threshold, and the CPU utilization is greater than or equal to the third threshold and / or the GPU utilization is greater than or equal to the fourth threshold, the mobile terminal can determine the required frequency of the CPU and GPU as a second frequency. The first frequency is less than the second frequency. A CPU utilization less than the third threshold and a GPU utilization less than the fourth threshold indicates a low load. A CPU utilization greater than or equal to the third threshold and / or a GPU utilization greater than or equal to the fourth threshold indicates a high load. Therefore, under high temperature and high load conditions, the CPU and GPU frequencies can be reduced slightly, while under high temperature and low load conditions, the CPU and GPU frequencies can be reduced significantly. Both the first and second frequencies are less than the current frequencies of the CPU and GPU.
[0254] For example, if the current temperature of the mobile terminal is below the fifth threshold, the CPU utilization is below the third threshold, and the GPU utilization is below the fourth threshold, the mobile terminal can determine that the required frequency for the CPU and GPU is the third frequency. If the current temperature of the mobile terminal is below the fifth threshold, and the CPU utilization is greater than or equal to the third threshold and / or the GPU utilization is greater than or equal to the fourth threshold, the mobile terminal can determine that the CPU and GPU frequencies will not be adjusted. The third frequency is lower than the current frequency of the CPU and GPU. Therefore, under low temperature and high load conditions, the CPU and GPU frequencies can be kept constant, while under low temperature and low load conditions, the CPU and GPU frequencies can be significantly reduced.
[0255] After receiving a frequency adjustment request, the frequency adjustment module can obtain the current frequency of the CPU and GPU, and notify the CPU and GPU to adjust the frequency from the current frequency to the required frequency.
[0256] The load monitoring module can monitor the CPU load when it detects a notification sent to the CPU by the status determination module. The load monitoring module can also monitor the CPU load when it detects a notification sent to the CPU by the frequency adjustment module.
[0257] The frequency adjustment device can control the CPU and GPU to complete live streaming-related tasks with minimal computing power, balancing performance and power consumption without affecting the live streaming.
[0258] It should be understood that the same or corresponding content in different embodiments can be referenced to each other.
[0259] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0260] Based on the same inventive concept, this application also provides a live power consumption control device for implementing the live power consumption control method described above. The solution provided by this live power consumption control device is similar to the implementation scheme described in the live power consumption control method above. Therefore, the specific limitations in one or more embodiments of the live power consumption control device provided below can be found in the limitations of the live power consumption control method described above, and will not be repeated here.
[0261] Based on the above network architecture Figure 20 This is a schematic diagram of a live streaming power consumption control device provided in an embodiment of this application. The live streaming power consumption control device can be applied to a mobile terminal. The live streaming power consumption control device may include:
[0262] The acquisition unit 2001 is used to acquire the live frame rate of the live application when the mobile terminal is in live streaming mode.
[0263] The acquisition unit 2001 is also used to acquire the current screen refresh frame rate of the mobile terminal;
[0264] The adjustment unit 2002 is used to adjust the screen refresh rate of the mobile terminal to the live streaming frame rate of the live streaming application when the current screen refresh rate of the mobile terminal is greater than the live streaming frame rate of the live streaming application, so as to adjust the power consumption of the mobile terminal.
[0265] In some embodiments, the determining unit 2002 is specifically used to adjust the screen refresh rate of the mobile terminal to the live streaming frame rate of the live streaming application when the live streaming window of the live streaming application is a full-screen window and there is no touch operation on the screen of the mobile terminal.
[0266] In some embodiments, the determining unit 2002 is further configured to adjust the screen refresh rate of the mobile terminal to the maximum screen refresh rate of the mobile terminal when the live streaming window of the live streaming application is a full-screen window and there is a touch operation on the screen of the mobile terminal.
[0267] In some embodiments, when the mobile terminal is in a live streaming state, the acquisition unit 2001 acquires the live streaming frame rate of the live streaming application, including:
[0268] If the current temperature of the mobile terminal is less than the first threshold and the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application.
[0269] In some embodiments, the live streaming power consumption control device may further include:
[0270] The first reduction unit is used to reduce the screen refresh rate of the mobile terminal according to the current temperature of the mobile terminal when the current temperature of the mobile terminal is greater than or equal to a first threshold.
[0271] In some embodiments, the temperature of a mobile terminal is inversely correlated with the screen refresh rate of the mobile terminal.
[0272] In some embodiments, the first reduction unit is specifically used for:
[0273] Based on the correspondence between temperature range and screen refresh rate, the target screen refresh rate corresponding to the current temperature of the mobile terminal is determined. The target screen refresh rate is less than the live streaming frame rate of the live streaming application.
[0274] Adjust the mobile terminal's screen refresh rate to the target screen refresh rate.
[0275] In some embodiments, the acquisition unit 2001 is further configured to acquire the current load of the mobile terminal;
[0276] The live streaming power consumption control device may also include:
[0277] The freeze unit is used to freeze background applications when the current load of the mobile terminal is greater than or equal to a second threshold.
[0278] In some embodiments, the live streaming power consumption control device may further include:
[0279] The second reduction unit is used to reduce the screen refresh rate of the mobile terminal after the freezing unit freezes the background application, so that the load of the mobile terminal is less than the second threshold when the current load of the mobile terminal is greater than or equal to the second threshold.
[0280] In some embodiments, the acquisition unit 2001 is further configured to acquire the current frame rate of the virtual screen when the mobile terminal is in a live screen recording state;
[0281] The determining unit 2002 is further configured to determine the frame rate of the virtual screen based on the live frame rate of the live application when the current frame rate of the virtual screen is greater than the live frame rate of the live application, so that the frame rate of the virtual screen is less than or equal to the live frame rate of the live application.
[0282] In some embodiments, the determining unit 2002 is further configured to determine information about the live streaming thread;
[0283] The live streaming power consumption control device may also include:
[0284] The scheduling unit is used to schedule live streaming resources based on the information of the live streaming thread.
[0285] In some embodiments, the information determined by the determining unit 2002 for the live streaming thread includes:
[0286] Determine the priority of multiple threads, including live streaming threads and non-live streaming threads, with live streaming threads having a higher priority than non-live streaming threads.
[0287] The scheduling unit is specifically used to allocate CPU and GPU resources to multiple threads based on their priorities. The CPU and GPU resources of a thread are positively correlated with its priority.
[0288] In some embodiments, the scheduling unit is specifically used for:
[0289] Based on the information from the live streaming thread, determine the live streaming scenario, CPU utilization, and GPU utilization of the live streaming application.
[0290] Adjust the frequency of CPU and GPU resources based on one or more of the following: the live streaming scenario of the live streaming application, CPU resource utilization, GPU resource utilization, and the temperature of the mobile terminal.
[0291] In some embodiments, the scheduling unit adjusts the CPU and GPU frequencies based on one or more of the following: the live streaming scenario of the live streaming application, CPU utilization, GPU utilization, and the temperature of the mobile terminal.
[0292] In the live streaming application's preset scenario, if the CPU utilization is less than the third threshold, the GPU utilization is less than the fourth threshold, or the current temperature of the mobile terminal is greater than or equal to the fifth threshold, the CPU and GPU frequencies will be reduced.
[0293] Based on the above network architecture Figure 21 This is a schematic diagram of another live streaming power consumption control device provided in this application embodiment. This live streaming power consumption control device can be applied to a mobile terminal. The live streaming power consumption control device may include:
[0294] The determining unit 2101 is used to determine the information of the live streaming thread when the mobile terminal is in a live streaming state;
[0295] The scheduling unit 2102 is used to schedule live streaming resources based on the information of the live streaming thread in order to adjust the power consumption of the mobile terminal.
[0296] In some embodiments, the determining unit 2101 is specifically used to determine the priority of multiple threads, including live streaming threads and non-live streaming threads, wherein the priority of the live streaming threads is greater than the priority of the non-live streaming threads.
[0297] The scheduling unit 2102 is specifically used to allocate CPU and GPU resources to multiple threads according to their priorities, and the CPU and GPU resources of a thread are positively correlated with its priority.
[0298] In some embodiments, the scheduling unit 2102 is specifically used for:
[0299] Based on the information from the live streaming thread, determine the live streaming scenario, CPU utilization, and GPU utilization of the live streaming application.
[0300] Adjust the frequency of CPU and GPU resources based on one or more of the following: the live streaming scenario of the live streaming application, CPU resource utilization, GPU resource utilization, and the temperature of the mobile terminal.
[0301] In some embodiments, the scheduling unit 2102 adjusts the CPU and GPU frequencies based on one or more of the live streaming application's live streaming scenario, CPU utilization, GPU utilization, and the mobile terminal's temperature, including:
[0302] In the live streaming application's preset scenario, if the CPU utilization is less than the third threshold, the GPU utilization is less than the fourth threshold, or the current temperature of the mobile terminal is greater than or equal to the fifth threshold, the CPU and GPU frequencies will be reduced.
[0303] Each unit in the aforementioned live streaming power consumption control device can be implemented entirely or partially through software, hardware, or a combination thereof. These units can be embedded in the processor of the mobile terminal in hardware form or independent of it, or stored in the memory of the mobile terminal in software form, so that the processor can call and execute the corresponding operations of each unit.
[0304] Based on the above network architecture Figure 22This is a schematic diagram of the structure of a mobile terminal provided in an embodiment of this application. The mobile terminal may include a processor, memory, input / output interface (I / O), communication interface, display device, and input device. The processor, memory, and I / O interface are connected via a system bus, and the communication interface, display device, and input device are also connected to the system bus via the I / O interface. The processor of the mobile terminal provides computing and control capabilities. The memory of the mobile terminal includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The I / O interface of the mobile terminal is used for exchanging information between the processor and external devices. The communication interface of the mobile terminal is used for communication with external terminals or servers via a network connection. When the computer program is executed by the processor, it implements a live power consumption control method. The display device of the mobile terminal is used to form a visually visible image and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the mobile terminal can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the mobile terminal, or external keyboards, touchpads, or mice, etc.
[0305] Those skilled in the art will understand that Figure 22 The structure shown is merely a block diagram of a portion of the structure related to the solution of this application and does not constitute a limitation on the mobile terminal to which the solution of this application is applied. A specific mobile terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0306] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described live power consumption control method.
[0307] It should be noted that the information on energy storage devices involved in this application (including but not limited to the demand value of energy storage devices) is all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations.
[0308] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0309] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0310] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for controlling live streaming power consumption, characterized in that, Applied to a mobile terminal, the method includes: When the mobile terminal is in live streaming mode, obtain the live streaming frame rate of the live streaming application; Obtain the current screen refresh rate of the mobile terminal; If the current screen refresh rate is greater than the live streaming frame rate, the screen refresh rate of the mobile terminal is adjusted to the live streaming frame rate to adjust the power consumption of the mobile terminal.
2. The method according to claim 1, characterized in that, Adjusting the screen refresh rate of the mobile terminal to the live streaming frame rate includes: When the live streaming window of the live streaming application is a full-screen window and there is no touch operation on the screen of the mobile terminal, the screen refresh rate of the mobile terminal is adjusted to the live streaming frame rate.
3. The method according to claim 2, characterized in that, The method further includes: When the live streaming window of the live streaming application is a full-screen window and there is a touch operation on the screen of the mobile terminal, the screen refresh rate of the mobile terminal is adjusted to the maximum screen refresh rate of the mobile terminal.
4. The method according to claim 1, characterized in that, When the mobile terminal is in live streaming mode, obtaining the live streaming frame rate of the live streaming application includes: When the current temperature of the mobile terminal is less than a first threshold and the mobile terminal is in live streaming mode, the live streaming frame rate of the live streaming application is obtained.
5. The method according to claim 4, characterized in that, The method further includes: If the current temperature of the mobile terminal is greater than or equal to the first threshold, the screen refresh rate of the mobile terminal is reduced according to the current temperature of the mobile terminal.
6. The method according to claim 5, characterized in that, The temperature of the mobile terminal is inversely correlated with the screen refresh rate of the mobile terminal.
7. The method according to claim 6, characterized in that, The step of reducing the screen refresh rate of the mobile terminal based on the current temperature of the mobile terminal includes: Based on the correspondence between temperature range and screen refresh rate, the target screen refresh rate corresponding to the current temperature of the mobile terminal is determined, and the target screen refresh rate is less than the live broadcast frame rate. Adjust the screen refresh rate of the mobile terminal to the target screen refresh rate.
8. The method according to any one of claims 1-7, characterized in that, The method further includes: Obtain the current load of the mobile terminal; If the current load is greater than or equal to the second threshold, freeze the background application.
9. The method according to claim 8, characterized in that, After freezing the background application, the method further includes: If the current load of the mobile terminal is greater than or equal to the second threshold, the screen refresh rate of the mobile terminal is reduced so that the load of the mobile terminal is less than the second threshold.
10. The method according to any one of claims 1-7, characterized in that, The method further includes: When the mobile terminal is in live screen recording mode, obtain the current frame rate of the virtual screen; If the current frame rate of the virtual screen is greater than the live streaming frame rate, the frame rate of the virtual screen is determined based on the live streaming frame rate so that the frame rate of the virtual screen is less than or equal to the live streaming frame rate.
11. The method according to any one of claims 1-7, characterized in that, The method further includes: Determine the information of the live stream thread; Based on the information of the live streaming thread, schedule live streaming resources.
12. The method according to claim 11, characterized in that, The information used to determine the live stream thread includes: Determine the priority of multiple threads, including live streaming threads and non-live streaming threads, wherein the priority of the live streaming threads is greater than the priority of the non-live streaming threads; The step of scheduling live streaming resources based on the information of the live streaming thread includes: CPU and GPU resources are allocated to the multiple threads according to their priorities, and the CPU and GPU resources of the threads are positively correlated with the priority of the threads.
13. The method according to claim 11, characterized in that, The step of scheduling live streaming resources based on the information of the live streaming thread includes: Based on the information of the live streaming thread, determine the live streaming scenario, CPU utilization, and GPU utilization of the live streaming application; The CPU and GPU frequencies are adjusted based on one or more of the following: the live streaming scenario of the live streaming application, the CPU utilization, the GPU utilization, and the temperature of the mobile terminal.
14. The method according to claim 13, characterized in that, Adjusting the CPU and GPU frequencies based on one or more of the live streaming scenario of the live streaming application, the CPU utilization, the GPU utilization, and the temperature of the mobile terminal includes: If the live streaming scenario of the live streaming application is a preset scenario, and the CPU utilization is less than the third threshold, the GPU utilization is less than the fourth threshold, or the current temperature of the mobile terminal is greater than or equal to the fifth threshold, the CPU and GPU frequencies will be reduced.
15. A method for controlling live streaming power consumption, characterized in that, Applied to a mobile terminal, the method includes: When the mobile terminal is in live streaming mode, determine the information of the live streaming thread; Based on the information of the live streaming thread, live streaming resources are scheduled to adjust the power consumption of the mobile terminal.
16. A live streaming power consumption control device, characterized in that, The device, applied to a mobile terminal, includes: The acquisition unit is used to acquire the live frame rate of the live application when the mobile terminal is in a live streaming state. The acquisition unit is further configured to acquire the current screen refresh rate of the mobile terminal; An adjustment unit is configured to adjust the screen refresh rate of the mobile terminal to the live streaming frame rate when the current screen refresh rate is greater than the live streaming frame rate, so as to adjust the power consumption of the mobile terminal.
17. A live streaming power consumption control device, characterized in that, Applied to a mobile terminal, the method includes: The determining unit is used to determine information about the live streaming thread when the mobile terminal is in a live streaming state. The scheduling unit is used to schedule live streaming resources based on the information of the live streaming thread in order to adjust the power consumption of the mobile terminal.
18. A mobile terminal, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 15.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 15.
20. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 15.