Dynamic wallpaper display method and device, mobile terminal and storage medium
By dynamically adjusting the frame rate of the live wallpaper based on device battery level and interaction frequency, the problem of high power consumption in mobile terminals is solved, resulting in longer battery life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING QIYI CENTURY SCI & TECH CO LTD
- Filing Date
- 2026-01-19
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, mobile terminals refresh at a high fixed frame rate when using live wallpapers, resulting in high power consumption and affecting battery life.
By monitoring the device's battery level and interaction frequency, the working frame rate of the live wallpaper is dynamically adjusted. The frame rate is adjusted according to preset correlations to reduce power consumption, including adjusting the frame rate when the battery level or interaction frequency changes, and rendering only the differences in image blocks when necessary.
It effectively reduces the power consumption of live wallpapers and improves the battery life of mobile devices.
Smart Images

Figure CN122019037A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic equipment technology, and in particular to a method, apparatus, mobile terminal, and storage medium for displaying dynamic wallpapers. Background Technology
[0002] With the development of electronic technology, mobile terminals (such as smartphones and tablets) are becoming increasingly popular. Since live wallpapers can beautify the interface of mobile terminals and improve the user experience, they are highly favored by users. Based on this, live wallpapers have gradually become one of the key features promoted by operating system and application manufacturers.
[0003] However, the applicant discovered that in the prior art, when using live wallpapers on mobile terminals, the wallpaper is usually refreshed at a high fixed frame rate, which results in a large power consumption of the mobile terminal and reduces the battery life of the mobile terminal. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, mobile terminal, and storage medium for displaying live wallpapers, thereby reducing power consumption and improving battery life on mobile terminals. The specific technical solution is as follows:
[0005] In a first aspect of the present invention, a method for displaying dynamic wallpapers is provided, applied to a mobile terminal, the method comprising:
[0006] When the live wallpaper is detected to be in display mode, the device battery level and / or interaction frequency of the mobile terminal are obtained; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period;
[0007] The working frame rate of the dynamic wallpaper on the mobile terminal is determined based on the device's battery level and / or interaction frequency, as well as a preset correlation. The preset correlation is the relationship between the changing trend of the device's battery level and / or interaction frequency and the changing trend of the working frame rate.
[0008] Display live wallpapers on mobile devices based on the working frame rate.
[0009] Optionally, the trend of device power consumption and / or the trend of interaction frequency are the same as the trend of working frame rate; the preset correlation includes multiple working frame rates, each working frame rate corresponding to a power consumption range and / or an interaction frequency range.
[0010] Based on device battery level and / or interaction frequency, as well as preset correlations, the working frame rate of the dynamic wallpaper on the mobile terminal is determined, including:
[0011] When the device battery level is in the first battery level range and / or the interaction frequency is in the first interaction frequency range, the working frame rate of the dynamic wallpaper on the mobile terminal is determined to be the working frequency corresponding to the first battery level range and / or the first interaction frequency range. The first battery level range is any one of multiple battery level ranges, and the first interaction frequency is any one of multiple interaction frequency ranges.
[0012] Optionally, displaying live wallpapers on the mobile device based on the working frame rate includes:
[0013] Get the current image frame to be displayed in the live wallpaper and the previous image frame of the current image frame;
[0014] According to the preset image division method, the current image frame and the previous image frame are divided into multiple first image blocks and multiple second image blocks respectively; the positions of the multiple first image blocks in the current image frame correspond one-to-one with the positions of the multiple second image blocks in the previous image frame.
[0015] Calculate the pixel difference between the first image block and the second image block that correspond to each other in one position; when the pixel difference is greater than a preset difference threshold, the first image block with a pixel difference greater than the preset difference threshold is determined as a changed image block;
[0016] Based on the working frame rate and all changing image blocks in the current image frame, the rendered current image frame is displayed on the mobile terminal.
[0017] Optionally, the working frame rate includes: the rendering frame rate and / or the display frame rate. Based on the working frame rate and all changing image patches in the current image frame, the rendered current image frame is displayed on the mobile terminal, including:
[0018] Render all changing image patches in the current image frame according to the rendering frame rate, and display the rendered current image frame on the mobile terminal; or...
[0019] Render all changing image patches in the current image frame, and display the rendered current image frame on the mobile terminal according to the display frame rate; or,
[0020] Render all changing image blocks in the current image frame according to the rendering frame rate, and display the rendered current image frame on the mobile terminal according to the display frame rate.
[0021] Optionally, before obtaining the device battery level and / or interaction frequency of the mobile terminal, the method further includes:
[0022] When the live wallpaper is loaded for the first time, the keyframe images of the pre-determined live wallpaper are obtained and stored in the texture cache;
[0023] Accordingly, dynamic wallpapers are displayed on mobile devices based on the working frame rate, including:
[0024] Retrieve keyframe images from the texture cache;
[0025] Dynamic wallpapers are displayed on mobile devices based on keyframe images and working frame rate.
[0026] Optionally, the working frame rate includes: rendering frame rate and / or display frame rate. Based on the keyframe image and the working frame rate, the dynamic wallpaper is displayed on the mobile terminal, including:
[0027] The live wallpaper is rendered based on keyframe images and the rendering frame rate, and the rendered live wallpaper is displayed on the mobile device; or...
[0028] The live wallpaper is rendered based on keyframe images; and the rendered live wallpaper is displayed on the mobile terminal according to the display frame rate; or...
[0029] The live wallpaper is rendered based on the rendering frame rate and keyframe images, and then displayed on the mobile device according to the display frame rate.
[0030] Optionally, after storing the keyframe image in the texture buffer, the method further includes:
[0031] The memory usage of the mobile terminal is obtained in real time. When the memory usage exceeds a preset threshold, the keyframe images cached in the texture cache are cleared.
[0032] When the memory usage is less than the preset threshold, the keyframe image is re-stored into the texture cache.
[0033] In a second aspect of the present invention, a dynamic wallpaper display device is also provided, applied to a mobile terminal, the device comprising:
[0034] The acquisition module is used to acquire the device battery level and / or interaction frequency of the mobile terminal when the live wallpaper is detected to be in display state; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period;
[0035] The determination module is used to determine the working frame rate of the dynamic wallpaper on the mobile terminal based on the device's battery level and / or interaction frequency and a preset correlation; wherein, the preset correlation is the relationship between the changing trend of the device's battery level and / or the changing trend of the interaction frequency and the changing trend of the working frame rate.
[0036] The display module is used to display live wallpapers on mobile terminals according to the working frame rate.
[0037] Optionally, the trend of device power consumption and / or the trend of interaction frequency are the same as the trend of working frame rate; the preset correlation includes multiple working frame rates, each working frame rate corresponding to a power consumption range and / or an interaction frequency range.
[0038] The module is specifically used for:
[0039] When the device battery level is in the first battery level range and / or the interaction frequency is in the first interaction frequency range, the working frame rate of the dynamic wallpaper on the mobile terminal is determined to be the working frequency corresponding to the first battery level range and / or the first interaction frequency range. The first battery level range is any one of multiple battery level ranges, and the first interaction frequency is any one of multiple interaction frequency ranges.
[0040] Optional, the display module includes:
[0041] The Get submodule is used to retrieve the current image frame to be displayed in the live wallpaper and the previous image frame of the current image frame;
[0042] The segmentation submodule is used to divide the current image frame and the previous image frame into multiple first image blocks and multiple second image blocks according to a preset image segmentation method; the positions of the multiple first image blocks in the current image frame correspond one-to-one with the positions of the multiple second image blocks in the previous image frame.
[0043] The calculation submodule is used to calculate the pixel difference value between the first image block and the second image block that correspond to each other in one position; when the pixel difference value is greater than a preset difference value threshold, the first image block with a pixel difference value greater than the preset difference value threshold is determined as a changed image block;
[0044] The display submodule is used to display the rendered current image frame on the mobile terminal based on the working frame rate and all changing image blocks in the current image frame.
[0045] Optionally, the working frame rate includes: rendering frame rate and / or display frame rate, specifically used by the display submodule for:
[0046] Render all changing image patches in the current image frame according to the rendering frame rate, and display the rendered current image frame on the mobile terminal; or...
[0047] Render all changing image patches in the current image frame, and display the rendered current image frame on the mobile terminal according to the display frame rate; or,
[0048] Render all changing image blocks in the current image frame according to the rendering frame rate, and display the rendered current image frame on the mobile terminal according to the display frame rate.
[0049] Optionally, the device further includes: a cache module, used to acquire a predetermined keyframe image of the live wallpaper when the live wallpaper is first loaded, before acquiring the device battery level and / or interaction frequency of the mobile terminal, and store the keyframe image in a texture cache;
[0050] The display module is specifically used for:
[0051] Retrieve keyframe images from the texture cache; display live wallpapers on the mobile device based on the keyframe images and the working frame rate.
[0052] Optionally, the working frame rate includes: rendering frame rate and / or display frame rate. The display module is also used for:
[0053] The live wallpaper is rendered based on keyframe images and the rendering frame rate, and the rendered live wallpaper is displayed on the mobile device; or...
[0054] The live wallpaper is rendered based on keyframe images; and the rendered live wallpaper is displayed on the mobile terminal according to the display frame rate; or...
[0055] The live wallpaper is rendered based on the rendering frame rate and keyframe images, and then displayed on the mobile device according to the display frame rate.
[0056] Optionally, after storing the keyframe image in the texture buffer, the device further includes:
[0057] The cache clearing module is used to obtain the memory usage of the mobile terminal in real time. When the memory usage is greater than the preset threshold, the keyframe images cached in the texture cache are cleared; when the memory usage is less than the preset threshold, the keyframe images are re-stored into the texture cache.
[0058] In a third aspect of the present invention, a mobile terminal is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.
[0059] Memory, used to store computer programs;
[0060] When a processor executes a program stored in memory, it implements the steps of the dynamic wallpaper display method described in the first aspect above.
[0061] In a fourth aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of the dynamic wallpaper display method described in the first aspect.
[0062] In a fifth aspect of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of the dynamic wallpaper display method described in the first aspect.
[0063] This invention provides a method, apparatus, mobile terminal, and storage medium for displaying live wallpapers. When a live wallpaper is detected to be in display mode, the device's battery level and / or interaction frequency are acquired. The interaction frequency characterizes the number of interaction commands received by the mobile terminal within a preset time period. Then, based on the device's battery level and / or interaction frequency, and a preset correlation, the working frame rate of the live wallpaper on the mobile terminal is determined. This preset correlation is the relationship between the changing trends of the device's battery level and / or interaction frequency and the changing trends of the working frame rate. Finally, the live wallpaper is displayed on the mobile terminal according to the working frame rate. This allows for timely adjustment of the working frame rate when displaying live wallpapers based on the mobile terminal's battery level and / or interaction frequency, avoiding refreshing the live wallpaper at a high fixed frame rate. This reduces power consumption when using live wallpapers on the mobile terminal and improves battery life. Attached Figure Description
[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0065] Figure 1 This is a flowchart of a first embodiment of a dynamic wallpaper display method according to an embodiment of the present invention;
[0066] Figure 2 This is a flowchart illustrating a second embodiment of a dynamic wallpaper display method according to an embodiment of the present invention;
[0067] Figure 3 This is a flowchart illustrating a third embodiment of a dynamic wallpaper display method according to an example of the present invention;
[0068] Figure 4 This is a flowchart illustrating a fourth embodiment of a dynamic wallpaper display method according to an example of the present invention;
[0069] Figure 5 This is a schematic diagram of the structure of a dynamic wallpaper display device according to an embodiment of the present invention;
[0070] Figure 6 This is a schematic diagram of the structure of a mobile terminal according to an embodiment of the present invention. Detailed Implementation
[0071] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0072] In existing technologies, when using live wallpapers on mobile terminals, the wallpaper is usually refreshed at a high fixed frame rate, and it continues to run even when the user does not operate the screen, which results in a large power consumption of the mobile terminal and seriously affects the battery life of the mobile terminal.
[0073] To address the technical problems existing in the prior art, this invention provides a method, apparatus, mobile terminal, and storage medium for displaying live wallpapers, thereby reducing power consumption and improving battery life on mobile terminals. Below, we first introduce one embodiment of the live wallpaper display method of this invention.
[0074] like Figure 1 The diagram shown is a flowchart of a first embodiment of a dynamic wallpaper display method according to an embodiment of the present invention. The method may include:
[0075] S110, when the dynamic wallpaper is detected to be in display state, the device battery level and / or interaction frequency of the mobile terminal are obtained; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period.
[0076] S120, based on the device battery level and / or interaction frequency and a preset correlation, determine the working frame rate of the dynamic wallpaper on the mobile terminal; wherein, the preset correlation is the relationship between the changing trend of the device battery level and / or the changing trend of the interaction frequency and the changing trend of the working frame rate.
[0077] S130 displays live wallpapers on mobile devices based on the operating frame rate.
[0078] In some examples, the mobile terminal mentioned above can be a smartphone, tablet, or other terminal device equipped with a battery and capable of using live wallpapers.
[0079] In some other examples, when a live wallpaper application is installed on a mobile device and the device is powered on, the live wallpaper application can run continuously. Alternatively, when a live wallpaper application is installed on a mobile device and receives a user's command to run it, it can run continuously. The live wallpaper application can run in the foreground or in the background. When other applications are open on the mobile device, the live wallpaper application can run in the background. When there are no other application interfaces on the screen of the mobile device, it can be considered that the mobile device is on the main screen, and the live wallpaper application can run in the foreground.
[0080] When the live wallpaper application is running, if the screen of the aforementioned mobile terminal is on and the display interface is on the main screen, the live wallpaper can be displayed. At this time, the live wallpaper is considered to be in the display state.
[0081] Alternatively, when a mobile device that was locked unlocks its screen and enters the main interface, a live wallpaper can also be displayed. In this case, it is also considered that the live wallpaper is in a display state. For example, when a user unlocks their phone or tablet and enters the phone's main interface, a live wallpaper can be displayed, so it can be detected that the live wallpaper is in a display state. Or, when a user presses the keyboard or mouse connected to the mobile device, and the mobile device enters running mode from standby mode, a live wallpaper can be displayed when entering the main interface of the mobile device, so it can be detected that the live wallpaper is in a display state. Or, when a user minimizes or closes a full-screen running application and enters the main interface of the mobile device, a live wallpaper can be displayed, so it can be detected that the live wallpaper is in a display state.
[0082] In other examples, the live wallpaper may be a live wallpaper installed in an application on the mobile device by the mobile device supplier at the time of manufacture, or it may be a live wallpaper installed in an application on the mobile device after the user purchases the mobile device, with the user's consent or by the user's own initiative.
[0083] When an application containing the live wallpaper is running on a mobile terminal, the live wallpaper display method provided in this embodiment of the invention can be used to dynamically adjust the frame rate of the live wallpaper.
[0084] Specifically, the mobile terminal can monitor in real time whether the live wallpaper is displayed. If the live wallpaper is displayed, it can obtain the mobile terminal's battery level and / or interaction frequency; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period. It is understood that the live wallpaper is a video clip composed of multiple image frames.
[0085] The preset duration can be a pre-set time period. When the mobile terminal receives an interaction command within this time period, the number of times the interaction command is received can be counted to obtain the interaction frequency. When the number of interaction commands received within the preset duration is 0, the interaction frequency can be considered to be 0.
[0086] In some examples, the interaction described above could refer to a user swiping or tapping the mobile terminal's screen, or it could refer to a user operating the mobile terminal via a keyboard or mouse. Alternatively, it could refer to a user controlling the mobile terminal using pre-set commands or gestures.
[0087] In some examples, the mobile terminal can be equipped with a power monitoring interface, so the device power of the mobile terminal can be obtained through this power monitoring interface;
[0088] The mobile terminal can also be equipped with an interface to monitor whether there is interaction with the mobile terminal. This interface can detect whether the user is interacting with the mobile terminal; for example, it could monitor whether there is input from a mouse or keyboard, or whether a touchscreen is pressed or swiped. When interaction with the mobile terminal is detected, the frequency of interaction can be monitored.
[0089] After obtaining the device battery level and / or interaction frequency of the mobile terminal, the working frame rate of the dynamic wallpaper on the mobile terminal can be determined based on the device battery level and / or interaction frequency of the mobile terminal and preset related relationships.
[0090] In some examples, the preset correlation is the relationship between the changing trends of device power consumption and / or interaction frequency and the changing trends of operating frame rate.
[0091] The correlation can be linear or nonlinear.
[0092] After determining the working frame rate of the live wallpaper on the mobile terminal, the live wallpaper is displayed on the mobile terminal according to the working frame rate.
[0093] For example, when a live wallpaper is detected to be in display mode, the device's battery level and / or interaction frequency are acquired. Based on the device's battery level and / or interaction frequency, and a preset correlation, the working frame rate of the live wallpaper on the mobile terminal is determined. The live wallpaper is then displayed on the mobile terminal according to the working frame rate. After a certain period of time, the device's battery level and / or interaction frequency are acquired again. If the acquired device's battery level and / or interaction frequency are different from the previously acquired ones, the working frame rate of the live wallpaper on the mobile terminal can be re-determined. Finally, the live wallpaper is displayed on the mobile terminal according to the re-determined working frame rate. Therefore, the live wallpaper display method of this embodiment of the invention can dynamically adjust the working frame rate.
[0094] This invention provides a method for displaying dynamic wallpapers. When a dynamic wallpaper is detected to be in display mode, the device's battery level and / or interaction frequency are obtained. The interaction frequency characterizes the number of interaction commands received by the mobile terminal within a preset time period. Then, based on the device's battery level and / or interaction frequency, and a preset correlation, the working frame rate of the dynamic wallpaper on the mobile terminal is determined. This preset correlation is the relationship between the changing trends of the device's battery level and / or interaction frequency and the changing trends of the working frame rate. Finally, the dynamic wallpaper is displayed on the mobile terminal according to the working frame rate. This allows for timely adjustment of the working frame rate when displaying dynamic wallpapers based on the mobile terminal's battery level and / or interaction frequency, avoiding refreshing the dynamic wallpaper at a high fixed frame rate. This reduces power consumption when using dynamic wallpapers on the mobile terminal and improves battery life.
[0095] exist Figure 1 Based on the dynamic wallpaper display method shown, this embodiment of the invention also provides a possible implementation method, such as... Figure 2 The diagram shown is a flowchart of a second embodiment of a dynamic wallpaper display method according to an embodiment of the present invention. The method may include:
[0096] S210, when the dynamic wallpaper is detected to be in display state, the device battery level and / or interaction frequency of the mobile terminal are obtained; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period.
[0097] S220, when the device battery level is in the first battery level range and / or the interaction frequency is in the first interaction frequency range, the working frame rate of the dynamic wallpaper on the mobile terminal is determined to be the working frequency corresponding to the first battery level range and / or the first interaction frequency range. The first battery level range is any one of multiple battery level ranges, and the first interaction frequency is any one of multiple interaction frequency ranges.
[0098] S230 displays live wallpapers on mobile terminals based on the operating frame rate.
[0099] In some examples, the trends in device battery level and / or interaction frequency are the same as the trends in operating frame rate; for example, the operating frame rate increases when device battery level increases and decreases when device battery level decreases, the operating frame rate increases when interaction frequency increases and decreases when interaction frequency decreases.
[0100] In some other examples, the preset correlation includes multiple working frame rates, each working frame rate corresponding to a power range and / or an interaction frequency range; for example, the preset correlation may include three or four working frame rates, each power range and / or each interaction frequency range corresponding to a working frame rate.
[0101] Once the device battery level and / or interaction frequency of the mobile terminal are obtained, it can be determined which battery level range and / or interaction frequency range the device falls within. After determining the battery level range and / or interaction frequency range, the corresponding working frame rate can be determined based on the aforementioned preset correlation, and then a dynamic wallpaper can be displayed on the mobile terminal according to this working frame rate.
[0102] For example, three operating frame rates can be set for the aforementioned mobile terminal: operating frame rate 1, operating frame rate 2, and operating frame rate 3, where operating frame rate 1 is greater than operating frame rate 2, and operating frame rate 2 is greater than operating frame rate 3. Correspondingly, three battery ranges can be set: battery range 1, battery range 2, and battery range 3, where the minimum value of battery range 1 is greater than the maximum value of battery range 2, and the minimum value of battery range 2 is greater than the maximum value of battery range 3. Alternatively, three interaction frequency ranges can be set: interaction frequency range 1, interaction frequency range 2, and interaction frequency range 3, where the minimum value of interaction frequency range 1 is greater than the maximum value of interaction frequency range 2, and the minimum value of interaction frequency range 2 is greater than the maximum value of interaction frequency range 3. Operating frame rate 1 corresponds to battery range 1 and / or interaction frequency range 1, operating frame rate 2 corresponds to battery range 2 and / or interaction frequency range 2, and operating frame rate 3 corresponds to battery range 3 and / or interaction frequency range 3.
[0103] In some examples, the frame rate can be determined solely based on the mobile device's battery level. Specifically, when the mobile device's battery level is in range 1, the first battery range is determined to be range 1, and the frame rate of the live wallpaper on the mobile terminal is frame rate 1; when the mobile device's battery level is in range 2, the first battery range is determined to be range 2, and the frame rate of the live wallpaper on the mobile terminal is frame rate 2; when the mobile device's battery level is in range 3, the first battery range is determined to be range 3, and the frame rate of the live wallpaper on the mobile terminal is frame rate 3.
[0104] In some other examples, the frame rate can be determined solely based on the interaction frequency with the mobile device. Specifically, when the interaction frequency is within interaction frequency range 1, the first interaction frequency range can be determined as interaction frequency range 1, and the frame rate of the live wallpaper on the mobile terminal is frame rate 1. When the interaction frequency is within interaction frequency range 2, the first interaction frequency range can be determined as interaction frequency range 2, and the frame rate of the live wallpaper on the mobile terminal is frame rate 2. When the interaction frequency is within interaction frequency range 3, the first interaction frequency range can be determined as interaction frequency range 3, and the frame rate of the live wallpaper on the mobile terminal is frame rate 3.
[0105] In some other examples, the frame rate can be determined based on both device battery level and interaction frequency. For instance, when the device battery level of the aforementioned mobile device is in range 1 and the interaction frequency is in range 1, the frame rate of the live wallpaper on the aforementioned mobile terminal can be determined to be frame rate 1. When the device battery level of the aforementioned mobile device is in range 2 and the interaction frequency is in range 2, the frame rate of the live wallpaper on the aforementioned mobile terminal can be determined to be frame rate 2. When the device battery level of the aforementioned mobile device is in range 3 and the interaction frequency is in range 3, the frame rate of the live wallpaper on the aforementioned mobile terminal can be determined to be frame rate 3.
[0106] More specifically, for example, suppose the working frame rate 1 can be set to 30fps (Frames Per Second), at which frame rate, the live wallpaper can be displayed smoothly when the user interacts with the mobile terminal; the working frame rate 2 can be set to 10fps, and the working frame rate 3 can be set to 1fps. The battery range 1 can be 61%~100% of the maximum battery level, the battery range 2 can be 21%~60% of the maximum battery level, and the battery range 3 can be 1%~20% of the maximum battery level. The interaction frequency range 1 can be 61%~100% of the maximum interaction frequency, the interaction frequency range 2 can be 21%~60% of the maximum interaction frequency, and the interaction frequency range 3 can be 1%~20% of the maximum interaction frequency.
[0107] In this regard, when the device battery level of the aforementioned mobile terminal is between 61% and 100% of the maximum battery level, and the interaction frequency is between 61% and 100% of the maximum interaction frequency, the working frame rate of the live wallpaper on the mobile terminal can be determined to be 30fps, and then the live wallpaper can be displayed on the mobile terminal at a working frame rate of 30fps.
[0108] When the device battery level of the mobile terminal is between 21% and 60% of the maximum battery level, and the interaction frequency is between 21% and 60% of the maximum interaction frequency, the working frame rate of the live wallpaper on the mobile terminal can be determined to be 10fps, and then the live wallpaper can be displayed on the mobile terminal at a working frame rate of 10fps.
[0109] When the device battery level of the mobile terminal is between 1% and 20% of the maximum battery level, and the interaction frequency is between 1% and 20% of the maximum interaction frequency, the working frame rate of the live wallpaper on the mobile terminal can be determined to be 1fps, and then the live wallpaper can be displayed on the mobile terminal at a working frame rate of 1fps.
[0110] In some examples, a power-saving mode can also be set on the mobile terminal. When the device's battery level is less than or equal to a preset battery threshold, the mobile terminal will automatically turn on the power-saving mode. Therefore, it is also possible to monitor whether the power-saving mode on the mobile terminal is turned on automatically. If so, it can be assumed that the device's battery level is in the battery range 3. At this time, it can be determined that the working frame rate of the live wallpaper on the mobile terminal is the working frame rate 3.
[0111] In some examples, Figure 1 Based on the dynamic wallpaper display method shown, this embodiment of the invention also provides a possible implementation, such as... Figure 3 The diagram shown is a flowchart of a third embodiment of a dynamic wallpaper display method according to an embodiment of the present invention. The method may include:
[0112] S310, when the dynamic wallpaper is detected to be in display state, obtain the device battery level and / or interaction frequency of the mobile terminal; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period.
[0113] S320, based on the device battery level and / or interaction frequency and a preset correlation, determine the working frame rate of the dynamic wallpaper on the mobile terminal; wherein, the preset correlation is the relationship between the changing trend of the device battery level and / or the changing trend of the interaction frequency and the changing trend of the working frame rate.
[0114] S330, obtain the current image frame to be displayed in the live wallpaper and the previous image frame of the current image frame.
[0115] S340, the current image frame and the previous image frame are divided into multiple first image blocks and multiple second image blocks according to a preset image division method. The positions of the multiple first image blocks in the current image frame correspond one-to-one with the positions of the multiple second image blocks in the previous image frame.
[0116] S350, calculate the pixel difference value between the first image block and the second image block that correspond to each other in position; when the pixel difference value is greater than the preset difference value threshold, the first image block with the pixel difference value greater than the preset difference value threshold is determined as the changed image block.
[0117] S360 displays the rendered current image frame on the mobile terminal based on the working frame rate and all changing image blocks in the current image frame.
[0118] In some examples, rendering every single image frame of the live wallpaper would consume significant GPU resources. The applicant discovered that adjacent image frames often share similar or identical parts. Rendering only the different or dissimilar parts, rather than the identical or similar parts, can effectively reduce GPU resource consumption. Based on this, this invention provides a live wallpaper display method that renders the live wallpaper, reducing GPU resource consumption and the time required to render image frames, thereby displaying the rendered image frames on a mobile terminal.
[0119] Specifically, when displaying the live wallpaper on a mobile terminal according to the working frame rate, the image frame to be displayed can be obtained first as the current image frame, and then the previous image frame of the current image frame can be obtained. Then, the current image frame and the previous image frame of the current image frame can be divided into multiple image blocks according to the preset image division method.
[0120] In some examples, the preset image partitioning method can be to divide the image into M×N image blocks (i.e., grid regions) according to a grid. The grid can be quadrilateral, triangle or other shapes, which is all possible. For example, the current image frame can be divided into 4×4 quadrilateral grid regions, and the previous image frame can also be divided into 4×4 quadrilateral grid regions.
[0121] The current image frame and the previous image frame are divided in the same way, so that the positions of multiple image blocks in the current image frame correspond one-to-one with the positions of multiple image blocks in the previous image frame. For example, the image block in the upper left corner of the current image frame corresponds to the image block in the upper left corner of the previous image frame, the image block in the upper right corner of the current image frame corresponds to the image block in the upper right corner of the previous image frame, the image block in the lower left corner of the current image frame corresponds to the image block in the lower left corner of the previous image frame, and the image block in the lower right corner of the current image frame corresponds to the image block in the lower right corner of the previous image frame.
[0122] After dividing the current image frame and its previous image frame into multiple first image blocks and multiple second image blocks respectively, the pixel difference value between the first image block and the second image block that correspond to each other can be calculated.
[0123] In some examples, the MSE (mean-square error) algorithm or the MAD (mean absolute deviation) algorithm can be used to calculate the pixel difference between the first and second image blocks that correspond to each other at their positions. When the pixel difference between a first image block in the current image frame and the corresponding second image block in the previous image frame is greater than a preset difference threshold, the first image block with a pixel difference value greater than the preset difference threshold is determined to be a changed image block.
[0124] In this way, by comparing each first image block in the current image frame with the corresponding second image block in the previous image frame, all the changed image blocks in the current image frame can be determined, and then only the changed image blocks can be rendered.
[0125] In some examples, the aforementioned working frame rate can refer to the display frame rate (i.e., the frame rate during display) or the rendering frame rate (i.e., the frame rate during rendering). When the working frame rate is the display frame rate, all changing image blocks in the current image frame can be rendered, and the rendered current image frame can be displayed on the mobile terminal according to the display frame rate.
[0126] When the working frame rate is the rendering frame rate, all changing image blocks in the current image frame can be rendered according to the rendering frame rate, and the rendered current image frame can be displayed on the mobile terminal. The mobile terminal may be equipped with a rendering control module, which can then transmit the rendering frame rate to the rendering control module. The rendering control module adjusts the timer refresh frequency according to the rendering frame rate, and thus performs rendering according to that refresh frequency.
[0127] In some examples, all changing image patches in the current image frame can be rendered according to the rendering frame rate, and the rendered current image frame can be displayed on the mobile device according to the display frame rate. This is also possible.
[0128] This allows for rendering first and then displaying the current image frame according to the display frame rate, or rendering first according to the rendering frame rate and then displaying the current image frame, or rendering first according to the rendering frame rate and then displaying the current image frame according to the display frame rate.
[0129] In some examples, the mobile device can be equipped with a rendering engine to render live wallpapers. For instance, it could use the UIKit framework and the Metal rendering engine, which enable efficient GPU (Graphics Processing Unit) rendering. The UIKit framework is a lightweight, modular front-end framework that allows for the rapid construction of powerful web front-end interfaces.
[0130] In some examples, such as in this embodiment, the working frame rate of the dynamic wallpaper on the mobile terminal can be determined by referring to the second implementation method of a dynamic wallpaper display method according to an embodiment of the present invention. This is also possible and will not be elaborated here.
[0131] It is understood that steps S310 and S320 in this embodiment are the same as or similar to steps S110 and S120 in the first embodiment, and will not be described again here.
[0132] In some examples, Figure 1 Based on the dynamic wallpaper display method shown, this embodiment of the invention also provides a possible implementation method, such as... Figure 4 The diagram shown is a flowchart of a fourth embodiment of a dynamic wallpaper display method according to an embodiment of the present invention. The method may include:
[0133] S410, when loading the live wallpaper for the first time, obtains the keyframe image of the live wallpaper and stores the keyframe image in the texture cache.
[0134] S420, when the live wallpaper is detected to be in display state, obtains the device battery level and / or interaction frequency of the mobile terminal; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period.
[0135] S430, based on the device battery level and / or interaction frequency and a preset correlation, determine the working frame rate of the dynamic wallpaper on the mobile terminal; wherein, the preset correlation is the relationship between the changing trend of the device battery level and / or the changing trend of the interaction frequency and the changing trend of the working frame rate.
[0136] S440 retrieves keyframe images from the texture buffer.
[0137] The S450 displays live wallpapers on mobile devices based on keyframe images and the operating frame rate.
[0138] In some examples, to reduce the computational burden on the mobile terminal during rendering, a texture cache can be set up in the mobile terminal. When the live wallpaper is first loaded on the mobile terminal, the keyframe image of the live wallpaper is first stored in the texture cache. Then, when the live wallpaper is displayed on the mobile terminal according to the working frame rate, the keyframe image can be obtained from the texture cache first, and then the live wallpaper can be displayed on the mobile terminal based on the keyframe image and the working frame rate.
[0139] It is understandable that the initial loading of the live wallpaper mentioned here could refer to the first time the live wallpaper application is launched after it has been installed on the mobile device.
[0140] In some examples, the keyframe image can be an I-frame image. When displaying a live wallpaper on a mobile terminal based on the keyframe image and the operating frame rate, the I-frame can be acquired first, followed by the P-frames and B-frames of the live wallpaper. Then, based on the I-frame, P-frame, and B-frames, other image frames adjacent to the keyframe image in the live wallpaper can be obtained. It is understood that the keyframe image can be obtained using existing methods for acquiring keyframe images; these methods will not be described here.
[0141] In some examples, the aforementioned working frame rate may include a rendering frame rate and / or a display frame rate. Therefore, when displaying a live wallpaper on a mobile terminal based on keyframe images and the working frame rate, the live wallpaper can be rendered according to the keyframe images and the rendering frame rate, and the rendered live wallpaper can be displayed on the mobile terminal; alternatively, the live wallpaper can be rendered according to the keyframe images and displayed on the mobile terminal according to the display frame rate; or the live wallpaper can be rendered according to both the rendering frame rate and the keyframe images, and displayed on the mobile terminal according to the display frame rate. All of these are possible.
[0142] By using the embodiments of the present invention, when the dynamic wallpaper is loaded for the first time, the keyframe image is stored in the texture cache, which allows the keyframe image in the texture cache to be directly called in the subsequent rendering stage, thereby reducing the real-time computing burden of the GPU.
[0143] In some examples, when displaying live wallpapers on mobile terminals based on keyframe images and the working frame rate, the method described in the third embodiment of this invention can also be used to render the live wallpapers. This involves dividing two adjacent image frames into multiple image blocks, calculating and determining the changing image blocks in the subsequent image frame, and then rendering all the changing image blocks in the subsequent image frame. Further details are omitted here.
[0144] In some other examples, after storing the keyframe image in the texture cache, the memory usage of the mobile terminal may increase over time as the user uses it. If the keyframe image is still cached in the texture cache, it may cause the mobile terminal to lag. Therefore, in order to ensure the performance of the mobile terminal, in this embodiment of the invention, after storing the keyframe image in the texture cache, the memory usage of the mobile terminal can be obtained in real time, and it can be determined whether the memory usage is greater than a preset threshold. If the memory usage is greater than the preset threshold, the keyframe image cached in the texture cache is cleared; if the memory usage is less than the preset threshold, the keyframe image is re-stored in the texture cache.
[0145] In this way, when the mobile terminal's memory usage is high, some memory resources can be released, and when the mobile terminal's memory usage is low, cached keyframe images can be reloaded, thus achieving a dynamic balance between the mobile terminal's memory usage and rendering performance.
[0146] In some examples, a dynamic wallpaper display method according to an embodiment of the present invention may further include:
[0147] If the system detects that the live wallpaper is not in a display state, the rendering of the live wallpaper can be stopped.
[0148] In some examples, when the mobile device is locked, the live wallpaper can be considered not to be displayed. In this case, rendering of the live wallpaper can be stopped, and a preset static wallpaper can be displayed instead.
[0149] Alternatively, if the live wallpaper application runs in the background while other applications on the mobile device are running in the foreground, the live wallpaper can be considered not to be in a display state. In this case, rendering of the live wallpaper can be stopped, and a preset static wallpaper can be displayed instead.
[0150] This allows you to stop the live wallpaper refresh in time, thereby reducing power consumption and further improving the battery life of your mobile device.
[0151] It is understood that steps S420 and S430 in this embodiment are the same as or similar to steps S110 and S120 in the first embodiment, and will not be described again here.
[0152] Corresponding to the above method embodiments, this invention also provides a dynamic wallpaper display device, such as... Figure 5 The diagram shown is a structural schematic of a dynamic wallpaper display device according to an embodiment of the present invention. This device can be applied to a mobile terminal and includes:
[0153] The acquisition module 510 is used to acquire the device battery level and / or interaction frequency of the mobile terminal when the dynamic wallpaper is detected to be in display state; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period.
[0154] The determining module 520 is used to determine the working frame rate of the dynamic wallpaper on the mobile terminal based on the device battery level and / or interaction frequency and a preset correlation; wherein, the preset correlation is the relationship between the changing trend of the device battery level and / or the changing trend of the interaction frequency and the changing trend of the working frame rate.
[0155] Display module 530 is used to display live wallpapers on a mobile terminal according to the working frame rate.
[0156] This invention provides a dynamic wallpaper display device that, when detecting that a dynamic wallpaper is in display mode, acquires the device battery level and / or interaction frequency of a mobile terminal. The interaction frequency characterizes the number of interaction commands received by the mobile terminal within a preset time period. Then, based on the device battery level and / or interaction frequency, and a preset correlation, the working frame rate of the dynamic wallpaper on the mobile terminal is determined. This preset correlation is the relationship between the changing trends of the device battery level and / or interaction frequency and the changing trends of the working frame rate. Finally, the dynamic wallpaper is displayed on the mobile terminal according to the working frame rate. This allows for timely adjustment of the working frame rate when displaying the dynamic wallpaper based on the mobile terminal's device battery level and interaction frequency, avoiding refreshing the dynamic wallpaper at a high fixed frame rate. This reduces power consumption when using dynamic wallpapers on the mobile terminal and improves the mobile terminal's battery life.
[0157] In some examples, the trend of device battery level change and / or interaction frequency change is the same as the trend of working frame rate change; the preset correlation includes multiple working frame rates, each working frame rate corresponding to a battery level range and / or an interaction frequency range.
[0158] Module 520 is specifically used for:
[0159] When the device battery level is in the first battery level range and / or the interaction frequency is in the first interaction frequency range, the working frame rate of the dynamic wallpaper on the mobile terminal is determined to be the working frequency corresponding to the first battery level range and / or the first interaction frequency range. The first battery level range is any one of multiple battery level ranges, and the first interaction frequency is any one of multiple interaction frequency ranges.
[0160] In some examples, module 530 is shown, including:
[0161] The Get submodule is used to retrieve the current image frame to be displayed in the live wallpaper and the previous image frame of the current image frame;
[0162] The segmentation submodule is used to divide the current image frame and the previous image frame into multiple first image blocks and multiple second image blocks according to a preset image segmentation method; the positions of the multiple first image blocks in the current image frame correspond one-to-one with the positions of the multiple second image blocks in the previous image frame.
[0163] The calculation submodule is used to calculate the pixel difference value between the first image block and the second image block that correspond to each other in one position; when the pixel difference value is greater than a preset difference value threshold, the first image block with a pixel difference value greater than the preset difference value threshold is determined as a changed image block;
[0164] The display submodule is used to display the rendered current image frame on the mobile terminal based on the working frame rate and all changing image blocks in the current image frame.
[0165] In some examples, the working frame rate includes: the rendering frame rate and / or the display frame rate, specifically used by the display submodule for:
[0166] Render all changing image patches in the current image frame according to the rendering frame rate, and display the rendered current image frame on the mobile terminal; or...
[0167] Render all changing image patches in the current image frame, and display the rendered current image frame on the mobile terminal according to the display frame rate; or,
[0168] Render all changing image blocks in the current image frame according to the rendering frame rate, and display the rendered current image frame on the mobile terminal according to the display frame rate.
[0169] In some examples, the device also includes: a caching module for acquiring a predetermined keyframe image of the live wallpaper when the live wallpaper is first loaded, before acquiring the device battery level and / or interaction frequency of the mobile terminal, and storing the keyframe image in a texture cache;
[0170] Display module 530, specifically used for:
[0171] Retrieve keyframe images from the texture cache; display live wallpapers on the mobile device based on the keyframe images and the working frame rate.
[0172] In some examples, the working frame rate includes: rendering frame rate and / or display frame rate, and the display module 530 is also used for:
[0173] The live wallpaper is rendered based on keyframe images and the rendering frame rate, and the rendered live wallpaper is displayed on the mobile device; or...
[0174] The live wallpaper is rendered based on keyframe images; and the rendered live wallpaper is displayed on the mobile terminal according to the display frame rate; or...
[0175] The live wallpaper is rendered based on the rendering frame rate and keyframe images, and then displayed on the mobile device according to the display frame rate.
[0176] In some examples, after storing the keyframe image in the texture buffer, the device also includes:
[0177] The cache clearing module is used to obtain the memory usage of the mobile terminal in real time. When the memory usage is greater than the preset threshold, the keyframe images cached in the texture cache are cleared; when the memory usage is less than the preset threshold, the keyframe images are re-stored into the texture cache.
[0178] This invention also provides a mobile terminal, such as... Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.
[0179] Memory 603 is used to store computer programs;
[0180] When the processor 601 executes the program stored in the memory 603, it implements the steps of the dynamic wallpaper display method shown in any of the above embodiments. For example, it can implement the following steps:
[0181] When the live wallpaper is detected to be in display mode, the device battery level and / or interaction frequency of the mobile terminal are obtained; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period;
[0182] The working frame rate of the dynamic wallpaper on the mobile terminal is determined based on the device's battery level and / or interaction frequency, as well as a preset correlation. The preset correlation is the relationship between the changing trend of the device's battery level and / or interaction frequency and the changing trend of the working frame rate.
[0183] Display live wallpapers on mobile devices based on the working frame rate.
[0184] This invention provides a mobile terminal that, upon detecting that a live wallpaper is in display mode, acquires the device's battery level and / or interaction frequency. The interaction frequency characterizes the number of interaction commands received by the mobile terminal within a preset time period. Then, based on the device's battery level and / or interaction frequency, and a preset correlation, the operating frame rate of the live wallpaper on the mobile terminal is determined. This preset correlation is the relationship between the changing trends of the device's battery level and / or interaction frequency and the changing trends of the operating frame rate. Finally, the live wallpaper is displayed on the mobile terminal according to the operating frame rate. This allows for timely adjustment of the operating frame rate when displaying the live wallpaper based on the mobile terminal's battery level and interaction frequency, avoiding refreshing the live wallpaper at a high fixed frame rate, thereby reducing power consumption when using live wallpapers on the mobile terminal and improving the mobile terminal's battery life.
[0185] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0186] The communication interface is used for communication between the aforementioned terminal and other devices.
[0187] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0188] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0189] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the dynamic wallpaper display method shown in any of the above embodiments. For example, it can implement the following steps:
[0190] When the live wallpaper is detected to be in display mode, the device battery level and / or interaction frequency of the mobile terminal are obtained; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period;
[0191] The working frame rate of the dynamic wallpaper on the mobile terminal is determined based on the device's battery level and / or interaction frequency, as well as a preset correlation. The preset correlation is the relationship between the changing trend of the device's battery level and / or interaction frequency and the changing trend of the working frame rate.
[0192] Display live wallpapers on mobile devices based on the working frame rate.
[0193] This invention provides a computer-readable storage medium that, when a live wallpaper is detected to be displayed, acquires the device battery level and / or interaction frequency of a mobile terminal. The interaction frequency characterizes the number of interaction commands received by the mobile terminal within a preset time period. Then, based on the device battery level and / or interaction frequency, and a preset correlation, the working frame rate of the live wallpaper on the mobile terminal is determined. This preset correlation is the relationship between the changing trends of the device battery level and / or interaction frequency and the changing trends of the working frame rate. Finally, the live wallpaper is displayed on the mobile terminal according to the working frame rate. This allows for timely adjustment of the working frame rate when displaying the live wallpaper based on the mobile terminal's device battery level and interaction frequency, avoiding refreshing the live wallpaper at a high fixed frame rate, thereby reducing power consumption when using live wallpapers on the mobile terminal and improving the mobile terminal's battery life.
[0194] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of the dynamic wallpaper display method shown in any of the above embodiments. For example, the following steps can be implemented:
[0195] When the live wallpaper is detected to be in display mode, the device battery level and / or interaction frequency of the mobile terminal are obtained; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period;
[0196] The working frame rate of the dynamic wallpaper on the mobile terminal is determined based on the device's battery level and / or interaction frequency, as well as a preset correlation. The preset correlation is the relationship between the changing trend of the device's battery level and / or interaction frequency and the changing trend of the working frame rate.
[0197] Display live wallpapers on mobile devices based on the working frame rate.
[0198] This invention provides a computer program product containing instructions. When a live wallpaper is detected to be in display mode, the program acquires the device battery level and / or interaction frequency of the mobile terminal. The interaction frequency characterizes the number of times the mobile terminal receives interaction instructions within a preset time period. Then, based on the device battery level and / or interaction frequency, and a preset correlation, the program determines the working frame rate of the live wallpaper on the mobile terminal. The preset correlation is the relationship between the changing trends of the device battery level and / or interaction frequency and the changing trends of the working frame rate. Finally, the program displays the live wallpaper on the mobile terminal according to the working frame rate. This allows for timely adjustment of the working frame rate when displaying the live wallpaper based on the mobile terminal's device battery level and interaction frequency, avoiding refreshing the live wallpaper at a high fixed frame rate. This reduces power consumption when using live wallpapers on the mobile terminal and improves the mobile terminal's battery life.
[0199] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0200] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0201] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, mobile terminal, and storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0202] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for displaying dynamic wallpapers, characterized in that, Applied to a mobile terminal, the method includes: When the dynamic wallpaper is detected to be in display mode, the device battery level and / or interaction frequency of the mobile terminal are obtained; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period; Based on the device battery level and / or the interaction frequency, and a preset correlation, the working frame rate of the dynamic wallpaper on the mobile terminal is determined; wherein, the preset correlation is the relationship between the changing trend of the device battery level and / or the changing trend of the interaction frequency and the changing trend of the working frame rate. The live wallpaper is displayed on the mobile terminal according to the specified frame rate.
2. The method according to claim 1, characterized in that, The trend of the device power consumption and / or the trend of the interaction frequency are the same as the trend of the working frame rate; the preset correlation includes multiple working frame rates, each working frame rate corresponding to a power consumption range and / or an interaction frequency range; Determining the working frame rate of the dynamic wallpaper on the mobile terminal based on the device battery level and / or the interaction frequency and a preset correlation includes: When the device battery level is in a first battery level range and / or the interaction frequency is in a first interaction frequency range, the working frame rate of the dynamic wallpaper on the mobile terminal is determined to be the working frequency corresponding to the first battery level range and / or the first interaction frequency range. The first battery level range is any one of multiple battery level ranges, and the first interaction frequency is any one of multiple interaction frequency ranges.
3. The method according to claim 1, characterized in that, The step of displaying the live wallpaper on the mobile terminal according to the working frame rate includes: Obtain the current image frame to be displayed in the live wallpaper and the previous image frame of the current image frame; According to a preset image division method, the current image frame and the previous image frame are respectively divided into multiple first image blocks and multiple second image blocks; the positions of the multiple first image blocks in the current image frame correspond one-to-one with the positions of the multiple second image blocks in the previous image frame. Calculate the pixel difference value between the first image block and the second image block that correspond to each other in one position; when the pixel difference value is greater than a preset difference value threshold, the first image block with a pixel difference value greater than the preset difference value threshold is determined as a changed image block; Based on the working frame rate and all the changing image blocks in the current image frame, the rendered current image frame is displayed on the mobile terminal.
4. The method according to claim 3, characterized in that, The working frame rate includes: rendering frame rate and / or display frame rate. The step of displaying the rendered current image frame on the mobile terminal based on the working frame rate and all changing image blocks in the current image frame includes: Render all changing image patches in the current image frame according to the rendering frame rate, and display the rendered current image frame on the mobile terminal; or... Render all changing image patches in the current image frame, and display the rendered current image frame on the mobile terminal according to the display frame rate; or, Render all changing image blocks in the current image frame according to the rendering frame rate, and display the rendered current image frame on the mobile terminal according to the display frame rate.
5. The method according to any one of claims 1 to 4, characterized in that, Before obtaining the device battery level and / or interaction frequency of the mobile terminal, the method further includes: When the live wallpaper is loaded for the first time, the keyframe images of the live wallpaper are obtained in advance and stored in the texture cache. The step of displaying the live wallpaper on the mobile terminal according to the working frame rate includes: Obtain the keyframe image from the texture cache; The live wallpaper is displayed on the mobile terminal based on the keyframe image and the working frame rate.
6. The method according to claim 5, characterized in that, The working frame rate includes: rendering frame rate and / or display frame rate. The step of displaying the dynamic wallpaper on the mobile terminal based on the keyframe image and the working frame rate includes: The live wallpaper is rendered based on the keyframe image and the rendering frame rate, and the rendered live wallpaper is displayed on the mobile terminal; or... The live wallpaper is rendered based on the keyframe images; and the rendered live wallpaper is displayed on the mobile terminal according to the display frame rate; or... The live wallpaper is rendered according to the rendering frame rate and the keyframe image, and the rendered live wallpaper is displayed on the mobile terminal according to the display frame rate.
7. The method according to claim 5, characterized in that, After storing the keyframe image in the texture buffer, the method further includes: The memory usage of the mobile terminal is obtained in real time, and when the memory usage exceeds a preset threshold, the keyframe images cached in the texture cache are cleared. When the memory usage is less than a preset threshold, the keyframe image is re-stored into the texture cache.
8. A dynamic wallpaper display device, characterized in that, The device, applied to a mobile terminal, includes: The acquisition module is used to acquire the device battery level and / or interaction frequency of the mobile terminal when the dynamic wallpaper is detected to be in the display state; the interaction frequency is used to characterize the number of times the mobile terminal receives interaction commands within a preset time period; The determining module is used to determine the working frame rate of the dynamic wallpaper on the mobile terminal based on the device battery level and / or the interaction frequency and a preset correlation relationship; wherein, the preset correlation relationship is the relationship between the changing trend of the device battery level and / or the changing trend of the interaction frequency and the changing trend of the working frame rate. The display module is used to display the live wallpaper on the mobile terminal according to the working frame rate.
9. A mobile terminal, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-7.