Wallpaper preview method and device, electronic equipment and storage medium

By obtaining and layering the position and appearance information of the resident interface elements on the current desktop, a wallpaper preview picture that is consistent with the actual application effect is generated, which solves the problem of inconsistent preview effects after users customize the desktop layout, and improves the accuracy of users' selection of wallpapers.

CN120276643APending Publication Date: 2025-07-08GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510359866.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

After the existing wallpaper preview method, after the user customizes the desktop layout, the wallpaper preview effect is inconsistent with the actual application effect, affecting user selection.

Method used

By obtaining the location and appearance information of each resident interface element on the current desktop, based on this information, a wallpaper preview image combined with the target wallpaper selected by the user is generated, including layered rendering technology to ensure that the preview effect is consistent with the actual application effect.

Benefits of technology

Provide a preview picture that is consistent with the effect after the actual application of wallpaper, helping users choose wallpaper more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276643A_ABST
    Figure CN120276643A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a wallpaper preview method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The wallpaper previewing method comprises the following steps: in response to a wallpaper previewing operation of a user, obtaining position and appearance information of each resident interface element on a current desktop; generating a wallpaper preview of the current desktop based on the position and appearance information of each resident interface element and a target wallpaper selected by the user; and displaying the wallpaper preview. Based on the wallpaper previewing method and device, the electronic equipment and the storage medium provided by the embodiment of the invention, the wallpaper preview which is consistent with the effect of the wallpaper after practical application can be provided for a user, so that the user can better select the wallpaper.
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 preview method, apparatus, electronic device, and storage medium. Background Art

[0002] In the wallpaper setting scenario of electronic devices such as in-vehicle devices or mobile phones, before the wallpaper is actually applied, a wallpaper preview function can be provided so that users can better select wallpapers. Currently, in the wallpaper preview function, usually pre-prepared wallpaper preview images are provided for users to view when selecting wallpapers, or a pre-set desktop layout framework is superimposed on the wallpaper to simulate the effect after the wallpaper is applied.

[0003] Both of the above two methods can only deal with the preset desktop. If the desktop is adjusted by the user's custom layout, the wallpaper preview effect is inconsistent with the effect after the wallpaper is actually applied, which affects the user's selection of wallpapers. Summary of the Invention

[0004] The purpose of the embodiments of this application is to provide a wallpaper preview method, apparatus, electronic device, and storage medium, which can provide a wallpaper preview image that is consistent with the effect after the wallpaper is actually applied for users, facilitating users to better select wallpapers.

[0005] In a first aspect, the embodiments of this application provide a wallpaper preview method, which includes: In response to the user's wallpaper preview operation, obtain the position and appearance information of each resident interface element on the current desktop; Based on the position and appearance information of each resident interface element and the target wallpaper selected by the user, generate a wallpaper preview image of the current desktop; Display the wallpaper preview image.

[0006] In a second aspect, the embodiments of this application provide a wallpaper preview apparatus, which includes: An information acquisition module, configured to obtain the position and appearance information of each resident interface element on the current desktop in response to the user's wallpaper preview operation; A wallpaper generation module, configured to generate a wallpaper preview image of the current desktop based on the position and appearance information of each resident interface element and the target wallpaper selected by the user; the wallpaper preview image includes images of each resident interface element; A display module, configured to display the wallpaper preview image.

[0007] In a third aspect, the embodiments of this application provide an electronic device, which includes: A memory, on which a computer program is stored; A processor, configured to execute the computer program to implement the processing in the above wallpaper preview method.

[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the processing in the above wallpaper preview method.

[0009] The above technical solution provided by the embodiment of the present application obtains the position and appearance information of each resident interface element on the current desktop in response to the user's wallpaper preview operation; generates a wallpaper preview image of the current desktop based on the position and appearance information of each resident interface element and the target wallpaper selected by the user; and displays the wallpaper preview image, which can provide the user with a wallpaper preview image consistent with the actual application effect of the wallpaper, facilitating the user to better select the wallpaper. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some of the embodiments described in one or more of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0011] Figure 1 It is a schematic flowchart of a wallpaper preview method provided by an embodiment of the present application; Figure 2 It is a schematic block diagram of a wallpaper preview device provided by an embodiment of the present application; Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0012] In order to enable those skilled in the art to better understand the technical solutions in one or more of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of one or more of the present application, rather than all the embodiments. Based on the embodiments in one or more of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0013] It should be noted that, without conflict, the embodiments and features in one or more of the present application can be combined with each other. The embodiments of the present application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0014] The wallpaper preview method and device provided by the embodiments of the present application can be applied to an electronic device, which can be a vehicle-mounted terminal device or a mobile terminal device such as a mobile phone or a tablet computer, and is not specifically limited.

[0015] The application scenarios of the above method and device include but are not limited to: wallpaper preview scenarios. Through the above method and device, even if the user makes a custom adjustment to the desktop layout, the wallpaper preview effect can be basically the same as the effect after the wallpaper is actually applied, providing a more accurate wallpaper setting reference for the user and facilitating the user to better select the wallpaper.

[0016] As Figure 1 shown, the embodiments of the present application provide a wallpaper preview method, which may include the following processes: S102, in response to the user's wallpaper preview operation, obtain the position and appearance information of each permanent interface element on the current desktop.

[0017] Among them, the wallpaper preview operation may vary according to different application scenarios. In one application scenario, the user's wallpaper preview operation may be the operation of the user clicking the wallpaper preview button.

[0018] The current desktop is the desktop currently being used by the electronic device. A permanent interface element, also known as a persistent interface element, is an interface element on the desktop that remains stable during the user's operation and does not change or disappear frequently. Permanent interface elements are usually interface elements on the desktop other than temporary interface elements. Temporary interface elements are, for example, a video playback small window, a call-in-progress indicator, etc. The permanent interface elements on the current desktop are interface elements on the current desktop other than temporary interface elements such as a video playback small window and a call-in-progress indicator, including but not limited to: application program icons, widgets, folders, search bars, Dock bars, status bars, etc. on the current desktop.

[0019] In one implementation, before obtaining the position and appearance information of each permanent interface element on the current desktop, the wallpaper preview method of the embodiments of the present application further includes the following processes: Obtain the Z-order level information of each interface element on the current desktop; Determine the interface elements with a Z-order level less than or equal to the level threshold on the current desktop as permanent interface elements.

[0020] Among them, the Z-order level is the stacking order of interface elements in the Z-axis direction perpendicular to the screen, which determines which elements are displayed in the front and which elements are blocked. Permanent interface elements are usually displayed in the lower layer of the desktop and usually have a lower Z-order level. By comparing the Z-order level of each interface element with the level threshold, the permanent interface elements can be quickly determined.

[0021] In implementation, the Z-order level information of each interface element on the current desktop can be obtained in real time through the system-level window manager in response to the user's wallpaper preview operation.

[0022] Among them, the system-level window manager is a component in the operating system of the electronic device, which is used to manage the Z-order information of each interface element on the desktop. Through this manager, the Z-order information of each interface element can be obtained.

[0023] The position and appearance information is used to describe the position and appearance of the interface element, and it is a kind of attribute information of the interface element. The position and appearance information of each resident interface element includes but is not limited to: the position information of each resident interface element, such as the x coordinate, y coordinate, etc.; the size information, such as the width, height, etc.; the content information, such as the icon picture, text content, etc.; the style information, such as the background color, transparency, font, shadow, etc.

[0024] The position and appearance information of each resident interface element on the current desktop can be obtained in real time in response to the user's wallpaper preview operation.

[0025] In one implementation, obtaining the position and appearance information of each resident interface element on the current desktop may specifically include the following processing: Obtain a screenshot of the current desktop, and input the desktop screenshot into the element information extraction model to obtain the position and appearance information of each resident interface element on the main interface of the current desktop.

[0026] Call the user interface automation SDK to obtain the position and appearance information of each resident interface element in the status bar and Dock bar of the current desktop.

[0027] Among them, the status bar is usually located at the top of the desktop. The resident interface elements in the status bar usually include: time, battery status, signal strength, etc. The position and appearance information of each resident interface element in the status bar may include: the position, shape, size, icon, text, style, etc. information of each resident interface element such as time, battery status, signal strength in the status bar.

[0028] The Dock bar, also known as the quick access bar or application dock, is usually located at the bottom of the desktop. The resident interface elements in the Dock bar usually include: call, message, settings, etc. The position and appearance information of each resident interface element in the Dock bar may include: the position, shape, size, icon, text, style, etc. information of each resident interface element such as call, message, settings in the Dock bar.

[0029] The main interface is usually located between the status bar and the Dock bar. The permanent interface elements on the main interface usually include: application icons, widgets, folders, etc. The position and appearance information of each permanent interface element on the main interface can include: the position, shape, size, icon, text, style, etc. of each permanent interface element such as application icons, widgets, folders, etc. on the main interface.

[0030] The element information extraction model is a computer vision model used to detect and identify each permanent interface element on the main interface from a desktop screenshot, extract the position and appearance information of each permanent interface element and output it. After inputting the desktop screenshot of the current desktop into the element information extraction model, the element information extraction model can identify each permanent interface element on the main interface of the current desktop from the desktop screenshot of the current desktop, extract the position and appearance information of each permanent interface element on the main interface of the current desktop and output it.

[0031] In implementation, the element information extraction model can be implemented based on an existing interface understanding model, or can be obtained by training an artificial intelligence model such as a multi-modal model based on a permanent interface element recognition data set.

[0032] Among them, the permanent interface element recognition data set can include desktop screenshot samples and the corresponding position and appearance information samples of each permanent interface element on the main interface. Based on this data set, an artificial intelligence model such as a multi-modal model can be supervised trained to obtain the element information extraction model. The multi-modal model can be a model that uses computer vision and natural language processing technologies and is capable of image processing and text processing.

[0033] The user interface automation SDK is a set of tools and interfaces for accessing and operating user interface (UI) elements, which is usually provided by the operating system. By calling the user interface automation SDK, it is possible to obtain the position and appearance information of each permanent interface element in the status bar and the Dock of the current desktop.

[0034] The main interface usually includes non-standard permanent interface elements, such as custom widgets, custom folders, custom controls, etc. By obtaining the desktop screenshot of the current desktop and inputting the desktop screenshot into the element information extraction model to obtain the position and appearance information of each permanent interface element on the main interface, it is possible to obtain the position and appearance information of non-standard permanent interface elements on the main interface in a computer vision manner, adapting to the user's custom settings and layouts of permanent interface elements. The status bar and the Dock bar, etc. are usually standard system components. By calling the user interface automation SDK, it is possible to quickly obtain the position and appearance information of each permanent interface element in standard system components such as the status bar and the Dock bar.

[0035] In the embodiment of the present application, in response to the user's wallpaper preview operation, a desktop screenshot of the current desktop is obtained, and the desktop screenshot is input into the element information extraction model to obtain the position and appearance information of each resident interface element on the main interface of the current desktop. The user interface automation SDK is called to obtain the position and appearance information of each resident interface element in the status bar and Dock bar on the current desktop. It is possible to combine two methods of obtaining interface element information, namely computer vision and SDK, to obtain the position and appearance information of resident interface elements in different areas such as the main interface, status bar, and Dock bar of the current desktop in real time, while adapting to changes in the user-defined layout and improving the speed of obtaining position and appearance information.

[0036] To further improve the speed of obtaining position and appearance information, in another implementation, obtaining the position and appearance information of each resident interface element on the current desktop may specifically include the following processing: Obtain the position and appearance information of each resident interface element on the stored main interface from the specified position, and determine the position and appearance information of each resident interface element on the stored main interface as the position and appearance information of each resident interface element on the main interface of the current desktop; Call the user interface automation SDK to obtain the position and appearance information of each resident interface element in the status bar and Dock of the current desktop.

[0037] Among them, the position and appearance information of each resident interface element on the main interface stored at the specified position is updated each time a change occurs to the resident interface element on the main interface. That is to say, the specified position stores the position and appearance information of the latest resident interface element on the main interface, which is incrementally updated each time a change occurs to the resident interface element on the main interface. When the user performs a wallpaper preview operation, the position and appearance information of each resident interface element on the main interface stored at the specified position is the position and appearance information of each resident interface element on the main interface of the current desktop.

[0038] When the user performs a wallpaper preview operation, in response to the user's wallpaper preview operation, the position and appearance information of each resident interface element on the stored main interface is obtained from the specified position in real time, and this information is directly determined as the position and appearance information of each resident interface element on the main interface of the current desktop, which can further improve the speed of obtaining position and appearance information.

[0039] In implementation, the position and appearance information of each latest resident interface element on the main interface can be stored in advance at the specified position.

[0040] In one implementation, before step S102, the wallpaper preview method provided by the embodiment of the present application may further include the following processing: When a change occurs to a resident interface element on the main interface, obtain a screenshot of the changed desktop; Input the desktop screenshot into the element information extraction model to obtain the position and appearance information of each persistent interface element on the main interface after the change; Store the position and appearance information of each persistent interface element on the main interface after the change at a specified location.

[0041] Among them, the changes of the persistent interface elements on the main interface include, but are not limited to: the appearance of the persistent interface elements on the main interface has changed, and the position of the persistent interface elements on the main interface has changed.

[0042] The change of the persistent interface elements on the main interface is usually caused by the user's custom configuration of the persistent interface elements on the main interface.

[0043] By obtaining the changed desktop screenshot when the persistent interface elements change, inputting the desktop screenshot into the element information extraction model to obtain the position and appearance information of each persistent interface element in the main interface after the change, and storing the position and appearance information of each persistent interface element in the main interface after the change at a specified location, it is possible to incrementally update the position and appearance information of each persistent interface element on the main interface stored at the specified location in a computer vision manner each time the persistent interface elements on the main interface change, adapting to the user's custom configuration of the persistent interface elements on the main interface.

[0044] S104, Generate a wallpaper preview image of the current desktop based on the position and appearance information of each persistent interface element and the target wallpaper selected by the user.

[0045] Among them, the wallpaper preview image of the current desktop is a wallpaper preview image that displays the images of each persistent interface element on the current desktop, and the position and appearance of the image of each persistent interface element in this wallpaper preview image are the same as the position and appearance of each persistent interface element in the current desktop. That is to say, the wallpaper preview image of the current desktop is the same as the display effect after the target wallpaper is actually applied to the current desktop. When the persistent interface elements on the current desktop change, the wallpaper preview image of the current desktop also changes.

[0046] Moreover, temporary interface elements such as temporary call indicators and video playback small windows do not exist in the normal usage state after the wallpaper is actually applied. Generating a wallpaper preview image of the current desktop based on the position and appearance information of each persistent interface element and the target wallpaper selected by the user, and the generated wallpaper preview image only contains the images of each persistent interface element on the current desktop, without the images of the temporary interface elements on the current desktop, can also make the wallpaper preview image more consistent with the normal usage state after the wallpaper is applied, avoiding the influence of temporary call indicators, video playback small windows, etc. on the wallpaper preview effect.

[0047] In one implementation, based on the position and appearance information of each persistent interface element and the target wallpaper selected by the user, the target wallpaper, the persistent interface elements on the main interface, and the persistent interface elements in the status bar and Dock bar can be rendered in layers to generate a wallpaper preview image of the current desktop. Generating a wallpaper preview image of the current desktop based on the position and appearance information of each persistent interface element and the target wallpaper selected by the user may specifically include the following processes: Based on the target wallpaper, render the image of the target wallpaper on the layer corresponding to the target wallpaper to generate a wallpaper layer.

[0048] Based on the position and appearance information of each persistent interface element on the main interface of the current desktop, render the image of each persistent interface element on the main interface on the layer corresponding to the main interface to generate a main interface layer.

[0049] Based on the position and appearance information of each persistent interface element in the status bar and Dock bar of the current desktop, render the image of each persistent interface element in the status bar and Dock bar on the layer corresponding to the status bar and Dock bar to generate a status and Dock layer.

[0050] Overlay the wallpaper layer, the main interface layer, and the status and Dock layer in the order from top to bottom to generate a wallpaper preview image.

[0051] Among them, based on the position information of the persistent interface element, the rendering position of the persistent interface element can be determined, and based on the appearance information of the persistent interface element, the image of the persistent interface element can be rendered at the rendering position of the persistent interface element.

[0052] By separately rendering the corresponding persistent interface element images on the layer corresponding to the target wallpaper, the layer corresponding to the main interface, and the layer corresponding to the status bar and Dock bar based on the target wallpaper, the position and appearance information of each persistent interface element on the main interface of the current interface, and the position and appearance information of each persistent interface element in the status bar and Dock bar of the current interface respectively, it is possible to allow each layer to be independently rendered and improve the generation speed of the wallpaper preview image.

[0053] Moreover, when overlaid in the order from bottom to top, the upper layer will block the lower layer. After layered rendering, overlaying the wallpaper layer, the main interface layer, and the status and Dock layer in the order from bottom to top can make the occlusion relationship of the wallpaper layer, the main interface layer, and the status and Dock layer consistent with the occlusion relationship of the wallpaper, the main interface, the status bar, and the Dock bar after the target wallpaper is actually applied, providing an accurate wallpaper preview effect for the user.

[0054] Due to hierarchical rendering, the rendering of each layer is independent. In implementation, based on the target wallpaper selected by the user, the image of the target wallpaper is rendered on the layer corresponding to the target wallpaper to generate a wallpaper layer; and, the positions and appearance information of each persistent interface element on the main interface of the current desktop are obtained, and based on the positions and appearance information of each persistent interface element on the main interface of the current desktop, the images of each persistent interface element on the main interface are rendered on the layer corresponding to the main interface to generate a main interface layer; and, the positions and appearance information of each persistent interface element in the status bar and Dock bar of the current desktop are obtained, and based on the positions and appearance information of each persistent interface element in the status bar and Dock bar of the current desktop, the images of each persistent interface element in the status bar and Dock bar are rendered on the layer corresponding to the status bar and Dock bar to generate a status and Dock layer. These three processes can be executed concurrently.

[0055] For example, while rendering the image of the target wallpaper selected by the user on the layer corresponding to the target wallpaper, the positions and appearance information of each persistent interface element on the main interface of the current desktop can be obtained from a specified location; while rendering the images of each persistent interface element on the main interface on the layer corresponding to the main interface based on the positions and appearance information of each persistent interface element on the main interface of the current desktop, the user interface automation SDK can be called to obtain the positions and appearance information of each persistent interface element in the status bar and Dock of the current desktop.

[0056] Of course, the method for generating the wallpaper preview image of the current desktop is not limited to the above hierarchical rendering method. For example, in other embodiments, the target wallpaper selected by the user can also be used as the base map, and based on the position information of each persistent interface element on the current desktop, the rendering position of each persistent interface element on the base map is determined, and based on the appearance information of each persistent interface element on the current desktop, the images of each persistent interface element are rendered at the rendering positions of each persistent interface element, thereby generating the wallpaper preview image of the current desktop.

[0057] S106, display the wallpaper preview image.

[0058] Among them, the display method of the wallpaper preview image can vary according to different application scenarios. In one application scenario, a thumbnail of the wallpaper preview image can be displayed in a wallpaper preview frame.

[0059] The wallpaper preview method provided by the embodiments of the present application, by responding to the user's wallpaper preview operation, obtains the positions and appearance information of each persistent interface element on the current desktop, generates the wallpaper preview image of the current desktop based on the positions and appearance information of each persistent interface element and the target wallpaper selected by the user, and displays the wallpaper preview image, can provide the user with a wallpaper preview image that is consistent with the actual application effect of the wallpaper, provide the user with an accurate reference for wallpaper settings, and facilitate the user to better select the wallpaper.

[0060] In the above embodiments, the target wallpaper selected by the user can be a static wallpaper or a dynamic wallpaper.

[0061] In some embodiments, when the target wallpaper selected by the user is a dynamic wallpaper, in order to make the wallpaper preview image of the dynamic wallpaper consistent with the actual application effect of the wallpaper, in the above-mentioned wallpaper layer processing of rendering the image of the target wallpaper on the layer corresponding to the target wallpaper, the generated wallpaper layer can be multiple layers, including but not limited to: a wallpaper background layer and a wallpaper animation layer. Before displaying the wallpaper preview image, the wallpaper preview method provided by the embodiments of the present application may further include: adding an interaction layer to the wallpaper preview image, and adding dynamic interaction events corresponding to the animation in the wallpaper animation layer on the interaction layer. After displaying the wallpaper preview image, the wallpaper preview method provided by the embodiments of the present application may further include: after detecting a dynamic interaction event corresponding to the animation in the wallpaper animation layer, making the wallpaper animation layer display the animation corresponding to the dynamic interaction event.

[0062] Among them, the wallpaper background layer is used to display the static background of the wallpaper, and the wallpaper animation layer is used to display the wallpaper animation. In implementation, the background of the dynamic wallpaper can be rendered to the wallpaper background layer, and the animation of the dynamic wallpaper can be rendered to the wallpaper animation layer. The interaction layer is used to interact with the user. Before displaying the wallpaper preview image, an interaction layer can be added to the top of the wallpaper preview image, and dynamic interaction events corresponding to the animation in the wallpaper animation layer are added to the interaction layer. After displaying the wallpaper preview image, the dynamic interaction events of the interaction layer can be monitored. After detecting a dynamic interaction event corresponding to the animation in the wallpaper animation layer, the wallpaper animation layer can be made to display the animation corresponding to the dynamic interaction event, so as to display the dynamic wallpaper preview effect for the user.

[0063] Due to the layered rendering, the main interface layer and the status and Dock layer are above the wallpaper layer. When a dynamic interaction event is detected, making the wallpaper animation layer display the corresponding animation can enable the user to accurately perceive the occlusion effect of the currently resident interface elements on the dynamically changing wallpaper when the wallpaper changes dynamically, and provide an accurate wallpaper setting reference for the user.

[0064] For example, the target wallpaper can be a dynamic wallpaper with a rabbit image on the grass. The dynamic interaction event can be a click event on the rabbit image. The corresponding animation for the dynamic interaction event can be that when the user clicks on the screen, the rabbit image moves. The grass image in the target wallpaper can be rendered to the background layer, the rabbit image in the target wallpaper can be rendered to the animation layer, and a click event can be added at the corresponding position of the rabbit image in the interaction layer to generate a wallpaper preview image. After the wallpaper preview image is displayed, it is possible to monitor the user's click on the corresponding position of the rabbit image. If it is detected that the user clicks on the position of the rabbit image, the rabbit image on the wallpaper animation layer can be made to move. When the user observes the movement of the rabbit image, they can check whether it will be blocked by the images of the permanent interface elements on the desktop, and thus choose whether to apply the target wallpaper.

[0065] The above is the wallpaper preview method provided by the embodiments of the present application. Based on the same technical concept, the embodiments of the present application also provide a wallpaper preview device, as Figure 2 shown. The device includes: an information acquisition module 202, a wallpaper generation module 204, and a display module 206.

[0066] The information acquisition module 202 is configured to, in response to the user's wallpaper preview operation, acquire the position and appearance information of each permanent interface element on the current desktop; The wallpaper generation module 204 is configured to generate a wallpaper preview image of the current desktop based on the position and appearance information of each permanent interface element and the target wallpaper selected by the user; the wallpaper preview image includes the images of each permanent interface element; The display module 206 is configured to display the wallpaper preview image.

[0067] In one implementation, the device further includes: a permanent element determination module, configured to: acquire the Z-order level information of each interface element on the current desktop; determine the interface elements on the current desktop whose Z-order level is less than or equal to the level threshold as permanent interface elements.

[0068] In one implementation, the information acquisition module 202 includes: The main interface information acquisition unit is configured to acquire a screenshot of the current desktop, input the screenshot into the element information extraction model, and obtain the position and appearance information of each permanent interface element on the main interface of the current desktop; The status and Dock information acquisition unit is configured to call the user interface automation SDK to acquire the position and appearance information of each permanent interface element in the status bar and Dock of the current desktop.

[0069] In one implementation, the information acquisition module 202 includes: The main interface information acquisition unit is used to obtain the position and appearance information of each persistent interface element on the stored main interface from a specified location, and determine the position and appearance information of each persistent interface element on the main interface of the current desktop as the position and appearance information of each persistent interface element on the main interface stored at the specified location; wherein, the position and appearance information of each persistent interface element on the main interface stored at the specified location is updated each time a change occurs to the persistent interface elements on the main interface. The status and Dock information acquisition unit is used to call the user interface automation SDK to obtain the position and appearance information of each persistent interface element in the status bar and Dock of the current desktop.

[0070] In one implementation, the device includes: a main interface information storage unit, which is used for: When a change occurs to the persistent interface elements on the main interface, obtain a screenshot of the changed desktop; Input the desktop screenshot into the element information extraction model to obtain the position and appearance information of each persistent interface element on the changed main interface; Store the position and appearance information of each persistent interface element on the changed main interface to the specified location.

[0071] In one implementation, the wallpaper generation module 204 includes: The wallpaper layer generation unit is used to render the image of the target wallpaper on the layer corresponding to the target wallpaper based on the target wallpaper to generate a wallpaper layer; The main interface layer generation unit is used to render the image of each persistent interface element on the main interface on the layer corresponding to the main interface based on the position and appearance information of each persistent interface element on the main interface of the current desktop to generate a main interface layer; The status and Dock layer generation unit is used to render the image of each persistent interface element in the status bar and Dock bar on the layer corresponding to the status bar and Dock bar based on the position and appearance information of each persistent interface element in the status bar and Dock bar of the current desktop to generate a status and Dock layer; The composition unit is used to stack the wallpaper layer, the main interface layer, and the status and Dock layer in order from bottom to top to generate a wallpaper preview image.

[0072] In one implementation, when the target wallpaper is a dynamic wallpaper, the wallpaper layer includes: a wallpaper background layer and a wallpaper animation layer; the device further includes: The interaction processing module is used to add an interaction layer to the wallpaper preview image and add dynamic interaction events corresponding to the animations in the wallpaper animation layer to the interaction layer; The dynamic display module is used to, after detecting a dynamic interaction event, cause the wallpaper animation layer to display the animation corresponding to the dynamic interaction event.

[0073] The above device provided in this embodiment can perform the processing in the methods provided in the above embodiments. For the detailed process, please refer to the description in the method embodiments and will not be elaborated here.

[0074] The above device provided in this embodiment, by responding to the user's wallpaper preview operation, obtains the position and appearance information of each resident interface element on the current desktop; based on the position and appearance information of each resident interface element and the target wallpaper selected by the user, generates a wallpaper preview image of the current desktop; and displays the wallpaper preview image, which can provide the user with a wallpaper preview image consistent with the actual application effect of the wallpaper, provide an accurate reference for the user to set the wallpaper, and facilitate the user to better select the wallpaper.

[0075] Corresponding to the methods provided in the above embodiments, based on the same technical concept, an embodiment of the present application also provides an electronic device for executing the methods provided in the above embodiments, as Figure 3 shown.

[0076] The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 301 and a memory 302. A computer program is stored on the memory 302. The processor 301 is used to execute the computer program to implement the following processing: Responding to the user's wallpaper preview operation, obtaining the position and appearance information of each resident interface element on the current desktop; Based on the position and appearance information of each resident interface element and the target wallpaper selected by the user, generating a wallpaper preview image of the current desktop; Displaying the wallpaper preview image.

[0077] In one implementation, the processor 301 is used to execute the computer program to implement the following processing: Obtaining the Z-order level information of each interface element on the current desktop; Determining the interface elements on the current desktop with a Z-order level less than or equal to the level threshold as resident interface elements.

[0078] In one implementation, the processor 301 is used to execute the computer program to implement the following processing: Obtaining a desktop screenshot of the current desktop, inputting the desktop screenshot into an element information extraction model, and obtaining the position and appearance information of each resident interface element on the main interface of the current desktop; Invoking the user interface automation SDK to obtain the position and appearance information of each resident interface element in the status bar and Dock of the current desktop.

[0079] In one implementation, the processor 301 is used to execute the computer program to implement the following processing: Obtain the position and appearance information of each persistent interface element on the stored main interface from the specified location, and determine the position and appearance information of each persistent interface element on the stored main interface as the position and appearance information of each persistent interface element on the main interface of the current desktop; wherein, the position and appearance information of each persistent interface element on the main interface stored at the specified location is updated each time a change occurs to the persistent interface elements on the main interface. Invoke the user interface automation SDK to obtain the position and appearance information of each persistent interface element in the status bar and Dock of the current desktop.

[0080] In one implementation, the processor 301 is used to execute a computer program to implement the following processing: When a change occurs to the persistent interface elements on the main interface, obtain a screenshot of the changed desktop. Input the desktop screenshot into the element information extraction model to obtain the position and appearance information of each persistent interface element on the changed main interface. Store the position and appearance information of each persistent interface element on the changed main interface at the specified location.

[0081] In one implementation, the processor 301 is used to execute a computer program to implement the following processing: Based on the target wallpaper, render the image of the target wallpaper on the layer corresponding to the target wallpaper to generate a wallpaper layer. Based on the position and appearance information of each persistent interface element on the main interface of the current desktop, render the image of each persistent interface element on the main interface on the layer corresponding to the main interface to generate a main interface layer. Based on the position and appearance information of each persistent interface element in the status bar and Dock bar of the current desktop, render the image of each persistent interface element in the status bar and Dock bar on the layer corresponding to the status bar and Dock bar to generate a status and Dock layer. Stack the wallpaper layer, the main interface layer, and the status and Dock layer in ascending order from bottom to top to generate a wallpaper preview image.

[0082] In one implementation, when the target wallpaper is a dynamic wallpaper, the wallpaper layer includes: a wallpaper background layer and a wallpaper animation layer; the processor 301 is used to execute a computer program to implement the following processing: Add an interaction layer to the wallpaper preview image, and add dynamic interaction events corresponding to the animations in the wallpaper animation layer to the interaction layer. After detecting a dynamic interaction event, cause the wallpaper animation layer to display the animation corresponding to the dynamic interaction event.

[0083] The above-mentioned electronic device provided by the embodiment of the present application obtains the position and appearance information of each resident interface element on the current desktop in response to the user's wallpaper preview operation; generates a wallpaper preview image of the current desktop based on the position and appearance information of each resident interface element and the target wallpaper selected by the user; and displays the wallpaper preview image, which can provide the user with a wallpaper preview image consistent with the actual application effect of the wallpaper, provide an accurate wallpaper setting reference for the user, and facilitate the user to better select the wallpaper.

[0084] It should be noted that the embodiment of the electronic device in the present application and the method embodiment in the present application are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the corresponding method described above, and the repeated parts will not be elaborated.

[0085] Corresponding to the method provided in the above embodiment, based on the same technical concept, the embodiment of the present application also provides a readable storage medium for storing a computer program. The storage medium can be a USB flash drive, an optical disc, a hard disk, etc. When the computer program stored in the storage medium is executed by a processor, the following processes can be implemented: In response to the user's wallpaper preview operation, obtain the position and appearance information of each resident interface element on the current desktop; Generate a wallpaper preview image of the current desktop based on the position and appearance information of each resident interface element and the target wallpaper selected by the user; Display the wallpaper preview image.

[0086] In one implementation, when the computer program stored in the storage medium is executed by a processor, the following processes can be implemented: Obtain the Z-order level information of each interface element on the current desktop; Determine the interface elements on the current desktop whose Z-order level is less than or equal to the level threshold as resident interface elements.

[0087] In one implementation, when the computer program stored in the storage medium is executed by a processor, the following processes can be implemented: Obtain a desktop screenshot of the current desktop, input the desktop screenshot into an element information extraction model, and obtain the position and appearance information of each resident interface element on the main interface of the current desktop; Call the user interface automation SDK to obtain the position and appearance information of each resident interface element in the status bar and Dock of the current desktop.

[0088] In one implementation, when the computer program stored in the storage medium is executed by a processor, the following processes can be implemented: Obtain the position and appearance information of each persistent interface element on the stored main interface from the specified location, and determine the position and appearance information of each persistent interface element on the stored main interface as the position and appearance information of each persistent interface element on the main interface of the current desktop; wherein, the position and appearance information of each persistent interface element on the main interface stored at the specified location is updated each time a change occurs to the persistent interface elements on the main interface. Invoke the user interface automation SDK to obtain the position and appearance information of each persistent interface element in the status bar and Dock of the current desktop.

[0089] In one implementation, the computer program stored in the storage medium, when executed by a processor, can implement the following process: When a change occurs to the persistent interface elements on the main interface, obtain a screenshot of the changed desktop. Input the desktop screenshot into the element information extraction model to obtain the position and appearance information of each persistent interface element on the changed main interface. Store the position and appearance information of each persistent interface element on the changed main interface at the specified location.

[0090] In one implementation, the computer program stored in the storage medium, when executed by a processor, can implement the following process: Based on the target wallpaper, render the image of the target wallpaper on the layer corresponding to the target wallpaper to generate a wallpaper layer. Based on the position and appearance information of each persistent interface element on the main interface of the current desktop, render the image of each persistent interface element on the main interface on the layer corresponding to the main interface to generate a main interface layer. Based on the position and appearance information of each persistent interface element in the status bar and Dock bar of the current desktop, render the image of each persistent interface element in the status bar and Dock bar on the layer corresponding to the status bar and Dock bar to generate a status and Dock layer. Stack the wallpaper layer, the main interface layer, and the status and Dock layer in ascending order from bottom to top to generate a wallpaper preview image.

[0091] In one implementation, when the target wallpaper is a dynamic wallpaper, the wallpaper layer includes: a wallpaper background layer and a wallpaper animation layer; the computer program stored in the storage medium, when executed by a processor, can implement the following process: Add an interaction layer to the wallpaper preview image, and add dynamic interaction events corresponding to the animations in the wallpaper animation layer on the interaction layer. After detecting a dynamic interaction event, cause the wallpaper animation layer to display the animation corresponding to the dynamic interaction event.

[0092] When the computer-executable instructions stored in the storage medium in the embodiments of the present application are executed by a processor, by responding to a user's wallpaper preview operation, the positions and appearance information of each resident interface element on the current desktop are obtained; based on the positions and appearance information of each resident interface element and the target wallpaper selected by the user, a wallpaper preview image of the current desktop is generated and the wallpaper preview image is displayed, which can provide the user with a wallpaper preview image consistent with the actual application effect of the wallpaper, provide the user with an accurate reference for wallpaper setting, and facilitate the user to better select the wallpaper.

[0093] It should be noted that the embodiments of the storage medium in the present application and the method embodiments in the present application are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the foregoing method, and the repeated parts will not be described again.

[0094] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain implementations, multitasking and parallel processing are also possible or may be advantageous.

[0095] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the embodiments of the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0096] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0097] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0098] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory. The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media. Computer-readable media includes both permanent and non-permanent, removable and non-removable media and can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media for storing information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0099] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.

[0100] Embodiments of the present application may be described in the general context of computer-executable instructions executable by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present application may also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media including storage devices. Each embodiment in the present application is described in a progressive manner, and the same or similar parts among the embodiments may be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts may be referred to the description of the method embodiments.

[0101] The above are only embodiments of this document and are not used to limit this document. For those skilled in the art, various changes and modifications can be made to this document. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document shall be included within the scope of the claims of this document.

Claims

1. A wallpaper preview method, characterized in that, The method includes: In response to a user's wallpaper preview operation, obtaining the position and appearance information of each persistent interface element on the current desktop; Based on the position and appearance information of each persistent interface element and the target wallpaper selected by the user, generating a wallpaper preview image of the current desktop; Displaying the wallpaper preview image.

2. The method according to claim 1, wherein Before obtaining the position and appearance information of each persistent interface element on the current desktop, the method further includes: Obtaining the Z-order layer information of each interface element on the current desktop; Determining the interface elements on the current desktop with a Z-order layer less than or equal to the layer threshold as persistent interface elements.

3. The method according to claim 1, characterized in that, The obtaining of the position and appearance information of each persistent interface element on the current desktop includes: Obtaining a desktop screenshot of the current desktop, inputting the desktop screenshot into an element information extraction model, and obtaining the position and appearance information of each persistent interface element on the main interface of the current desktop; Invoking the user interface automation SDK to obtain the position and appearance information of each persistent interface element in the status bar and Dock of the current desktop.

4. The method according to claim 1, characterized in that, The obtaining of the position and appearance information of each persistent interface element on the current desktop includes: Obtaining the position and appearance information of each persistent interface element on the stored main interface from a specified location, and determining the position and appearance information of each persistent interface element on the stored main interface as the position and appearance information of each persistent interface element on the main interface of the current desktop; wherein, the position and appearance information of each persistent interface element on the main interface stored at the specified location is updated each time a change occurs to the persistent interface elements on the main interface; Invoking the user interface automation SDK to obtain the position and appearance information of each persistent interface element in the status bar and Dock of the current desktop.

5. The method according to claim 4, wherein Before obtaining the position and appearance information of each persistent interface element on the stored main interface from a specified location, the method further includes: When a change occurs to the persistent interface elements on the main interface, obtaining a screenshot of the changed desktop; Inputting the desktop screenshot into an element information extraction model, and obtaining the position and appearance information of each persistent interface element on the changed main interface; Storing the position and appearance information of each persistent interface element on the changed main interface at the specified location.

6. The method according to any one of claims 1 to 5, characterized in that, The generating of the wallpaper preview image of the current desktop based on the position and appearance information of each persistent interface element and the target wallpaper selected by the user includes: Based on the target wallpaper, rendering the image of the target wallpaper on the layer corresponding to the target wallpaper to generate a wallpaper layer; Based on the position and appearance information of each persistent interface element on the main interface of the current desktop, rendering the image of each persistent interface element on the main interface on the layer corresponding to the main interface to generate a main interface layer; Based on the position and appearance information of each persistent interface element in the status bar and Dock bar of the current desktop, rendering the image of each persistent interface element in the status bar and Dock bar on the layer corresponding to the status bar and Dock bar to generate a status and Dock layer; Stacking the wallpaper layer, the main interface layer, and the status and Dock layer in ascending order from bottom to top to generate the wallpaper preview image.

7. The method according to claim 6, characterized in that, When the target wallpaper is a dynamic wallpaper, the wallpaper layer includes: a wallpaper background layer and a wallpaper animation layer; the method further includes: adding an interaction layer to the wallpaper preview image, and adding dynamic interaction events corresponding to the animations in the wallpaper animation layer to the interaction layer; After displaying the wallpaper preview image, the method further includes: after detecting the dynamic interaction event, causing the wallpaper animation layer to display the animation corresponding to the dynamic interaction event.

8. A wallpaper preview device, characterized in that, The device includes: An information acquisition module, configured to acquire the position and appearance information of each resident interface element on the current desktop in response to a user's wallpaper preview operation; A wallpaper generation module, configured to generate a wallpaper preview image of the current desktop based on the position and appearance information of each resident interface element and the target wallpaper selected by the user; the wallpaper preview image includes images of each resident interface element; A display module, configured to display the wallpaper preview image.

9. An electronic device, characterized in that, The device includes: A memory, on which a computer program is stored; A processor, configured to execute the computer program to implement the processing in the wallpaper preview method according to any one of claims 1 to 7.

10. A readable storage medium, characterized in that, On which a computer program is stored, and when the computer program is executed by the processor, the processor is caused to implement the processing in the wallpaper preview method according to any one of claims 1 to 7.