Method and device for realizing unlocking of dynamic wallpaper from screen locking to desktop and terminal
By cached dynamic wallpaper resources in the mobile terminal and playing them in stages according to the bright screen and unlocking events, the dynamic wallpaper function from lock screen to desktop is realized, solving the problems of incoherence of animations and low loading efficiency, and improving the user experience.
Patent Information
- Application Number
- CN202510519042.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-12
AI Technical Summary
The existing mobile terminals lack the function of unlocking the screen to desktop to unlock the dynamic wallpaper during the process of lighting the screen to unlock, resulting in the inability to display the dynamic wallpaper animation smoothly, affecting the user experience.
By pre-cacheting dynamic wallpaper animation resources and playing animations in stages and frames according to the bright screen and unlocking events, an event-driven playback control mechanism is adopted to achieve efficient management and precise control of animation resources.
Improve the smoothness and visual effects of dynamic wallpaper animations during unlocking, improve user experience, and solve the problems of incoherence and low loading efficiency.
Smart Images

Figure CN120469755A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart terminals, and in particular to a method, device, smart terminal and storage medium for realizing unlocking dynamic wallpaper from a lock screen to a desktop. Background Art
[0002] With the popularity of smartphones and technological advancements, users have increasingly higher requirements for personalization and aesthetics. Dynamic wallpapers, as a tool that can display dynamic visual effects on devices, have emerged. Especially in the transition from screen lighting to unlocking, dynamic wallpapers can not only provide visual enjoyment, but also enhance the user experience. However, mobile terminals in the prior art basically do not have the function of unlocking dynamic wallpapers from the lock screen to the desktop, resulting in users being unable to enjoy the visual experience brought by dynamic wallpapers during the unlocking process. In addition, the loading and playback mechanism of dynamic wallpapers in the prior art is not efficient enough, and the dynamic wallpaper animation cannot be displayed smoothly during the screen lighting and unlocking process, affecting the user experience. Therefore, the prior art needs to be improved and developed. In view of the above problems, the prior art is in urgent need of improvement.
[0003] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention
[0004] The technical problem to be solved by the present invention is that, in response to the above-mentioned defects of the prior art, a method, device, smart terminal and storage medium are provided to realize unlocking dynamic wallpaper from lock screen to desktop. The present invention adds a new function to the mobile terminal: it has the function of realizing unlocking dynamic wallpaper from lock screen to desktop, and has the advantages of improving the smoothness and visual effects of dynamic wallpaper animation during the unlocking process, improving user experience, and providing convenience for users.
[0005] The technical solutions adopted by the present invention to solve the problem are as follows:
[0006] The present application provides a method for realizing unlocking dynamic wallpaper from lock screen to desktop, comprising: when it is detected that a dynamic wallpaper application is started, controlling the loading of all animation resources into a cache from a specified directory in which dynamic wallpaper animation frame images are pre-stored; the dynamic wallpaper animation frame images include screen-on animation images and unlocking animation images; when it is detected that the mobile terminal triggers the screen-on, and it is monitored that the current screen-on state is from the off screen to the screen-on state, determining whether the current desktop dynamic wallpaper is visible; when the current desktop dynamic wallpaper is visible, starting the current first segment of the dynamic wallpaper animation, and loading the image resources from the cache list according to the current frame number, controlling the frame-by-frame playback of the screen-on animation image from the first frame of the screen-on animation image loaded into the cache to the last frame of the screen-on animation image; when it is detected that the user triggers unlocking, controlling the starting of the second segment of the dynamic wallpaper animation, and loading the image resources from the cache list according to the current frame number; controlling the frame-by-frame playback of the unlocking animation image from the first frame of the unlocking animation image loaded into the cache to the last frame of the unlocking animation image.
[0007] Furthermore, the present application also proposes that before the step of detecting the startup of the dynamic wallpaper application includes: pre-setting the dynamic wallpaper animation frame image, the dynamic wallpaper animation frame image includes the screen light animation image and the unlock animation image; and storing the dynamic wallpaper animation frame images in the specified directory of the mobile terminal mobile phone application in sequence according to the order of frames.
[0008] Furthermore, the present application also proposes that before the step of detecting that the dynamic wallpaper application is started, the dynamic wallpaper animation frame images stored in the designated directory are frame animation images named with numbers.
[0009] Furthermore, the present application also proposes that before the step of detecting that the dynamic wallpaper application is started, the step includes: pre-setting the WallpaperService class that inherits the dynamic wallpaper service, so that when an application inherits this class, the current application can be set as a dynamic wallpaper.
[0010] Furthermore, the present application also proposes that, when it is detected that the dynamic wallpaper application is started, the step of controlling the loading of all animation resources from a designated directory in which dynamic wallpaper animation frame images are pre-stored into the cache includes: when it is detected that the dynamic wallpaper application is started, obtaining the resource manager of the dynamic wallpaper application to access all animation resource files in the designated directory; listing all animation resource files located in the designated directory according to the type parameter passed in; checking whether the file names of all animation resource files in the designated directory contain jpg or png, and filtering out the image files of the dynamic wallpaper animation frames; creating a cache entry key (CacheEntryKey) object for each dynamic wallpaper animation frame image file, storing the file path and sequence number; storing in the cache: adding the created cache entry key (CacheEntryKey) object to a hash map (HashMap) for subsequent use.
[0011] Furthermore, the present application also proposes that the steps of determining whether the current desktop dynamic wallpaper is visible include: detecting the onVisibilityChanged callback method in the WallpaperService.Engine class in the Android system to notify that the visibility of the dynamic wallpaper has changed; if the current screen is on the desktop or locked, the current dynamic wallpaper visibility status is monitored.
[0012] Furthermore, the present application also proposes that the step of detecting that the user triggers unlocking includes: monitoring whether the registered unlocking broadcast ACTION_USER_PRESENT is called back, and monitoring whether the user unlocks the screen from locked to unlocked.
[0013] Furthermore, the present application also proposes a device for realizing unlocking dynamic wallpaper from lock screen to desktop, wherein the device includes: a first pre-setting module for pre-setting dynamic wallpaper animation frame images, the dynamic wallpaper animation frame images include screen-on animation images and unlocking animation images; and storing the dynamic wallpaper animation frame images in a specified directory of a mobile terminal mobile phone application in sequence of frames; the dynamic wallpaper animation frame images stored in the specified directory are frame animation images named with numbers; a second pre-setting module for pre-setting the inherited dynamic wallpaper service WallpaperService class, which is used to set the current application as a dynamic wallpaper when an application inherits this class; a loading cache module for controlling the loading of all animation resources from the specified directory where dynamic wallpaper animation frame images are pre-stored to the cache when detecting that the dynamic wallpaper application is started; the dynamic wallpaper animation frame images include screen-on animation images and unlocking animation images; a screen-on triggering module for determining whether the current desktop dynamic wallpaper is visible when detecting that the mobile terminal triggers the screen-on and monitoring whether the current screen-on state is from the off screen to the screen-on state;
[0014] The screen-brightening animation playback control module is used to start the current first segment of the dynamic wallpaper animation when the current desktop dynamic wallpaper is visible, and load the image resources from the cache list according to the current frame number, and control the frame-by-frame playback of the screen-brightening animation picture from the first frame of the cached screen animation picture to the last frame of the cached screen animation picture; the unlocking animation playback control module is used to control the start of the second segment of the dynamic wallpaper animation when it detects that the user triggers unlocking, and load the image resources from the cache list according to the current frame number; and control the frame-by-frame playback of the unlocking animation picture from the first frame of the cached unlocking animation picture to the last frame of the unlocking animation picture.
[0015] Furthermore, the present application also proposes an intelligent terminal, which includes a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, including one or more programs for executing the above method.
[0016] Furthermore, the present application also proposes a non-transitory computer-readable storage medium, wherein, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the above method.
[0017] From the above, it can be seen that the present application provides a method, device, smart terminal and storage medium for realizing unlocking dynamic wallpaper from lock screen to desktop. By pre-caching dynamic wallpaper animation resources and playing the animation frame by frame in stages according to the screen light and unlock events, it solves the problems of low dynamic wallpaper loading efficiency and discontinuous animation in the unlocking process in the prior art. It has the advantages of improving the smoothness and visual effects of dynamic wallpaper animation during the unlocking process and improving user experience.
[0018] The present invention provides a method, device, smart terminal, and storage medium for implementing dynamic wallpapers that can be unlocked from the lock screen to the desktop. This method enables phased animation triggering and dynamic resource management. By closely integrating user behavior with animation playback logic, it achieves a smooth and efficient dynamic wallpaper experience while balancing performance and energy consumption. This invention adds a new functionality to mobile terminals: the ability to unlock dynamic wallpapers from the lock screen to the desktop, providing greater convenience for users. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 This is a flow chart of a method for implementing unlocking dynamic wallpaper from the lock screen to the desktop provided in Example 1 of the present invention.
[0021] Figure 2 This is a schematic diagram of folding wallpaper resources for implementing a method for unlocking dynamic wallpaper from the lock screen to the desktop according to specific application embodiment 2 of the present invention.
[0022] Figure 3 This is a schematic diagram of storing dynamic wallpaper animation frames of a method for implementing unlocking dynamic wallpaper from the lock screen to the desktop according to specific application embodiment 2 of the present invention.
[0023] Figure 4 This is a principle block diagram of an embodiment of a device for realizing unlocking dynamic wallpaper from the lock screen to the desktop provided by the present invention.
[0024] Figure 5 This is a block diagram of the internal structure of the smart terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The technical solutions of this application will be described clearly and completely below, in conjunction with the accompanying drawings. It should be understood that the described embodiments represent only a portion of the embodiments of this application, and not all of them. The components of this application, generally described and illustrated in the drawings herein, may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but rather merely represents selected embodiments of this application. All other embodiments derived by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. Furthermore, in the description of this application, the terms "first," "second," etc., are used solely to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0026] With the increasing popularity of smartphones and technological advancements, users are demanding increasingly more personalized and aesthetically pleasing designs. Dynamic wallpapers, a tool that can display dynamic visual effects on devices, have emerged as a necessity. Especially during the transition from screen on to unlock, dynamic wallpapers not only provide visual enjoyment but also enhance the user experience. However, existing mobile terminals generally lack the ability to seamlessly switch between dynamic wallpapers from the lock screen to the desktop, making it difficult for users to experience the complete animation effects when turning the screen on and unlocking, impacting the visual interaction experience.
[0027] To address these issues, a dynamic wallpaper mechanism is needed that can play different animation clips during the screen-on and unlock phases. Considering the resource management characteristics of mobile devices, key issues must be addressed, including efficient animation resource loading, accurate playback status identification, and seamless animation sequence transitions. By dividing animation resources into two phases, namely, screen-on animation and unlock animation, and establishing an event-triggered playback control mechanism, this effectively enables adaptive dynamic wallpaper switching between different system states.
[0028] Therefore, if Figure 1 As shown, this application proposes a method for realizing unlocking dynamic wallpaper from lock screen to desktop, comprising the following steps:
[0029] Step S100: pre-setting dynamic wallpaper animation frames, wherein the dynamic wallpaper animation frames include a screen-on animation picture and an unlock animation picture; and storing the dynamic wallpaper animation frames in a designated directory of a mobile terminal application in sequence of frames; the dynamic wallpaper animation frames stored in the designated directory are frame animation pictures named with numbers;
[0030] Step S200: pre-set the WallpaperService class that inherits the dynamic wallpaper service, so that when an application inherits this class, the current application can be set as a dynamic wallpaper;
[0031] Step S300: When it is detected that the dynamic wallpaper application is started, all animation resources are loaded into the cache from a designated directory pre-stored with dynamic wallpaper animation frames; the dynamic wallpaper animation frames include screen-on animation images and unlocking animation images;
[0032] Step S400: When the mobile terminal is detected to trigger the screen on state, and it is monitored that the current screen on state is from the off state to the on state, it is determined whether the current desktop dynamic wallpaper is visible;
[0033] Step S500: When the current desktop dynamic wallpaper is visible, the first segment of the current dynamic wallpaper animation is started, and the image resources are loaded from the cache list according to the current frame number, and the screen-brightening animation image is played frame by frame from the first frame to the last frame of the screen-brightening animation image loaded into the cache;
[0034] Step S600: When it is detected that the user triggers unlocking, the second dynamic wallpaper animation is started, and the picture resources are loaded from the cache list according to the current frame number; the unlocking animation picture is played frame by frame from the first frame of the unlocking animation picture loaded into the cache to the last frame of the unlocking animation picture.
[0035] This application proposes to control the loading of all animation resources from a specified directory into a cache when it is detected that a dynamic wallpaper application is started. The directory stores dynamic wallpaper animation frame images including screen-on animation images and unlock animation images; when it is detected that the mobile terminal screen is on and is in a transition from screen-off to screen-on state, the frame-by-frame playback of the screen-on animation is started; when a user unlocking operation is detected, the frame-by-frame playback of the unlocking animation is started.
[0036] Dynamic wallpaper animation frames are a collection of animation resources consisting of multiple consecutive images. Specifically, they can be implemented using image files numbered in the order in which they are played, for example, naming the 50 frames of a light screen animation light_001.png to light_050.png. This feature establishes a standardized resource naming convention to ensure the accuracy of the frame sequence during animation playback.
[0037] Loading from a designated directory refers to the system's preset animation resource storage path, which can be implemented using the Android app's assets directory or a dedicated folder on internal storage. This feature ensures that animation resources can be quickly located and loaded centrally when the app starts, avoiding frequent access to storage devices during runtime.
[0038] The caching mechanism temporarily stores loaded animation resources in memory. This is achieved by creating a hash map to store file paths and sequence numbers. This feature reduces repeated file read operations and improves resource call efficiency during animation playback.
[0039] Frame-by-frame playback control displays animated images sequentially at a preset frame rate. This is achieved by using a timer to trigger frame switching and the image rendering component. This feature ensures smooth animation playback by precisely controlling the display duration of each frame.
[0040] Specifically, during the initialization phase of the dynamic wallpaper application, the present invention automatically scans the image files that comply with the naming conventions in the specified directory, and establishes a cache index according to the screen-on animation and unlock animation categories. When the device switches from the screen-off state to the screen-on state, the system triggers the playback of the first animation segment by monitoring the power state change event, and sequentially reads the screen-on animation frames from the cache for rendering and display. When the user performs an unlock gesture, the present invention triggers the playback of the second animation segment by receiving the unlock broadcast event, seamlessly switches to the unlock animation frame sequence, and maintains the desktop wallpaper state until the last frame is displayed.
[0041] Compared to existing technologies, traditional dynamic wallpaper solutions only support static or looping playback in a single scenario and cannot switch between different animation stages based on device status changes. This solution, by dividing the animation into two stages: screen-on and unlock, combined with an event-driven playback control mechanism, achieves the first seamless switching of dynamic wallpapers during the unlock process. It also uses pre-loaded caching technology to effectively reduce resource latency during animation playback.
[0042] Through the above technical solution, this application successfully solves the technical problem of dynamic wallpapers not being able to play coherently from the time a mobile terminal turns on the screen to when it is unlocked, achieving efficient management and precise control of animation resources. This solution avoids the memory pressure of loading a large amount of resources at a time through a segmented loading mechanism, and utilizes an event-triggered mechanism to ensure precise synchronization of animation playback and user operations, significantly improving the interactive experience of dynamic wallpapers.
[0043] The present application further proposes that before detecting the start of the dynamic wallpaper application, the step includes: pre-setting the dynamic wallpaper animation frame image, the dynamic wallpaper animation frame image includes the screen light animation image and the unlock animation image; and storing the dynamic wallpaper animation frame images in the order of frames in the specified directory of the mobile terminal mobile phone application.
[0044] Among them, dynamic wallpaper animation frames refer to a sequence of multiple static images. Specifically, this can be achieved by using continuous picture files arranged along a timeline. For example, the transition effects of the screen lighting and unlocking processes can be split into several image files at a rate of 24 frames per second. Storing in sequence by frame means numbering and storing the split image resources according to the playback logic. Specifically, this can be achieved by associating file naming rules with the playback order. For example, the first frame can be named "frame_001.jpg" and subsequent frames can be numbered in ascending order.
[0045] Specifically, before the dynamic wallpaper application is launched, the animation resources corresponding to the two scenes of lighting the screen and unlocking the screen need to be disassembled into independent image files respectively. These files are named in the chronological order of the actions. For example, the first frame of the screen lighting animation is named "light_001.png" and the last frame is "light_030.png"; the first frame of the unlocking animation is named "unlock_001.jpg" and the last frame is "unlock_025.jpg". All files are stored in a unified system-preset path, such as the " / animations" folder in the application's private directory. This storage method allows the application to quickly build a playback sequence based on the file naming rules after startup, avoiding the computational overhead caused by dynamically generating frame indexes.
[0046] Compared to existing technologies, traditional solutions lack orderly storage and management of animation resources, requiring real-time parsing of file contents to determine frame order during playback, which can easily lead to loading delays or frame misalignment. This solution improves animation frame call efficiency by presetting naming rules and storage paths, while also eliminating animation playback anomalies caused by file disarray.
[0047] Through the above technical solution, this application achieves rapid positioning and sequential reading of animation resources, ensuring that the screen-on and unlock animations are played frame by frame according to the preset logic. This technical approach effectively solves the animation stuttering and frame skipping problems caused by the chaotic resource management of existing dynamic wallpapers, and ensures that the transition animation from the lock screen to the desktop presents a coherent and smooth visual effect.
[0048] The present application further proposes that the dynamic wallpaper animation frames stored in the designated directory are frame animation pictures named with numbers.
[0049] The designated directory refers to a predefined file storage path in the mobile terminal, which can be implemented using an application resource directory or an external storage directory. It is used to uniformly manage dynamic wallpaper image resources. Digital naming refers to the inclusion of continuously increasing numerical identifiers in the image file names, which can be implemented in the form of "frame_001.png" and "frame_002.jpg". The numerical sequence represents the frame sequence relationship of the animation playback.
[0050] Specifically, before the dynamic wallpaper application is started, the image resources required for the screen-lighting animation and the unlocking animation need to be named in the order of playback. For example, the first frame of the screen-lighting animation can be named "wake_001.png", the second frame is "wake_002.png", and so on until the last frame corresponds to the largest number. The pictures of the unlocking animation can follow the same rules, for example, named "unlock_001.jpg". When the application is started, the system automatically generates a cache list according to the numerical order in the file name by traversing the files in the specified directory. During the animation playback process, the corresponding image file is directly matched by reading the current frame number, thereby ensuring that the frame sequence of the screen-lighting and unlocking animations can be accurately loaded and played in sequence.
[0051] Compared to existing technologies, traditional dynamic wallpapers often lack unified naming conventions for frame images, requiring reliance on additional index files or manual configuration of the order during loading, which can easily lead to frame sequence confusion and low loading efficiency. This solution, by enforcing a numerical naming convention, enables the system to automatically sort images based on file names, reducing resource management complexity.
[0052] Through the above technical solution, this application solves the problem of incorrect loading order of dynamic wallpaper animation frame sequences due to irregular naming, ensures the continuity of animation playback, and at the same time reduces the dependence on additional index files and improves resource loading efficiency.
[0053] The present application further proposes pre-setting an inherited dynamic wallpaper service (WallpaperService) class, so that when an application inherits this class, the current application can be set as a dynamic wallpaper.
[0054] The WallpaperService class refers to the basic service class used to implement dynamic wallpaper functionality in the Android system. This can be achieved by defining a subclass in Java or Kotlin and overriding the onCreateEngine method. By inheriting this class, an application can have the core capabilities of dynamic wallpapers.
[0055] Among them, inheritance refers to the derivation relationship between classes in object-oriented programming. It can be achieved by using the extends keyword in the code to declare the relationship between the subclass and the parent class. The inheritance mechanism can reuse the dynamic wallpaper behavior logic defined in the system framework.
[0056] Specifically, during the development of a dynamic wallpaper application, you need to create a custom class and inherit the WallpaperService class, for example, name it CustomWallpaperService. This subclass must implement the onCreateEngine method and return a custom Engine instance, which is responsible for handling the wallpaper drawing and animation control logic. Once the application completes the inheritance, declare the service in the AndroidManifest.xml file (Android manifest file) and add dynamic wallpaper metadata. The system will then recognize the application as a legitimate dynamic wallpaper provider, and the user can then choose to enable the dynamic wallpaper in the system settings.
[0057] Compared to existing technologies, traditional dynamic wallpaper implementations may not properly integrate the dynamic wallpaper service interface provided by the system framework, resulting in the system not being able to recognize it as a valid wallpaper source. This solution ensures that dynamic wallpaper applications can correctly connect to the Android wallpaper management framework upon startup by forcing them to inherit the system standard interface class, avoiding compatibility issues caused by missing interfaces while fully preserving the system's standardized process for controlling the wallpaper lifecycle.
[0058] Through the above technical solution, this application solves the problem that dynamic wallpaper applications cannot be set as default wallpapers by users because they are not connected to the system service framework, ensuring that the application can be correctly identified and loaded by the system when it is started, thereby providing a basic operating environment for the subsequent caching and playback process of animation resources.
[0059] The present application further proposes that when it is detected that a dynamic wallpaper application is started, the resource manager of the dynamic wallpaper application is obtained to access all animation resource files in the specified directory; according to the type parameter (type parameter) passed in, all animation resource files located in the specified directory are listed; it is checked whether the file names of all animation resource files in the specified directory contain jpg or png, and the image files of the dynamic wallpaper animation frames are filtered out; for each image file of the dynamic wallpaper animation frame, a cache entry key object is created to store the file path and sequence number; and it is stored in the cache: the created cache entry key object is added to a hash map for subsequent use.
[0060] Among them, the resource manager refers to the interface for accessing the internal storage resources of the application, which can be implemented by calling the AssetManager class ("resource manager class") of the Android system. This object can read file resources stored in the assets directory or the res directory. Among them, the type parameter refers to an identifier that distinguishes the type of animation resource, which can be passed in as a string. For example, "bright" represents the screen-brightening animation, and "unlock" represents the unlocking animation. This parameter is used to filter the animation frame sequences required for different scenes. Among them, the cache entry key object refers to a data structure that stores file paths and numbers. It can be implemented by a custom class. It encapsulates a file path string and an integer serial number field, and associates the file path with the playback order in the form of a key-value pair. Among them, the hash map refers to a data storage structure implemented based on a hash table. It can be implemented by the HashMap class of the Java language. The cache entry key object is stored in the form of a key-value pair, which facilitates the subsequent rapid retrieval of the corresponding image resources by sequential number.
[0061] Specifically, when the dynamic wallpaper application is started, the resource manager is activated to access the preset storage path. According to the animation type parameters passed in, the system traverses all files in the target directory and filters out image files that conform to the naming rules and have extensions of jpg or png. Each image file is assigned an independent cache key object, which records its physical storage path and playback sequence number. All cache key objects are stored in a hash map to form a quickly accessible index structure. For example, the 20 frames of the bright screen animation can be numbered bright_001 to bright_020, and their key objects are stored in the mapping table in sequence to ensure that they can be quickly retrieved in sequence during subsequent playback.
[0062] Compared to existing technologies, traditional dynamic wallpaper resource loading methods require re-reading files each time an animation plays, resulting in memory usage fluctuations and loading delays. This solution, through preloading and hash map management, completes resource indexing for all animation frames during application startup, effectively reducing file access times during real-time playback. A cache key structure design, previously undisclosed in the prior art, addresses resource location inefficiencies during sequential playback of multiple animation frames and avoids performance losses caused by file traversal.
[0063] Through the above technical solutions, this application achieves rapid positioning and efficient management of animation resources, ensuring that dynamic wallpapers can play smoothly when switching between scenes when the screen is on and unlocked. The pre-generated cache index structure effectively reduces resource loading delays during real-time rendering, avoids frame rate fluctuations caused by file reading during animation playback, and improves the operational stability and user experience of dynamic wallpapers.
[0064] This application further proposes a step for determining whether the dynamic wallpaper is visible on the current desktop, including detecting the onVisibilityChanged (visibility change) callback method in the WallpaperService.Engine class (wallpaper service engine class) in the Android system to notify that the visibility of the dynamic wallpaper has changed; if the current desktop or lock screen is in the state, the current dynamic wallpaper visibility status is monitored.
[0065] The WallpaperService.Engine class is the base class for the dynamic wallpaper service engine provided by the Android system. You can implement dynamic wallpaper drawing logic by inheriting from this class and overriding its lifecycle methods. This base class provides a system-level callback interface associated with wallpaper visibility, triggering corresponding processing logic when the dynamic wallpaper's visibility status changes.
[0066] The onVisibilityChanged callback method is automatically called by the system when the dynamic wallpaper's visibility status changes. It accepts a Boolean parameter to determine whether the wallpaper is currently visible. This method accurately captures the user's actions of switching to the desktop or lock screen, providing real-time status judgment for subsequent animation playback decisions.
[0067] Specifically, while the dynamic wallpaper service is running, the system automatically triggers the onVisibilityChanged method whenever the screen display state changes. If the visibility parameter passed to this method is true, it indicates that the current interface is in the desktop or lock screen state and the dynamic wallpaper is within the visible area. By monitoring this state change event, it is possible to accurately determine whether the dynamic wallpaper should be animated, thereby avoiding ineffective resource loading and image drawing operations when the dynamic wallpaper is not visible.
[0068] Compared to existing technologies, traditional dynamic wallpaper solutions often fail to accurately detect the wallpaper's actual visibility, leading to animation timing errors and resource waste during interface transitions. This solution, through a system-level visibility callback mechanism, can obtain the dynamic wallpaper's display status in real time on both the lock screen and desktop, ensuring that animation playback remains strictly synchronized with the user's current interface.
[0069] Through the above technical solution, this application achieves accurate judgment of the dynamic wallpaper's visible state, effectively solving the problem of chaotic animation playback logic caused by interface switching. This method avoids unnecessary image rendering operations when the dynamic wallpaper is not visible, reducing system resource consumption while ensuring the coherent playback effect of the screen lighting and unlocking animations.
[0070] This application further proposes to monitor whether the user unlocks the screen by monitoring whether the registered unlock broadcast ACTION_USER_PRESENT is called back.
[0071] The unlock broadcast, ACTION_USER_PRESENT, is a system-level broadcast signal automatically sent by the Android system after the user successfully unlocks the device. This can be achieved by registering a BroadcastReceiver component in your app and setting an IntentFilter to listen for this broadcast. This broadcast, as a standard system event notification mechanism, accurately reflects the key transition from the locked screen to the unlocked state.
[0072] Specifically, when the user unlocks the screen while the dynamic wallpaper service is running, the Android system framework proactively sends the ACTION_USER_PRESENT broadcast. The dynamic wallpaper app captures this event through a pre-registered broadcast receiver, immediately triggering the launch of the second dynamic wallpaper animation. This mechanism receives information about unlock state changes through the system's native event notification channel, avoiding the resource consumption associated with active polling.
[0073] Compared to existing technologies, traditional solutions often rely on analyzing screen touch events or sensor data to infer user unlocking intentions, which can lead to response delays and the risk of misjudgment. This solution directly uses system broadcasts as the trigger signal source, not only accurately matching the user's actual unlocking action but also ensuring strict synchronization between animation playback and system interface transitions.
[0074] Through the above technical solution, this application realizes accurate recognition of user unlocking operations, effectively solves the technical problem of inaccurate animation triggering timing of dynamic wallpaper during the transition from lock screen to desktop, ensures seamless connection between the screen lighting animation and the unlocking animation, and thus provides a coherent and smooth visual experience.
[0075] The present invention is further described in detail below through specific application examples:
[0076] like Figure 2 As shown, the method for realizing unlocking dynamic wallpaper from the lock screen to the desktop provided in this embodiment 2 includes the following steps:
[0077] S11, the user sets the dynamic wallpaper and enters S12;
[0078] In the embodiment of the present invention, the designed dynamic wallpaper animation frame images are first stored in the asset directory of the application; for example, the current dynamic wallpaper resource storage directory is: assets\dynamicwallpaper\anim.
[0079] The assets\dynamicwallpaper\anim directory contains frame animation images named with numbers, such as Figure 3 As shown in the figure above, all the pictures are named with numbers, for example, there are 120 frames in total, (0, 1, 2, ... 119); the animation is divided into two parts, the first part is the screen lighting animation (0, 60) frames and the second part is the unlocking animation (60, 119) frames.
[0080] S12, the application inherits the WallpaperService class; and then proceeds to S13;
[0081] In this step, inherit the dynamic wallpaper service WallpaperService class;
[0082] Among them, the dynamic wallpaper service WallpaperService service class is a dynamic wallpaper service class. As long as the application inherits this class, the system of the present invention can set the current application as a dynamic wallpaper.
[0083] S13, dynamic wallpaper application starts, and enters S14 and S21;
[0084] S14, load all animation resources from the asset directory storing the (0, 120) frame image resources; then enter S15;
[0085] The present invention will load all frame animation resources, load image files from the specified asset directory, and cache them for subsequent use, such as setting them as dynamic wallpaper. The specific steps can be as follows:
[0086] 1) Get the resource manager: Get the application's resource manager through context.getAssets() to access files in the assets directory.
[0087] 2) List files: List all files in the assets / dynamicwallpaper / [type] / directory based on the passed type parameter.
[0088] 3) Filter image files: Check whether these file names contain jpg or png to confirm that they are image files.
[0089] 4) Create cache key: For each image file, create a CacheEntryKey object to store the file path and sequence number.
[0090] 5) Store in cache: Add these CacheEntryKey objects to a hash map (HashMap) for subsequent use.
[0091] S15, saving the loaded image resources to the cache: loading the images into the cache in order or by number;
[0092] S20, the user triggers the screen to turn on and enters S21;
[0093] S21, monitor whether the user changes the screen from autumn to bright, and enter S22;
[0094] S22, determining whether the dynamic wallpaper is visible on the current desktop, and if so, proceeding to S23;
[0095] In this invention, to monitor the visibility of the current wallpaper, you can use onVisibilityChanged (visibility change). onVisibilityChanged is a callback method in the Android WallpaperService.Engine class (WallpaperService.Engine). This method is used to notify the dynamic wallpaper of a visibility change. If the current dynamic wallpaper is on the desktop or locked, the current dynamic wallpaper visibility status can be monitored.
[0096] S23, start the current first dynamic wallpaper animation and enter S24;
[0097] S24, play and draw from 0-60 frames one by one, load the image resources from the cache list according to the current frame number, and enter S31.
[0098] This step starts the dynamic wallpaper animation. Each frame is drawn every 20 milliseconds starting from frame 0 and continuing until the specified end frame. For example, the animation at frame (0, 60) mentioned above is played.
[0099] S30, the user triggers unlocking and enters S31;
[0100] S31, monitor whether the user unlocks the car, and if unlocked, enter S32;
[0101] S32, start the second dynamic wallpaper animation and enter S33;
[0102] S33, play and draw frame by frame from the current frame to 119, and load the image resources from the cache list according to the current frame number.
[0103] Steps S31-33 primarily monitor whether the user has unlocked the phone from the lock screen. By registering the unlock broadcast, ACTION_USER_PRESENT, this broadcast is called back when the user unlocks the phone. The unlock animation is executed. When the user unlocks the phone, the unlock animation plays here, for example, at frames (60, 119) mentioned above. This creates a two-step animation from the phone's screen turning on to unlocking.
[0104] As can be seen from the above, the core of the embodiment of the present invention lies in staged animation triggering and dynamic resource management. By closely combining user behavior with animation playback logic, a smooth and efficient dynamic wallpaper experience is achieved while balancing performance and energy consumption.
[0105] Exemplary devices
[0106] like Figure 4 As shown, an embodiment of the present invention provides a device for realizing unlocking dynamic wallpaper from the lock screen to the desktop, the device comprising:
[0107] The first presetting module 310 is used to pre-set dynamic wallpaper animation frames, wherein the dynamic wallpaper animation frames include screen-on animation pictures and unlocking animation pictures; and store the dynamic wallpaper animation frames in a designated directory of the mobile terminal application in sequence of frames; the dynamic wallpaper animation frames stored in the designated directory are frame animation pictures named with numbers;
[0108] The second presetting module 320 is used to pre-set the WallpaperService class that inherits the dynamic wallpaper service, so that when an application inherits this class, the current application can be set as a dynamic wallpaper;
[0109] The loading cache module 330 is used to control the loading of all animation resources from a specified directory pre-stored with dynamic wallpaper animation frames into the cache when detecting that the dynamic wallpaper application is started; the dynamic wallpaper animation frames include screen-on animation images and unlocking animation images;
[0110] The screen-on triggering module 340 is used to determine whether the current desktop dynamic wallpaper is visible when detecting that the mobile terminal has triggered the screen-on and monitoring whether the current screen-on state is from the off-screen state to the on-screen state;
[0111] The screen-brightening animation playback control module 350 is used to start the current first segment of the dynamic wallpaper animation when the current desktop dynamic wallpaper is visible, load the image resources from the cache list according to the current frame number, and control the playback of the screen-brightening animation image frame by frame from the first frame to the last frame of the screen-brightening animation image loaded into the cache;
[0112] The unlock animation playback control module 360 is used to control the start of the second dynamic wallpaper animation when it detects that the user triggers the unlock, and load the image resources from the cache list according to the current frame number; control the playback of the unlock animation picture frame by frame from the first frame of the unlock animation picture loaded into the cache to the last frame of the unlock animation picture, as described above.
[0113] Among them, the first pre-setting module refers to a logical unit for generating and storing dynamic wallpaper animation frame images, which can be implemented by the file system or database of the mobile terminal. Its function is to provide standardized resource storage paths and naming rules for subsequent animation playback. The second pre-setting module refers to a configuration module for realizing the inheritance relationship of dynamic wallpaper services, which can be implemented by extending the WallpaperService base class provided by the Android system. Its function is to enable the application to have a basic framework for dynamic wallpaper functions. The loading cache module refers to a resource loader, which can be implemented by asynchronous threads and memory management technology. Its function is to reduce the delay during animation playback by preloading. The screen-lighting trigger module refers to a status monitoring unit, which can be implemented by monitoring system power events and screen status callbacks. Its function is to accurately identify the screen-lighting trigger conditions. The screen-lighting animation playback control module and the unlocking animation playback control module are both animation schedulers, which can be implemented by a frame rate controller and an image rendering engine. Its function is to switch different animation sequences according to the user interaction stage.
[0114] Specifically, when the user enables the dynamic wallpaper function, the first pre-setting module names the frames of the screen-lighting animation and the unlocking animation in a numerical sequence and stores them in a specified directory. For example, the first frame of the screen-lighting animation is named "light_001.png" and the last frame is named "light_024.png". The second pre-setting module enables the application to obtain dynamic wallpaper permissions by creating a subclass that inherits WallpaperService. During the dynamic wallpaper startup phase, the loading cache module traverses the image files in the specified directory, filters resource files with extensions of png or jpg, and creates a cache key-value pair containing the file path and sequence number and stores it in the hash table. When the user presses the power button to trigger the screen to light up, the screen-lighting trigger module confirms the screen status change by monitoring the system broadcast, and determines whether the dynamic wallpaper is in a visible state by querying the visibility callback of WallpaperService.Engine. If the dynamic wallpaper is visible, the screen-lighting animation playback control module extracts the cache resources from the hash table in sequence and plays the screen-lighting animation at a rate of 24 frames per second. After the user performs the slide-to-unlock operation on the lock screen interface, the unlock animation playback control module receives the ACTION_USER_PRESENT system broadcast, triggering the frame-by-frame rendering process of the unlock animation.
[0115] Compared with existing technologies, traditional dynamic wallpaper solutions for mobile terminals typically use a single animation loop playback mode, failing to distinguish the animation transition between the screen-on and unlock stages. This device, however, achieves dual-stage animation control through a modular design. The collaborative work of the first and second pre-set modules ensures standardized management and service binding of animation resources. The preloading mechanism of the load cache module avoids resource loading lags during animation playback. The event monitoring mechanisms of the screen-on trigger module and the unlock animation playback control module precisely match user interaction scenarios, ensuring a coherent and complete transition animation from screen-on to unlock.
[0116] Through the above technical solution, this application solves the problem that existing mobile terminal dynamic wallpapers cannot achieve the transition animation from the lock screen to the desktop. Through modular resource management and event triggering mechanisms, it achieves a seamless connection between the screen lighting animation and the unlocking animation. By preloading animation frames and controlling playback in stages, this device effectively reduces resource loading delays during animation playback. At the same time, by utilizing standardized naming rules and service inheritance mechanisms, it improves the compatibility and maintainability of dynamic wallpaper applications.
[0117] Based on the above embodiment, the present invention also provides an intelligent terminal, whose principle block diagram can be shown as follows: Figure 5 As shown. The smart terminal includes a processor, a memory, a network interface, a display screen, and a database connected through a system bus. Among them, the processor of the smart terminal is used to provide computing and control capabilities. The memory of the smart terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the smart terminal is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for realizing unlocking dynamic wallpaper from the lock screen to the desktop. The database of the smart terminal is used to store an implementation program for unlocking dynamic wallpaper from the lock screen to the desktop.
[0118] Those skilled in the art will understand that Figure 5 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the solution of the present invention and does not constitute a limitation on the smart terminal to which the solution of the present invention is applied. The specific smart terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0119] In one embodiment, a smart terminal is provided, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:
[0120] When the dynamic wallpaper application is detected to be started, all animation resources are loaded into the cache from a specified directory where dynamic wallpaper animation frames are pre-stored; dynamic wallpaper animation frames include screen-on animation pictures and unlocking animation pictures;
[0121] When the mobile terminal is detected to trigger the screen on, and the current screen on state is detected to be from off to on, it is determined whether the current desktop dynamic wallpaper is visible;
[0122] When the current desktop dynamic wallpaper is visible, the first dynamic wallpaper animation is started, and the image resources are loaded from the cache list according to the current frame number. The screen animation images are played frame by frame from the first frame to the last frame of the screen animation images loaded into the cache.
[0123] When it is detected that the user triggers unlocking, the control starts the second dynamic wallpaper animation, and loads the image resources from the cache list according to the current frame number; the control plays the unlock animation picture frame by frame from the first frame of the unlock animation picture loaded into the cache to the last frame of the unlock animation picture, as described above.
[0124] Furthermore, the smart terminal may refer to a mobile device with screen display function and data processing capability, such as a smart phone or tablet computer, which may be implemented as a device equipped with Android or iOS operating system, and is used to run dynamic wallpaper applications and process user interaction events.
[0125] The memory may refer to a physical medium for storing program codes and resources, and may be implemented as an embedded memory chip or an extended memory card, for storing dynamic wallpaper animation frames and loading cache data.
[0126] Among them, the processor can refer to the computing unit that executes program instructions, which can be implemented by a multi-core CPU or a mobile-specific chip to control the animation loading process, frame playback logic and system event monitoring.
[0127] Specifically, the smart terminal stores frame resources containing screen-lit animation and unlocking animation in the memory. When the dynamic wallpaper application is started, the processor executes program instructions to load the animation resources in the specified directory into the cache. After the screen-lit event is triggered, the processor detects the change in screen status and determines the visibility of the dynamic wallpaper. If the conditions are met, the screen-lit animation is played frame by frame from the cache. When the user performs the unlocking operation, the processor listens for the unlocking event through broadcasting and starts the second animation. It sequentially calls the unlocking animation frames from the cache to complete the transition playback. During this process, program instructions control the resource loading order and playback logic to ensure that the animation playback is synchronized with the user operation in real time.
[0128] In some specific embodiments, the smart terminal can be a device with a high refresh rate screen, such as a model that supports 90Hz or 120Hz display, to improve animation smoothness. The memory can use a high-speed flash memory chip, such as UFS3.1 storage media, to ensure fast loading of animation frames. The processor can integrate a graphics processing unit, such as an Adreno or Mali series GPU, to optimize frame rendering efficiency.
[0129] Compared to existing technologies, existing mobile terminals typically only support static wallpaper display or fixed animation playback in a single scenario, lacking a full-process dynamic transition solution from screen-on to unlock. This solution uses program instructions to control multi-stage animation playback, combined with a cache preloading mechanism, to achieve a seamless transition between the lock screen and desktop scenes, while also avoiding lag caused by real-time resource loading.
[0130] Through the above technical solution, this application solves the technical defect that existing terminals cannot achieve dynamic transition from lock screen to desktop. Through the collaborative work of hardware and software, while ensuring efficient utilization of system resources, it completes the preloading, status judgment and multi-stage playback control of animation frames, significantly improving the continuity of the user's visual experience during the screen unlocking process.
[0131] This application further proposes a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by the processor of an electronic device, the electronic device is enabled to execute a method including loading a dynamic wallpaper animation, playing a screen-on animation, and playing an unlock animation. The method includes: loading animation resources from a specified directory into a cache after detecting the launch of a dynamic wallpaper application; determining the visibility of the dynamic wallpaper and starting a screen-on animation from the first frame to the last frame when a screen-on trigger is triggered; and starting an unlock animation from the first frame to the last frame after detecting a user unlock operation.
[0132] Among them, non-temporary computer-readable storage media refers to storage media that can store data for a long time and will not be lost after power failure, such as flash memory chips or solid-state drives, which are used to store program instruction sets. The processor refers to the hardware unit that performs computing tasks and can be implemented using a multi-core architecture chip. It is responsible for parsing and running the instruction set in the storage medium. Instructions are machine-readable opcodes generated by compiling program code, which are specifically written in a programming language and converted into binary code. They are used to control electronic devices to execute the loading and playback process of dynamic wallpapers.
[0133] Specifically, when it is detected that the dynamic wallpaper application is started, all animation resources will be loaded into the cache. This process is achieved by traversing the numerically named image files in the specified directory. When the mobile terminal turns on the screen and is determined to be in the off-screen to on-screen state, the system will detect the visible state of the dynamic wallpaper. If it is in a visible state, it will trigger the screen-on animation to play frame by frame. When the user completes the unlocking operation, the system will interrupt the current animation process and immediately start the frame sequence playback of the unlocking animation, forming a coherent visual effect from the lock screen interface to the desktop. The animation resource loading uses a hash map structure to store the file path and number to ensure the efficiency of the frame sequence call.
[0134] Compared to existing technologies, existing mobile terminal systems only support static wallpapers or single-scene dynamic wallpapers, and are unable to achieve transition animation between the lock screen and the desktop. This solution solves the problem of visual disconnection when switching interfaces by solidifying staged animation control instructions in a storage medium, so that the screen-on and unlock operations trigger different animation sequences respectively. Compared to traditional dynamic wallpapers that only support single playback, this solution uses an event-driven mechanism to achieve animation stage switching, avoiding the performance loss caused by repeated resource loading.
[0135] Through the above technical solution, this application realizes the smooth transition of dynamic wallpaper when switching between the lock screen and the desktop interface, solving the problem of the inability to link animation playback with user operations in the prior art. The storage medium controls the animation playback timing through a pre-stored instruction set, ensuring that animation resources are called on demand during the screen-on and unlocking stages, effectively improving the interface switching response speed. The animation frame preloading mechanism reduces the delay caused by real-time file reading, and the hash map structure optimizes the efficiency of frame sequence retrieval, ultimately forming a complete unlocking dynamic visual effect.
[0136] In summary, the present invention provides a method, device, intelligent terminal, and storage medium for implementing dynamic wallpaper unlocking from the lock screen to the desktop. This method enables phased animation triggering and dynamic resource management. By closely integrating user behavior with animation playback logic, it achieves a smooth and efficient dynamic wallpaper experience while balancing performance and energy consumption. This invention adds a new functionality to mobile terminals: the ability to unlock dynamic wallpaper from the lock screen to the desktop, providing convenience for users.
Claims
1. A method for realizing unlocking dynamic wallpaper from lock screen to desktop, characterized in that: include: When it is detected that the dynamic wallpaper application is started, all animation resources are loaded into the cache from the specified directory where the dynamic wallpaper animation frames are pre-stored; The dynamic wallpaper animation frame images include screen-lighting animation images and unlocking animation images; When the mobile terminal is detected to trigger the screen on, and the current screen on state is detected to be from off to on, it is determined whether the current desktop dynamic wallpaper is visible; When the current desktop dynamic wallpaper is visible, the first dynamic wallpaper animation is started, and the image resources are loaded from the cache list according to the current frame number. The screen animation images are played frame by frame from the first frame to the last frame of the screen animation images loaded into the cache. When the user triggers unlocking, the control starts the second dynamic wallpaper animation and loads the image resources from the cache list according to the current frame number; the control plays the unlock animation picture frame by frame from the first frame of the unlock animation picture loaded into the cache to the last frame of the unlock animation picture.
2. The method for realizing unlocking dynamic wallpaper from lock screen to desktop according to claim 1, characterized in that: The step of detecting that the dynamic wallpaper application is started includes: Pre-set dynamic wallpaper animation frame images, the dynamic wallpaper animation frame images include screen light animation images and unlock animation images; and the dynamic wallpaper animation frame images are stored in the mobile terminal mobile phone application designated directory in sequence of frames.
3. The method for realizing unlocking dynamic wallpaper from lock screen to desktop according to claim 1, characterized in that: The step of detecting that the dynamic wallpaper application is started includes: The dynamic wallpaper animation frame images stored in the designated directory are frame animation images named with numbers.
4. The method for realizing unlocking dynamic wallpaper from lock screen to desktop according to claim 3, characterized in that: The step of detecting that the dynamic wallpaper application is started includes: And pre-set the WallpaperService class that inherits the dynamic wallpaper service, so that when an application inherits this class, the current application can be set as a dynamic wallpaper.
5. The method for realizing unlocking dynamic wallpaper from lock screen to desktop according to claim 1, characterized in that: The step of controlling the loading of all animation resources from a designated directory pre-stored with dynamic wallpaper animation frames into a cache when detecting that the dynamic wallpaper application is started includes: When the dynamic wallpaper application is detected to be started, the resource manager of the dynamic wallpaper application is obtained to access all animation resource files in the specified directory; According to the type parameter passed in, list all animation resource files located in the specified directory; Check whether the file names of all animation resource files in the specified directory contain jpg or png, and filter out the image files of dynamic wallpaper animation frames; For each dynamic wallpaper animation frame image file, create a cache entry key (CacheEntryKey) object to store the file path and sequence number; Store in cache: Add the created cache entry key (CacheEntryKey) object to a hash map (HashMap) for subsequent use.
6. The method for realizing unlocking dynamic wallpaper from lock screen to desktop according to claim 1, characterized in that: The step of determining whether the current desktop dynamic wallpaper is visible includes: By detecting the onVisibilityChanged callback method in the WallpaperService.Engine class in the Android system, it is used to notify that the visibility of the dynamic wallpaper has changed; If you are currently on the desktop or locked screen, the current dynamic wallpaper visibility status is monitored.
7. The method for realizing unlocking dynamic wallpaper from lock screen to desktop according to claim 1, characterized in that: The step of detecting that a user triggers unlocking includes: By monitoring whether the registered unlock broadcast ACTION_USER_PRESENT is called back, monitor whether the user has unlocked the screen from lock to unlock.
8. A device for realizing unlocking dynamic wallpaper from lock screen to desktop, characterized in that: The device comprises: The first presetting module is used to pre-set dynamic wallpaper animation frames, wherein the dynamic wallpaper animation frames include screen-on animation pictures and unlocking animation pictures; and the dynamic wallpaper animation frames are stored in a designated directory of the mobile terminal application in the order of frames; the dynamic wallpaper animation frames stored in the designated directory are frame animation pictures named with numbers; The second pre-setting module is used to pre-set the WallpaperService class that inherits the dynamic wallpaper service, so that when an application inherits this class, the current application can be set as a dynamic wallpaper; A loading cache module is used to control the loading of all animation resources from a specified directory pre-stored with dynamic wallpaper animation frames into the cache when detecting that the dynamic wallpaper application is started; the dynamic wallpaper animation frames include screen-on animation images and unlocking animation images; The screen-on trigger module is used to determine whether the current desktop dynamic wallpaper is visible when detecting that the mobile terminal has triggered the screen-on and monitoring whether the current screen-on state is from off to on; The screen-brightening animation playback control module is used to start the current first segment of the dynamic wallpaper animation when the current desktop dynamic wallpaper is visible, load the image resources from the cache list according to the current frame number, and control the playback of the screen-brightening animation picture frame by frame from the first frame of the cached screen-brightening animation picture to the last frame of the screen-brightening animation picture; The unlock animation playback control module is used to control the start of the second dynamic wallpaper animation when detecting that the user triggers unlocking, load the image resources from the cache list according to the current frame number; control the playback of the unlock animation picture frame by frame from the first frame of the unlock animation picture loaded into the cache to the last frame of the unlock animation picture.
9. An intelligent terminal, characterized in that: The device comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, and the one or more programs include being used to execute the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 7.