Wallpaper rendering method and device, electronic equipment and storage medium

By separating wallpaper rendering logic and resources in the Android system and utilizing cloud resources for rendering, the high cost and low efficiency of existing wallpaper management frameworks are solved, achieving efficient wallpaper switching and improved user experience.

CN116778055BActive Publication Date: 2026-11-27CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310785927.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2026-11-27
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

The existing Android system's wallpaper management framework suffers from high APK production costs and low installation and cold start efficiency when facing the dynamic operation needs of cloud wallpaper resources, and cannot efficiently meet users' dynamic needs.

Method used

By separating the wallpaper rendering logic and resources, the service module uses resources to obtain wallpaper resources from the cloud and renders them using pre-defined rendering scripts, thus avoiding the download and installation process of wallpaper resources. The wallpaper scheme is dynamically switched using the interface provided by the wallpaper manager.

Benefits of technology

It reduces the cost of wallpaper production and publishing, improves wallpaper switching efficiency, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116778055B_ABST
    Figure CN116778055B_ABST
Patent Text Reader

Abstract

The application provides a wallpaper rendering method and device, electronic equipment and storage medium. The method comprises the following steps: sending a wallpaper download request to the cloud by using a predetermined resource providing service module, receiving wallpaper information returned by the cloud, and checking the integrity and legality of the wallpaper information; in response to an operation of triggering the client to switch the desktop wallpaper, calling an interface provided by a wallpaper manager, and sending a wallpaper scheme to a wallpaper rendering service module, wherein the wallpaper scheme comprises a wallpaper type and a wallpaper resource locator; determining a wallpaper rendering mode corresponding to the wallpaper scheme according to a mapping relationship between the wallpaper type and the predetermined wallpaper rendering mode; and obtaining wallpaper resources from the resource providing service module by using the wallpaper resource locator, and rendering the wallpaper resources by using a rendering script configured in the wallpaper rendering mode. The application reduces the production and release cost of the wallpaper, improves the efficiency of the wallpaper switching, and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a wallpaper rendering method, apparatus, electronic device, and storage medium. Background Technology

[0002] The Android operating system integrates a wallpaper management framework, which provides functions such as wallpaper selection, setting, switching, and rendering, meeting the basic needs of most users. The framework is flexibly designed and supports any application (including third-party applications) providing wallpaper rendering services. In the native Android system, wallpaper rendering support is provided by SystemUI, which uses the WallpaperManager class to obtain and set wallpapers. When a user changes the wallpaper, SystemUI receives a notification, reloads the wallpaper, and then uses SurfaceFlinger to render the wallpaper on the screen.

[0003] However, this wallpaper architecture based on the native Android system does not fully consider the dynamic operational needs of cloud wallpaper resources. For example, the SAI OS project wants users to be able to download various types of cloud wallpaper resources from a wallpaper marketplace. If the wallpaper management solution of the native Android system is adopted directly, then each wallpaper resource needs to be made into an independent APK for download and installation. This method of creating, installing, and launching APKs has obvious problems: the creation cost of wallpaper resource APKs is high, and at the same time, the installation and cold start of APKs consume a lot of time and cannot efficiently meet the dynamic needs of users. Summary of the Invention

[0004] In view of this, embodiments of this application provide a wallpaper rendering method, apparatus, electronic device, and storage medium to solve the problems of high APK production cost, low installation and startup efficiency, reduced user experience, and inability to meet complex user needs in the prior art.

[0005] A first aspect of this application provides a wallpaper rendering method, comprising: sending a wallpaper download request to the cloud using a predetermined resource service module, receiving wallpaper information returned by the cloud, and verifying the integrity and legality of the wallpaper information; in response to a client-triggered operation to switch desktop wallpaper, calling an interface provided by a wallpaper manager to send a wallpaper scheme to a wallpaper rendering service module, wherein the wallpaper scheme includes a wallpaper type and a wallpaper resource locator; determining the wallpaper rendering method corresponding to the wallpaper scheme based on the mapping relationship between the wallpaper type and a predetermined wallpaper rendering method; obtaining wallpaper resources from the resource service module using the wallpaper resource locator, and rendering the wallpaper resources using a rendering script configured in the wallpaper rendering method.

[0006] A second aspect of this application provides a wallpaper rendering apparatus, comprising: a request module configured to send a wallpaper download request to the cloud using a predetermined resource service module, receive wallpaper information returned by the cloud, and verify the integrity and legality of the wallpaper information; a calling module configured to, in response to an operation that triggers a client to switch desktop wallpapers, call an interface provided by a wallpaper manager to send a wallpaper scheme to the wallpaper rendering service module, wherein the wallpaper scheme includes a wallpaper type and a wallpaper resource locator; a determining module configured to determine the wallpaper rendering method corresponding to the wallpaper scheme based on a mapping relationship between the wallpaper type and a predetermined wallpaper rendering method; and a rendering module configured to obtain wallpaper resources from the resource service module using the wallpaper resource locator and render the wallpaper resources using a rendering script configured in the wallpaper rendering method.

[0007] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.

[0008] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0009] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects:

[0010] This application separates the processing of wallpaper resources from the rendering service module. By sending wallpaper download requests to the cloud and receiving wallpaper information from the cloud, the integrity and validity of the wallpaper information are verified. In response to a client-side wallpaper switching operation, the application calls the interface provided by the wallpaper manager to send the wallpaper scheme to the wallpaper rendering service module. The wallpaper scheme includes a wallpaper type and a wallpaper resource locator. Based on the mapping relationship between the wallpaper type and the predefined wallpaper rendering method, the application determines the corresponding wallpaper rendering method. Using the wallpaper resource locator, the application retrieves the wallpaper resource from the resource service module and renders the wallpaper resource using the rendering script configured in the wallpaper rendering method. This approach, by separating the processing of wallpaper resources from the wallpaper rendering method, not only reduces the cost of wallpaper production and distribution but also improves the efficiency of wallpaper switching, thereby enhancing the user experience. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating the wallpaper rendering method provided in an embodiment of this application;

[0013] Figure 2 This is a schematic diagram of the wallpaper rendering apparatus provided in the embodiments of this application;

[0014] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0015] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0016] As described in the background section, the Android system employs a wallpaper management framework with rich functionality, including wallpaper selection, setting, switching, and rendering. The goal of this framework is to create a flexible system that allows any application (including third-party applications) to provide wallpaper rendering services. In the native Android system, wallpaper rendering is primarily handled by a component called SystemUI. SystemUI uses a class called WallpaperManager to retrieve and set wallpapers. When a user changes the wallpaper, SystemUI receives a notification, reloads the wallpaper, and uses another tool, SurfaceFlinger, to render the new wallpaper on the screen.

[0017] However, this design has a problem: it conflicts with the wallpaper design philosophy of the SAI OS project. The SAI OS project aims to allow wallpaper resources to be downloaded from the cloud via a wallpaper marketplace, enabling a dynamic management strategy for wallpapers and screensavers. This would allow for more frequent wallpaper updates, improving the user experience. However, this method requires downloading wallpapers from the cloud, rather than selecting them directly from the local storage. This necessitates modifications to Android's native wallpaper management framework to support this new requirement.

[0018] In the SAI OS project, the goal is for users to be able to download various types of wallpapers from the cloud, including single static wallpapers, carousels of multiple static wallpapers, live wallpapers, and video wallpapers. This requirement cannot be well implemented in the native Android wallpaper management framework because, in the native system, each wallpaper is a separate APK (Android application package). Users need to download and install this wallpaper APK, and then use WallPaperManager to launch the wallpaper service within that APK to switch to the new wallpaper. However, the SAI OS project believes this approach has several problems. First, creating APKs is costly. Second, installing APKs consumes user time, and each time a new wallpaper service is launched, a cold start of the APK is required, which also affects the user experience. Therefore, the existing wallpaper management framework suffers from the following problems: high cost of creating wallpaper resource APKs, significant time consumption during APK installation and cold start, and inefficiency in meeting users' dynamic needs.

[0019] In view of the problems existing in the prior art, this application provides a new wallpaper management framework by improving the Android native wallpaper management framework. In this new framework, the wallpaper rendering logic and wallpaper resources are separated. This eliminates the need for users to download and install wallpaper APKs; users only need to download the wallpaper resources, and the rendering service displays the wallpaper on the screen. The new wallpaper management framework provided in this application also includes a wallpaper screensaver control module for managing wallpaper display and switching. This design not only reduces the cost of wallpaper production and distribution but also improves the efficiency of wallpaper switching, thereby enhancing the user experience.

[0020] The technical solution of this application will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0021] Figure 1 This is a flowchart illustrating the wallpaper rendering method provided in an embodiment of this application. Figure 1 The wallpaper rendering method can be executed by the vehicle's intelligent cockpit system. For example... Figure 1 As shown, the wallpaper rendering method may specifically include:

[0022] S101, using predetermined resources, provides a service module to send a wallpaper download request to the cloud, receives the wallpaper information returned by the cloud, and verifies the completeness and legality of the wallpaper information;

[0023] S102, in response to the operation that triggers the client to switch the desktop wallpaper, calls the interface provided by the wallpaper manager and sends the wallpaper scheme to the wallpaper rendering service module. The wallpaper scheme includes the wallpaper type and the wallpaper resource locator.

[0024] S103, Based on the mapping relationship between wallpaper type and predetermined wallpaper rendering method, determine the wallpaper rendering method corresponding to the wallpaper scheme;

[0025] S104: Use the wallpaper resource locator to obtain the wallpaper resource from the resource service module, and use the rendering script configured in the wallpaper rendering method to render the wallpaper resource.

[0026] SystemUI is an important part of the Android operating system. It is responsible for handling and displaying many user interface (UI) elements, such as the status bar, navigation bar, notification bar, and some system-level dialogs and overlays. In the native Android system, SystemUI is a separate system-level application that runs in its own process and provides various user interface functionalities by interacting with other parts of the Android system.

[0027] Regarding wallpaper management, SystemUI uses a class called WallpaperManager to fetch and set wallpapers. When a user selects to change the wallpaper through device settings, this operation is sent to SystemUI. SystemUI then uses the WallpaperManager class to change the system wallpaper. Next, SystemUI notifies a service called SurfaceFlinger that a new wallpaper needs to be displayed. SurfaceFlinger is another important component in the Android system; it is responsible for rendering all views on the screen, including application interfaces and wallpapers provided by SystemUI. When SystemUI notifies SurfaceFlinger that a new wallpaper needs to be displayed, SurfaceFlinger renders the new wallpaper on the screen.

[0028] In simple terms, SystemUI's role in wallpaper management is primarily as a "bridge" between user actions and wallpaper display. It is responsible for receiving users' wallpaper change requests and then using WallpaperManager and SurfaceFlinger to complete the wallpaper changes and display.

[0029] WallPaperManager is an important class in the Android system, primarily responsible for managing wallpapers. This class provides a series of APIs that allow applications to manipulate system wallpapers, such as setting the wallpaper, retrieving the current wallpaper, and listening for wallpaper changes. The working principle of WallPaperManager is roughly as follows:

[0030] First, obtain an instance of WallpaperManager using the WallpaperManager.getInstance(Context) method. This requires a context parameter, typically the application's context.

[0031] Secondly, WallpaperManager provides methods such as setResource(int resourceId) and setStream(InputStream data) to set the wallpaper. These methods allow you to retrieve wallpaper data from a resource file or input stream and then set it as the system wallpaper.

[0032] Additionally, WallpaperManager provides methods such as getDrawable() and getFastDrawable() to retrieve the current wallpaper. These methods return a Drawable object representing the current wallpaper.

[0033] Furthermore, WallpaperManager provides the addOnWallpaperChangedListener(OnWallpaperChangedListener listener) and removeOnWallpaperChangedListener(OnWallpaperChangedListener listener) methods, which can be used to listen for wallpaper changes. When the wallpaper changes, the onWallpaperChanged() method of the OnWallpaperChangedListener interface is called.

[0034] In the wallpaper management framework described above, the main function of WallpaperManager is to provide the wallpaper service with interface functions for switching wallpapers and retrieving the current wallpaper. When a user switches wallpapers, the interface provided by WallpaperManager is called, sending a wallpaper schema containing the wallpaper type and wallpaper resource locator (URI) to the wallpaper service. Upon receiving the request, the wallpaper service dynamically switches the wallpaper rendering according to the provided schema.

[0035] In some embodiments, after verifying the integrity and legality of the wallpaper information, the method further includes: after the integrity and legality of the wallpaper information are verified, storing the wallpaper information returned from the cloud into the internal directory of the resource service module, and displaying the wallpaper information obtained from the cloud on the user interface.

[0036] Specifically, the wallpaper management framework in this application embodiment is divided into a resource service module, a wallpaper rendering service module, and a wallpaper control module. The resource service module, also known as the "wallpaper plaza," is responsible for managing remote wallpaper resources. By sending wallpaper download requests to the cloud and downloading from the network using the resource service module, the module first verifies the wallpaper package (i.e., wallpaper information) to ensure the integrity and legality of the wallpaper resources (i.e., wallpaper information).

[0037] Furthermore, after the integrity and legality verification, if there are no problems with the wallpaper resources, the resource service module will save the wallpaper information returned from the cloud to its own internal directory for storage, and at the same time, display the wallpaper resources obtained from the cloud on the user interface.

[0038] As can be seen, the main responsibilities of the resource service module in this application embodiment include obtaining wallpaper resources from the cloud, verifying the wallpaper resources to ensure their integrity and legality, storing these wallpaper resources in its own internal directory, and finally displaying the obtained wallpaper resources on the user interface.

[0039] In some embodiments, the method of this application further includes: using a resource service module to provide file services to a wallpaper rendering service module and a wallpaper control module, so that the wallpaper rendering service module and the wallpaper control module can obtain wallpaper resources from the resource service module through the file service.

[0040] Specifically, the resource service module in this application embodiment also provides a file service, referred to as FileProvider. The main responsibility of FileProvider is to provide file services to other applications (such as the wallpaper rendering service module and the wallpaper control module), ensuring that other applications can obtain wallpaper resources from the resource service module through the FileProvider service.

[0041] It's important to note that in the Android system, FileProvider is a special type of ContentProvider. It uses content URIs (usually starting with content: / / ) to securely share files, preventing unauthorized access to private files.

[0042] Specifically, a FileProvider can create a content URI to reference a specific file, instead of the actual file URI in the file system. This content URI can then be shared with other applications via an Intent. When an application receiving this content URI needs to access the file, it uses the ContentResolver. The ContentResolver then uses the FileProvider to access the file.

[0043] The working principle of FileProvider mainly includes the following steps:

[0044] 1) Your application creates and configures a FileProvider, including the files and directories it can share.

[0045] 2) When an application needs to share a file, it will create a content URI representing the file through FileProvider.

[0046] 3) The application itself can share the content URI with other applications via Intent.

[0047] 4) When other applications receive the content URI and want to access the file, they will use the ContentResolver to do so.

[0048] 5) ContentResolver uses its own application's FileProvider to access the file.

[0049] By using FileProvider, your application can share files more securely, preventing other applications from gaining unauthorized access to your application's private files.

[0050] In some embodiments, when the wallpaper rendering method is single static wallpaper rendering, multiple static wallpaper carousel rendering, or video wallpaper rendering, the wallpaper resource is rendered using the rendering script configured in the wallpaper rendering method, including: when using the single static wallpaper rendering method, rendering the image of the single static wallpaper using a pre-configured first Lua rendering script to generate a static wallpaper; when using the multiple static wallpaper carousel rendering method, displaying the images of multiple static wallpapers in a carousel using a pre-configured second Lua rendering script to generate a carousel wallpaper; when using the video wallpaper rendering method, playing the video corresponding to the wallpaper resource using a pre-configured third Lua rendering script to generate a video wallpaper.

[0051] Specifically, the rendering service module, or wallpaper service, in this embodiment provides users with interface functions such as switching wallpapers and obtaining the current wallpaper. When a user wants to switch wallpapers, they call the interface provided by WallpaperManager and send a wallpaper schema containing the wallpaper type and wallpaper resource locator (URI) to the wallpaper service. After receiving the request, the wallpaper service dynamically switches the wallpaper rendering according to the provided schema. This process avoids efficiency issues such as installation and cold start. In addition, the wallpaper service also provides four rendering methods, including single static wallpaper rendering, multi-static wallpaper carousel rendering, video wallpaper rendering, and custom rendering. Custom rendering requires the user to provide wallpaper resources and rendering scripts.

[0052] Furthermore, in this technical solution, when a client wants to change the wallpaper, it calls the interface provided by the Wallpaper Manager (WallPaperManager) to send a wallpaper schema containing wallpaper information to the wallpaper service. This wallpaper schema includes the wallpaper type and the locator (URI) of the wallpaper resource. After receiving this request, the wallpaper service dynamically switches the wallpaper rendering method according to the information provided in the wallpaper schema. Since this process does not require reinstalling the application or cold-starting the process, the problem of inefficiency is avoided. The wallpaper service only needs to switch to the corresponding rendering logic (i.e., the wallpaper rendering method) to render the corresponding wallpaper.

[0053] In one example, the wallpaper service of this application provides four wallpaper rendering methods. The specific details of these four wallpaper rendering methods are described below with reference to specific embodiments, and may include the following:

[0054] Single static wallpaper rendering method: This is the simplest way to render wallpapers, which is to display a static image as the wallpaper.

[0055] Multiple static wallpaper carousel rendering method: This method displays multiple static wallpaper images in a carousel to create a dynamic effect.

[0056] Video wallpaper rendering method: This method plays a video as wallpaper, which can create very rich and dynamic effects.

[0057] Custom rendering method: This method allows clients to provide their own wallpaper resources and rendering scripts to achieve special wallpaper effects.

[0058] In practical applications, the wallpaper service uses pre-configured Lua rendering scripts to control the rendering of single static wallpapers, multiple static wallpaper carousels, and video wallpapers. The client only needs to provide the URI of the wallpaper resource. The wallpaper service internally uses three Lua rendering scripts to implement the rendering logic for single static wallpaper rendering, multiple static wallpaper carousel rendering, and video wallpaper rendering, respectively. When switching between different wallpaper types, simply switch the corresponding rendering script.

[0059] The following detailed description, with reference to specific embodiments, illustrates the detailed implementation process of the rendering service module of this application for wallpaper rendering based on a wallpaper scheme, which may include the following steps:

[0060] 1) During initialization, the wallpaper service loads and compiles all Lua rendering scripts and initializes the wallpaper manager, WallPaperManager.

[0061] 2) When a client needs to change the wallpaper, first create a wallpaper schema, which contains the wallpaper type and the URI of the wallpaper resource.

[0062] 3) The client sends the wallpaper scheme to the wallpaper service by calling the interface of the wallpaper manager, WallPaperManager.

[0063] 4) After receiving the wallpaper scheme, the wallpaper service determines the corresponding wallpaper rendering method based on the wallpaper type in the wallpaper scheme, and selects the pre-configured Lua rendering script in the corresponding wallpaper rendering method.

[0064] 5) The wallpaper service loads wallpaper resources from the network or local storage based on the URI of the wallpaper resources, and then renders the wallpaper according to the selected Lua rendering script. The result of the wallpaper rendering is the generation of a new wallpaper.

[0065] In the above implementation, all wallpaper rendering logic is completed within the wallpaper service; the client only needs to provide the wallpaper type and wallpaper resource URI. This greatly simplifies the client's work and allows the wallpaper service to flexibly switch rendering logic according to different needs. Furthermore, since the wallpaper rendering logic and wallpaper resources are separate, switching wallpapers or loading new wallpaper resources will not affect the operation of the wallpaper service, thus ensuring its efficient operation.

[0066] In some embodiments, when the wallpaper rendering method is custom rendering, the wallpaper resources are rendered using the rendering script configured in the wallpaper rendering method, including: when using the custom rendering method, obtaining the wallpaper resources sent by the client and the fourth Lua rendering script, and using the fourth Lua rendering script to render the wallpaper resources in order to generate a custom wallpaper.

[0067] Specifically, for custom rendering methods, the client needs to provide wallpaper resources and Lua rendering scripts. The wallpaper service renders the wallpaper by executing the Lua rendering scripts provided by the client. This rendering method allows the client to achieve highly personalized and complex wallpaper effects.

[0068] According to the technical solution provided in the embodiments of this application, the wallpaper rendering service is optimized. The optimized wallpaper rendering service can dynamically provide clients with various types of wallpaper rendering methods, improving the flexibility of the application. Furthermore, by decoupling the rendering logic and wallpaper resources, rendering efficiency is improved. The technical solution of this application greatly improves the flexibility and efficiency of the wallpaper rendering service, which is of great help in meeting the needs of different types of wallpapers and achieving complex wallpaper effects.

[0069] In some embodiments, the method of this application further includes: selecting an image from a predetermined gallery as a local wallpaper resource, copying the local wallpaper resource to a private file directory of the gallery, and calling the interface provided by the wallpaper manager to send a request to the wallpaper rendering service module, wherein the wallpaper rendering service module renders the local wallpaper resource using the rendering script configured in the predetermined wallpaper rendering method.

[0070] Specifically, users first select an image they want to set as wallpaper from a preset gallery using the gallery app. These images can be stored on internal storage or external storage (such as a USB flash drive). Regardless of where the images are stored, the gallery app provides file services by implementing an interface called FileProvider, enabling these files to be securely shared and accessed.

[0071] Furthermore, after a user selects an image they want to set as their wallpaper, the gallery application copies the selected image to its private file directory. This is done to ensure the image's security and privacy, and also to facilitate subsequent wallpaper rendering services. Afterward, the gallery application calls the interface provided by the Wallpaper Manager (WallPaperManager) to send a wallpaper change request to the wallpaper rendering service module via Remote Procedure Call (RPC). This request includes the wallpaper resource's URI and the user's desired wallpaper type.

[0072] Furthermore, upon receiving a request, the wallpaper rendering service module selects a suitable rendering script based on the user's needs and the type of wallpaper provided. These rendering scripts can be used to render static wallpapers, dynamic carousel wallpapers, custom wallpapers, and even video wallpapers. Once a suitable rendering script is selected, the wallpaper service module uses this script to render the selected image and set it as the current desktop wallpaper.

[0073] By using the above-mentioned rendering method for local wallpaper resources, the wallpaper management system of this application can not only ensure the security and privacy of wallpaper resources, but also provide diversified wallpaper rendering services according to user needs, which makes wallpaper changing and management more convenient and flexible.

[0074] In some embodiments, the method of this application further includes: using a predetermined settings application to obtain wallpaper resources from the resource service module through a data sharing mechanism provided by the resource service module, loading and displaying the obtained wallpaper resources, and controlling wallpaper switching by calling the interface provided by the wallpaper manager.

[0075] Specifically, the wallpaper management system of this application also introduces an application called "Settings Application". The main function of this application is to allow users to browse and select their favorite wallpapers. To achieve this function, the Settings Application uses the ContentProvider provided by the Wallpaper Plaza (i.e., the resource service module) to obtain wallpaper resources from the Wallpaper Plaza.

[0076] Furthermore, during the wallpaper resource acquisition process, the settings app sends a request via the ContentProvider interface. This request includes the type and location information of the wallpaper resource. Upon receiving the request, the wallpaper marketplace locates the corresponding wallpaper resource from its internal storage directory based on the request's content and sends the data of this resource back to the settings app via the ContentProvider interface. After receiving the wallpaper data, the settings app loads and displays this data on the user interface, allowing the user to preview the wallpaper. After the user browses and selects their preferred wallpaper, the settings app calls the interface provided by the WallpaperManager to control the wallpaper switching.

[0077] Through the above methods, the wallpaper management system of this application can achieve resource sharing, allowing users to conveniently browse and select wallpapers in the settings application, and dynamically switch wallpapers based on user selections. This improves both the system's usability and the user experience.

[0078] It's important to note that ContentProvider is a data sharing mechanism provided by Android. It's primarily used for sharing data between different applications. This data can be stored in the file system, SQL Lite database, on the network, or anywhere else; the details of the data's origin are invisible to the accessing application. The following explains how ContentProvider works, specifically including the following:

[0079] First, you need to define a ContentProvider class, which inherits from Android's ContentProvider base class. Then, you need to override some of its methods, such as insert(), query(), update(), delete(), and getType(). These methods are used to handle requests for inserting, querying, updating, deleting, and retrieving data types, respectively.

[0080] After defining the ContentProvider, you need to register it in the AndroidManifest.xml file and specify its authorities. These authorities need to be unique, usually by using the application's package name plus the class name to ensure uniqueness.

[0081] When other applications need to access the data provided by this ContentProvider, they first obtain a ContentResolver object through the `getContentResolver` method of the ContentProvider. Then, they manipulate the data using the `insert()`, `query()`, `update()`, and `delete()` methods of this ContentResolver object. Each of these methods requires a URI as a parameter; this URI contains authority information used by the system to locate the corresponding ContentProvider.

[0082] ContentProvider provides a highly decoupled approach, enabling efficient and secure data storage and access. In the wallpaper service scenario described above, for example, the settings application can obtain wallpaper data through the ContentProvider provided by the wallpaper marketplace, achieving cross-application data sharing.

[0083] According to the technical solution provided in this application embodiment, the wallpaper rendering service and resource service are implemented by different applications. This design clarifies the responsibilities of each application, achieves good modularity, and avoids the complexity caused by over-centralization of functions. Simultaneously, this design allows the rendering service and resource service to be upgraded and maintained independently, enhancing the maintainability and scalability of the system. Secondly, through the design of the rendering service module, this application can realize the rendering of various types of wallpapers, such as dynamic wallpapers, multiple static wallpapers, and video wallpapers. This design enhances the functionality and user experience of the system and can meet the personalized needs of different users. This application can directly obtain wallpaper resources from the network or other means without downloading and installing a wallpaper resource APK. This saves the production cost of the wallpaper resource APK and optimizes the efficiency of wallpaper resource APK installation and cold start.

[0084] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0085] Figure 2 This is a schematic diagram of the wallpaper rendering device provided in an embodiment of this application. Figure 2 As shown, the wallpaper rendering device includes:

[0086] The request module 201 is configured to use predetermined resources to provide a service module to send a wallpaper download request to the cloud, receive wallpaper information returned by the cloud, and verify the integrity and legality of the wallpaper information;

[0087] Module 202 is configured to call the interface provided by the wallpaper manager in response to the operation that triggers the client to switch the desktop wallpaper, and send the wallpaper scheme to the wallpaper rendering service module. The wallpaper scheme includes the wallpaper type and the wallpaper resource locator.

[0088] The determination module 203 is configured to determine the wallpaper rendering method corresponding to the wallpaper scheme based on the mapping relationship between the wallpaper type and the predetermined wallpaper rendering method;

[0089] Rendering module 204 is configured to obtain wallpaper resources from the resource service module using the wallpaper resource locator, and render the wallpaper resources using the rendering script configured in the wallpaper rendering method.

[0090] In some embodiments, Figure 2 After verifying the integrity and legality of the wallpaper information, the request module 201 stores the wallpaper information returned from the cloud into the internal directory of the resource service module and displays the wallpaper information obtained from the cloud on the user interface after the integrity and legality of the wallpaper information is verified.

[0091] In some embodiments, Figure 2 The request module 201 utilizes the resource service module to provide file services to the wallpaper rendering service module and the wallpaper control module, so that the wallpaper rendering service module and the wallpaper control module can obtain wallpaper resources from the resource service module through the file service.

[0092] In some embodiments, when the wallpaper rendering method is single static wallpaper rendering, multiple static wallpaper carousel rendering, or video wallpaper rendering... Figure 2 When rendering a single static wallpaper, the rendering module 204 uses a pre-configured first Lua rendering script to render the image of the single static wallpaper to generate a static wallpaper. When rendering multiple static wallpapers in a carousel, it uses a pre-configured second Lua rendering script to display the images of multiple static wallpapers in a carousel to generate a carousel wallpaper. When rendering a video wallpaper, it uses a pre-configured third Lua rendering script to play the video corresponding to the wallpaper resource to generate a video wallpaper.

[0093] In some embodiments, when the wallpaper rendering method is custom rendering... Figure 2 When the rendering module 204 adopts a custom rendering method, it obtains the wallpaper resources sent by the client and the fourth Lua rendering script, and uses the fourth Lua rendering script to render the wallpaper resources in order to generate a custom wallpaper.

[0094] In some embodiments, Figure 2 The rendering module 204 selects an image from the predefined image library as a local wallpaper resource, copies the local wallpaper resource to the private file directory of the image library, and calls the interface provided by the wallpaper manager to send a request to the wallpaper rendering service module. The wallpaper rendering service module uses the rendering script configured in the predefined wallpaper rendering method to render the local wallpaper resource.

[0095] In some embodiments, Figure 2 The rendering module 204 utilizes a predetermined setting application to obtain wallpaper resources from the resource service module through a data sharing mechanism provided by the resource service module, loads and displays the obtained wallpaper resources, and controls wallpaper switching by calling the interface provided by the wallpaper manager.

[0096] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0097] Figure 3 This is a schematic diagram of the structure of the electronic device 3 provided in an embodiment of this application. Figure 3 As shown, the electronic device 3 of this embodiment includes a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program 303, it implements the steps in the various method embodiments described above. Alternatively, when the processor 301 executes the computer program 303, it implements the functions of each module / unit in the various device embodiments described above.

[0098] For example, computer program 303 may be divided into one or more modules / units, which are stored in memory 302 and executed by processor 301 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 303 in electronic device 3.

[0099] Electronic device 3 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 3 may include, but is not limited to, processor 301 and memory 302. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device may also include input / output devices, network access devices, buses, etc.

[0100] Processor 301 can be a Central Processing Unit (CPU), or other general-purpose processors, 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, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0101] The memory 302 can be an internal storage unit of the electronic device 3, such as a hard disk or RAM. The memory 302 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 302 can include both internal and external storage units of the electronic device 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device. The memory 302 can also be used to temporarily store data that has been output or will be output.

[0102] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0103] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0104] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0105] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

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

[0107] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0108] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0109] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A wallpaper rendering method, characterized in that, include: The service module uses predetermined resources to send wallpaper download requests to the cloud, receives wallpaper information returned by the cloud, and verifies the completeness and legality of the wallpaper information. In response to the client's operation of switching desktop wallpaper, the interface provided by the wallpaper manager is called to send the wallpaper scheme containing wallpaper information to the wallpaper rendering service module. The wallpaper scheme includes wallpaper type and wallpaper resource locator. Based on the mapping relationship between the wallpaper type and the predetermined wallpaper rendering method, the wallpaper rendering method corresponding to the wallpaper scheme is determined; Using the wallpaper resource locator, wallpaper resources are obtained from the resource service module, and the wallpaper resources are rendered using the rendering script configured in the wallpaper rendering method; Wherein, when the wallpaper rendering method is single static wallpaper rendering, multiple static wallpaper carousel rendering, or video wallpaper rendering, the step of rendering the wallpaper resource using the rendering script configured in the wallpaper rendering method includes: When using the single static wallpaper rendering method, the image of the single static wallpaper is rendered using a pre-configured first Lua rendering script in order to generate a static wallpaper; When using the method of rendering multiple static wallpapers in a carousel, a pre-configured second Lua rendering script is used to display the images of multiple static wallpapers in a carousel to generate carousel wallpapers; When the video wallpaper rendering method is used, a pre-configured third Lua rendering script is used to play the video corresponding to the wallpaper resource in order to generate a video wallpaper; The method further includes: selecting an image from a predetermined image library as a local wallpaper resource, copying the local wallpaper resource to a private file directory of the image library, and calling the interface provided by the wallpaper manager to send a request to the wallpaper rendering service module, wherein the wallpaper rendering service module renders the local wallpaper resource using a rendering script configured in a predetermined wallpaper rendering method.

2. The method according to claim 1, characterized in that, After verifying the integrity and legality of the wallpaper information, the method further includes: Once the integrity and legality of the wallpaper information are verified, the wallpaper information returned from the cloud is stored in the internal directory of the resource service module, and the wallpaper information obtained from the cloud is displayed on the user interface.

3. The method according to claim 2, characterized in that, The method further includes: The resource service module provides file services to the wallpaper rendering service module and the wallpaper control module, so that the wallpaper rendering service module and the wallpaper control module can obtain wallpaper resources from the resource service module through the file service.

4. The method according to claim 1, characterized in that, When the wallpaper rendering method is custom rendering, rendering the wallpaper resource using the rendering script configured in the wallpaper rendering method includes: When the custom rendering method is used, the wallpaper resource and the fourth Lua rendering script sent by the client are obtained, and the wallpaper resource is rendered using the fourth Lua rendering script to generate a custom wallpaper.

5. The method according to claim 1, characterized in that, The method further includes: The application uses a predetermined settings mechanism to obtain the wallpaper resource from the resource service module through the data sharing mechanism provided by the resource service module, loads and displays the obtained wallpaper resource, and controls the wallpaper switching by calling the interface provided by the wallpaper manager.

6. A wallpaper rendering apparatus for performing the method as described in any one of claims 1 to 5, characterized in that, include: The request module is configured to use predetermined resources to provide a service module that sends a wallpaper download request to the cloud, receive wallpaper information returned by the cloud, and verify the integrity and legality of the wallpaper information. The calling module is configured to call the interface provided by the wallpaper manager in response to the operation of triggering the client to switch the desktop wallpaper, and send the wallpaper scheme containing wallpaper information to the wallpaper rendering service module. The wallpaper scheme includes wallpaper type and wallpaper resource locator. The determination module is configured to determine the wallpaper rendering method corresponding to the wallpaper scheme based on the mapping relationship between the wallpaper type and the predetermined wallpaper rendering method; The rendering module is configured to obtain wallpaper resources from the resource service module using the wallpaper resource locator, and to render the wallpaper resources using the rendering script configured in the wallpaper rendering method.

7. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Video wallpaper processing method and device, equipment and medium

    CN115278338A