Method of setting application interface background and electronic device

By detecting and processing the desktop wallpaper registry in real time, the problem of the linked background effect disappearing after the application is maximized was solved, realizing continuous linkage between the application interface background and the desktop background, thus improving the user experience.

CN122308979APending Publication Date: 2026-06-30HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-12-30
Publication Date
2026-06-30

Smart Images

  • Figure CN122308979A_ABST
    Figure CN122308979A_ABST
Patent Text Reader

Abstract

The application provides a method for setting application interface background and an electronic device, the method comprising: continuously detecting a registry of a desktop wallpaper, so as to obtain a real-time desktop wallpaper mode and a real-time desktop wallpaper according to a key value of a real-time registry key when the desktop wallpaper or a related parameter changes, and performing a blur and transparent processing on the real-time desktop wallpaper to obtain a new target wallpaper, storing the target wallpaper into a specific cache unit, and then reading the new target wallpaper from the cache unit to set as an interface background of a foreground application with a linkage background effect. All steps of the scheme do not depend on the running of an application program and user operation, but are a general scheme for setting the interface background of all foreground applications, so the scheme is not affected by operations such as maximizing a window, and the scheme of the application can be used as long as the application program supports and opens the linkage background effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic device technology, and in particular to a method for setting an application interface background and an electronic device. Background Technology

[0002] To enhance the user's visual experience, a solution has emerged where the application's interface background is set based on the electronic device's desktop background (also known as the desktop wallpaper). This can be called a linked background effect. Typically, the desktop background is blurred and made transparent before being used as the application's background, resulting in a smoother visual transition between the application's background and the desktop background. In Windows operating systems, this linked background effect is often referred to as the Mica effect.

[0003] However, in real-world applications, some applications on the Windows operating system have a problem where the Mica effect disappears after the application window is maximized.

[0004] Therefore, how to provide a linked background effect that does not disappear when the application window is maximized is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] This application provides a method and an electronic device for setting the background of an application interface, wherein the linked background effect set by this method will not disappear due to the operation of maximizing the application window.

[0006] Firstly, a method for setting an application interface background is provided. This method includes: continuously detecting the registry of the desktop wallpaper of an electronic device, the registry including multiple registry keys indicating a real-time desktop wallpaper mode and a real-time desktop wallpaper; the desktop wallpaper mode of the electronic device including multiple modes such as image mode, focus mode, color mode, and slideshow mode; at a first moment, based on the detected change in the key value of any one or more of the multiple registry keys, the electronic device performs the following steps: obtaining a first desktop wallpaper mode and a first desktop wallpaper at the first moment based on the real-time key values ​​of the multiple registry keys, and storing the first desktop wallpaper in a first cache unit; reading the stored first desktop wallpaper from the first cache unit, blurring and making the first desktop wallpaper transparent to obtain a first target wallpaper; setting the first target wallpaper as the interface background of a first application, the first application being the application displayed on the screen of the electronic device at the first moment, and the linked background effect of the first application being enabled.

[0007] In this application's technical solution, changes to the desktop wallpaper are detected in real time by monitoring the registry. When the desktop wallpaper or related parameters (such as wallpaper mode, file path, or color parameters) change, the real-time desktop wallpaper mode and wallpaper are obtained based on the real-time registry key values. The real-time desktop wallpaper is then blurred and made transparent to obtain a new target wallpaper, which is stored in a specific cache unit. The new target wallpaper is then read from this cache unit and set as the application interface background with a linked background effect. All steps of this solution are independent of application operation and user interaction; it is a universal solution for setting interface backgrounds for all foreground applications. Therefore, it is not affected by operations such as maximizing the window. This application solution only requires the application to support and enable the linked background effect.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, multiple registry keys include a first registry key, a second registry key, and a third registry key. The first registry key is used to indicate the desktop wallpaper mode and the file path of the live wallpaper. The second registry key is used to indicate whether the desktop wallpaper changes in slideshow mode. The third registry key is used to indicate the live color parameters in color mode. Changes in the value of the first registry key are used to detect changes in the desktop wallpaper mode and changes in the desktop wallpaper in picture mode or focus mode during continuous monitoring. Changes in the value of the second registry key are used to detect changes in the desktop wallpaper in slideshow mode during continuous monitoring. Changes in the value of the third registry key are used to detect changes in the color parameters in color mode during continuous monitoring. In this implementation, the indicative functions of multiple registry keys are given. The first registry key indicates the desktop wallpaper mode, the file path of the desktop wallpaper, and the wallpaper change in picture mode or focus mode. The second registry key is only used to indicate the wallpaper change in slideshow mode. The third registry key is used to indicate the color parameter change in color mode and to indicate the color parameters. It should be understood that changes in key values ​​can trigger the arrival of the first moment; that is, any of the above changes can trigger the arrival of the first moment.

[0009] In one example, based on the real-time key values ​​of multiple registry keys at a given moment, the first desktop wallpaper mode and the first desktop wallpaper of the electronic device at that moment are obtained. This includes: if the real-time key value of the first registry key is the first key value, determining that the first desktop wallpaper mode is either picture mode or focus mode, and obtaining the source file of the first desktop wallpaper according to the file path indicated by the first key value; if the real-time key value of the first registry key is the second key value, determining that the first desktop wallpaper mode is slideshow mode, and obtaining the source file of the first desktop wallpaper according to the file path indicated by the second key value; if the real-time key value of the first registry key is the third key value, determining that the first desktop wallpaper mode is color mode, and obtaining the first color parameter of the desktop wallpaper of the electronic device at that moment according to the fourth key value of the third registry key at the given moment; and rendering the first desktop wallpaper using a graphics library based on the first color parameter. In this example, the desktop wallpaper mode is first determined based on the real-time key value of the first registry key, and then the appropriate method is selected to obtain the source file of the desktop wallpaper based on the determined desktop wallpaper mode. It should be understood that although the steps in this example are triggered only when a key value change is detected at the first moment, it is not necessary to distinguish which key value changed, which simplifies the judgment process and makes it easier to implement.

[0010] It should also be understood that the second and third registry keys each correspond to only one desktop wallpaper mode. Therefore, when the values ​​of the second and third registry keys change, the current desktop wallpaper mode can be directly deduced, rather than necessarily being determined solely by the value of the first registry key.

[0011] In one example, the method of obtaining the first desktop wallpaper mode and the first desktop wallpaper of an electronic device at a given moment based on the real-time key values ​​of multiple registry keys at a given moment includes: if a change in the key value of a second registry key is detected at a given moment, determining that the first desktop wallpaper mode is a slideshow mode, and obtaining the source file of the first desktop wallpaper according to the file path indicated by the second key value, where the second key value is the real-time key value of the first registry key; if a change in the key value of a third registry key is detected at a given moment, determining that the first desktop wallpaper mode is a solid color mode, and obtaining the first color parameter of the desktop wallpaper of the electronic device at a given moment based on the fourth key value of the third registry key at a given moment, and rendering the first desktop wallpaper using a graphics library based on the first color parameter; if no change in the key values ​​of the second and third registry keys is detected at a given moment, but a change in the key value of the first registry key is detected at a given moment, determining the first desktop wallpaper mode based on the real-time key value of the first registry key, and selecting and using the real-time key value of the first or third registry key based on the first desktop wallpaper mode to obtain the first desktop wallpaper. In this example, changes to the three registry keys mentioned above are continuously monitored. Once a change occurs (i.e., the first moment arrives), the system first attempts to determine the desktop wallpaper mode and retrieve the wallpaper based on whether the second and third registry keys have changed. If the wallpaper mode cannot be determined by either, the desktop wallpaper mode is determined based on the real-time value of the first registry key, and the corresponding registry key is selected based on the current desktop wallpaper mode to retrieve the wallpaper. This example involves a progressive determination; if the second and third registry keys have already changed, the desktop wallpaper mode can be directly determined and the wallpaper retrieved based on the desktop wallpaper mode, without needing to first determine the desktop wallpaper mode based on the value of the first registry key before retrieving the wallpaper.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, storing the first desktop wallpaper in the first cache unit includes: if the first cache unit already stores a wallpaper, replacing the already stored wallpaper in the first cache unit with the first desktop wallpaper; or, if the first cache unit is empty, storing the first desktop wallpaper in the first cache unit; reading the stored first desktop wallpaper from the first cache unit and performing a blurring and transparency process on the first desktop wallpaper to obtain the first target wallpaper includes: if the already stored wallpaper in the first cache unit is updated to the first desktop wallpaper, reading the first desktop wallpaper from the first cache unit and performing a blurring and transparency process on the first desktop wallpaper to obtain the first target wallpaper. In this implementation, a description of the first cache unit is given, as well as setting the interface background for the running foreground application (the first application). The first application can be any application, as long as it has enabled the linked background effect function and is displayed on the screen.

[0013] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: at a second moment, in response to the user's launch operation of the second application, the electronic device launches and displays the first interface of the second application; when the linked background effect of the second application is enabled, a second desktop wallpaper is read from the first cache unit, the second desktop wallpaper is blurred and made transparent to obtain a second target wallpaper, and the second target wallpaper is set as the interface background of the second application, wherein the second desktop wallpaper is the wallpaper already stored in the first cache unit at the second moment. In this implementation, for the interface displayed in the first frame of a newly launched application, since key value changes may not occur at this time, the update of the application interface cannot be directly triggered by key value changes. Therefore, in this case, the desktop wallpaper already stored in the first cache unit can be directly read, blurred and made transparent to obtain the target wallpaper, and then set as the interface background of the foreground application.

[0014] In one example, the above method further includes: setting the interface background of the second application to the default background when the linked background effect of the second application is enabled and the first cache unit is empty, or when the linked background effect of the second application is disabled, or when the second application does not support the linked background effect. In this example, for a newly launched application, if the linked background effect is not enabled or there is no stored desktop wallpaper in the first cache unit or the application does not support the linked background effect, the default background is used directly. This example provides a fallback solution to prevent the electronic device from not knowing how to set the application's interface background when the interface background does not meet the requirements for setting the linked background effect, thus causing an error.

[0015] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: at a third moment, when the electronic device does not detect any key value change in any of the multiple registry keys, in response to the user switching the linked background effect from off to on in the third application, reading the third desktop wallpaper from the first cache unit, blurring and making the third desktop wallpaper transparent to obtain the third target wallpaper, and setting the third target wallpaper as the interface background of the third application, wherein the third desktop wallpaper is the wallpaper already stored in the first cache unit at the third moment. In this implementation, for newly started linked background effects, it is also possible that the setting of the interface background to the linked background effect cannot be triggered due to the lack of key value change. Therefore, the solution adopted is to directly read the already stored desktop wallpaper from the first cache unit, blur and make it transparent to obtain the target wallpaper for setting.

[0016] In one example of this implementation, the method also includes setting the background of the third application's interface to the default background of the third application when the first cache unit is empty.

[0017] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: ending the process of setting the application interface background when the first desktop wallpaper is stored in the first cache unit and the screen of the electronic device does not include any application with the linked background effect enabled. In this implementation, for cases where the desktop wallpaper has undergone a key value change but there is no foreground application with the linked background effect enabled, the setting process ends. There are two possibilities for the absence of foreground applications with the linked background effect enabled: no applications are running in the foreground, or applications are running in the foreground but none of them have the linked background effect enabled. The absence of applications running in the foreground but none of them having the linked background effect enabled also includes two possibilities: the running applications do not support the linked background effect, or the running applications support the linked background effect but it is disabled.

[0018] In a second aspect, an apparatus for setting an application interface background is provided, the apparatus comprising a unit consisting of software and / or hardware for performing any of the methods of the first aspect.

[0019] Thirdly, an electronic device is provided, comprising: one or more processors, and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to enable the electronic device to implement any of the methods of the first aspect.

[0020] Fourthly, a chip system is provided, the chip system being applied to an electronic device, the chip system including one or more processors, the one or more processors being configured to invoke computer instructions to enable the electronic device to implement any of the methods of the first aspect.

[0021] Optionally, the chip system also includes a memory electrically connected to the processor.

[0022] Optionally, the chip system may also include a communication interface.

[0023] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium including instructions that, when executed on an electronic device, enable the electronic device to implement any of the methods of the first aspect.

[0024] In a sixth aspect, a computer program product is provided, comprising a computer program that, when executed by an electronic device, can implement any of the methods of the first aspect. Attached Figure Description

[0025] Figure 1 This is a diagram illustrating the Mica effect.

[0026] Figure 2 This is a schematic diagram of a linked background effect according to an embodiment of this application.

[0027] Figure 3 This is a schematic flowchart illustrating a method for setting the background of an application interface according to an embodiment of this application.

[0028] Figure 4 This is a schematic flowchart illustrating another method for setting the background of an application interface according to an embodiment of this application.

[0029] Figure 5 This is a schematic flowchart illustrating another method for setting the background of an application interface according to an embodiment of this application.

[0030] Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0031] The embodiments of this application will now be described in conjunction with the accompanying drawings.

[0032] Figure 1 This is a schematic diagram of the Mica effect. This application mainly uses the Mica effect in the Windows operating system as an example for illustration. Figure 1 As shown in (a), the screen of electronic device 1 displays several application icons and the interfaces of two applications, including interface A1 of application A and interface B1 of application B. Application A does not use the Mica effect, resulting in a significant difference between the background of interface A1 and the desktop wallpaper (here, desktop wallpaper 1) (including differences in color and brightness). Application B, on the other hand, uses the Mica effect. Therefore, the background of interface B1 of application B is less different from desktop wallpaper 1, providing a better visual experience. The Mica effect is based on the desktop wallpaper being blurred and made transparent in real-time before being used as the application's background. Interface B1 of application B also displays three controls, namely controls C1-C3, where control C1 is the minimize window control, control C2 is the maximize window control, and control C3 is the close window control.

[0033] Background effects can enhance the user's visual experience, but in real-world applications, the researchers of this application found that when an application with a Mic effect is maximized, the Mic effect disappears.

[0034] like Figure 1 As shown in (a), assuming the user clicks control C2 to maximize the window of application B1, the electronic device responds to this click operation and displays as follows. Figure 1 The situation shown in (b) is as follows: Figure 1As shown in (b), after maximizing, the Mica effect of application B disappears, and the background of application B1's interface is no longer associated with the desktop wallpaper. Testing revealed that applications developed based on Electron exhibit this issue. Figure 1 As shown, the Mica effect is a setting under the Windows operating system. Therefore, the Mica effect will not disappear in applications pre-installed by the Windows operating system. However, third-party applications, especially those developed based on Electron (a software development technology not provided by Windows manufacturers), will have the problem of the Mica effect disappearing after maximizing the window. In addition, it is possible that the effect will not disappear due to the maximization operation, but due to other new operations on the application. Such new operations may emerge as electronic devices become more feature-rich. Therefore, this application aims to obtain a linked background effect that will not disappear due to operations on the application.

[0035] To address this issue, this application provides a new solution for setting the application interface background, achieving a synchronized background effect similar to the Mica effect. However, it abandons the built-in Mica effect functionality of the Windows operating system, thus preventing the new synchronized background effect from disappearing due to application interactions or other factors. While this solution arose from the discovery that the Mica effect disappears after maximizing a window in Electron-developed applications, it doesn't follow typical improvement logic by attempting to specifically eliminate this defect by analyzing the source code logic and execution flow of Electron-developed applications. This is because such an approach would require analyzing the source code logic and execution flow of each application individually, identifying and eliminating the cause of the phenomenon—a massive undertaking, and most third-party applications don't publicly disclose their source code. Furthermore, and more importantly, although this phenomenon has currently only been observed in Electron-developed applications, it's difficult to guarantee that other non-Electron-based applications won't exhibit the same issue in the future, and that the same phenomenon won't occur due to user operations other than maximizing the window.

[0036] Therefore, the solution adopted in this application is to directly provide a new scheme for setting the background of the application interface, so that any application can set the same linked background effect as the Mica effect. Since this scheme is designed with a complete execution process independently and is completely decoupled from the application, it is not affected by any user operation on the application and can be adapted to any application.

[0037] Figure 2This is a schematic diagram of a linked background effect according to an embodiment of this application. For ease of comparison with traditional solutions, Figure 2 Continuing with application B in electronic device 1 as an example, similar content can be found above and will not be repeated here.

[0038] like Figure 2 As shown in (a), the interface B1 of application B has a linked background effect, that is, the background of interface B1 is obtained by blurring and making transparent the desktop wallpaper 2.

[0039] When the user clicks Figure 2 When control C2, as shown in (a), maximizes the window of application B, the electronic device responds to the click operation and displays as follows. Figure 2 As shown in (b), it can be seen that the linked background effect has not disappeared.

[0040] It should be understood that Figure 2 This can be seen as an example of the effect of the proposed solution. The proposed solution can achieve the same interactive background effect as the Mica effect, but it is not the Mica effect. It can be understood as a completely different self-developed solution that does not rely on the existing Mica effect solution.

[0041] Figure 3 This is a schematic flowchart illustrating a method for setting an application interface background according to an embodiment of this application. The following is a description of... Figure 3 The steps shown are explained below.

[0042] S301, continuously monitors the registry of desktop wallpapers on electronic devices.

[0043] The registry for desktop wallpapers includes multiple registry keys that indicate the live desktop wallpaper mode and the live desktop wallpaper.

[0044] Desktop wallpaper modes for electronic devices include multiple modes such as picture mode, focus mode, color mode, and slideshow mode.

[0045] The electronic device in this application can be a laptop, computer, server, or any other electronic device capable of obtaining the desktop wallpaper mode and real-time desktop wallpaper through a registry key. This application primarily targets the Windows operating system. The solution described in this application achieves the same linked background effect as the existing Mica effect on the Windows operating system, and the linked background effect of this application does not suffer from the drawbacks of the Mica effect (disappearing when the window is maximized).

[0046] The so-called linked background effect can be understood as the application's background and the desktop background being linked, making the difference between the two smaller and the visual experience better. However, since the application still needs to perform related operations, the desktop wallpaper is processed before being set as the application's background, so that if the desktop wallpaper is too colorful, directly using it as the application's background will not affect the user's experience.

[0047] S302. At the first moment, the electronic device, based on detecting a change in the key value of any one or more of the multiple registry keys, performs the following steps: Based on the real-time key values ​​of the multiple registry keys at the first moment, it obtains the first desktop wallpaper mode and the first desktop wallpaper of the electronic device at the first moment, and stores the first desktop wallpaper in the first cache unit; it reads the stored first desktop wallpaper from the first cache unit, performs blurring and transparency processing on the first desktop wallpaper to obtain the first target wallpaper; it sets the first target wallpaper as the interface background of the first application, the first application being the application displayed on the screen of the electronic device at the first moment, and the linked background effect of the first application is enabled.

[0048] In this application, the blurring and transparency processing can directly adopt a processing method similar to the Mica effect or any existing processing method that can achieve blurring and transparency, and there are no limitations.

[0049] In one implementation, multiple registry keys include a first registry key, a second registry key, and a third registry key. The first registry key indicates the desktop wallpaper mode and the file path of the live wallpaper. The second registry key indicates whether the desktop wallpaper changes in slideshow mode. The third registry key indicates the live color parameters in color mode. Changes in the value of the first registry key are used to detect changes in the desktop wallpaper mode and changes in the desktop wallpaper in picture mode or focus mode during continuous monitoring. Changes in the value of the second registry key are used to detect changes in the desktop wallpaper in slideshow mode during continuous monitoring. Changes in the value of the third registry key are used to detect changes in the color parameters in color mode during continuous monitoring. In this implementation, the indicative functions of multiple registry keys are given. The first registry key indicates the desktop wallpaper mode, the file path of the desktop wallpaper, and the wallpaper change in picture mode or focus mode. The second registry key is only used to indicate the wallpaper change in slideshow mode. The third registry key is used to indicate the color parameter change in color mode and to indicate the color parameters. It should be understood that changes in key values ​​can trigger the arrival of the first moment; that is, any of the above changes will trigger the arrival of the first moment.

[0050] In one example, based on the real-time key values ​​of multiple registry keys at a given moment, the first desktop wallpaper mode and the first desktop wallpaper of the electronic device at that moment are obtained. This includes: if the real-time key value of the first registry key is the first key value, determining that the first desktop wallpaper mode is either picture mode or focus mode, and obtaining the source file of the first desktop wallpaper according to the file path indicated by the first key value; if the real-time key value of the first registry key is the second key value, determining that the first desktop wallpaper mode is slideshow mode, and obtaining the source file of the first desktop wallpaper according to the file path indicated by the second key value; if the real-time key value of the first registry key is the third key value, determining that the first desktop wallpaper mode is color mode, and obtaining the first color parameter of the desktop wallpaper of the electronic device at that moment according to the fourth key value of the third registry key at the given moment; and rendering the first desktop wallpaper using a graphics library based on the first color parameter. In this example, the desktop wallpaper mode is first determined based on the real-time key value of the first registry key, and then the appropriate method is selected to obtain the source file of the desktop wallpaper based on the determined desktop wallpaper mode. It should be understood that although the steps in this example are triggered only when a key value change is detected at the first moment, it is not necessary to distinguish which key value changed, which simplifies the judgment process and makes it easier to implement.

[0051] It should also be understood that the second and third registry keys each correspond to only one desktop wallpaper mode. Therefore, when the values ​​of the second and third registry keys change, the current desktop wallpaper mode can be directly deduced, rather than necessarily being determined solely by the value of the first registry key.

[0052] In one example, the method of obtaining the first desktop wallpaper mode and the first desktop wallpaper of an electronic device at a given moment based on the real-time key values ​​of multiple registry keys at a given moment includes: if a change in the key value of a second registry key is detected at a given moment, determining that the first desktop wallpaper mode is a slideshow mode, and obtaining the source file of the first desktop wallpaper according to the file path indicated by the second key value, where the second key value is the real-time key value of the first registry key; if a change in the key value of a third registry key is detected at a given moment, determining that the first desktop wallpaper mode is a solid color mode, and obtaining the first color parameter of the desktop wallpaper of the electronic device at a given moment based on the fourth key value of the third registry key at a given moment, and rendering the first desktop wallpaper using a graphics library based on the first color parameter; if no change in the key values ​​of the second and third registry keys is detected at a given moment, but a change in the key value of the first registry key is detected at a given moment, determining the first desktop wallpaper mode based on the real-time key value of the first registry key, and selecting and using the real-time key value of the first or third registry key based on the first desktop wallpaper mode to obtain the first desktop wallpaper. In this example, changes to the three registry keys mentioned above are continuously monitored. Once a change occurs (i.e., the first moment arrives), the system first attempts to determine the desktop wallpaper mode and retrieve the wallpaper based on whether the second and third registry keys have changed. If the wallpaper mode cannot be determined by either, the desktop wallpaper mode is determined based on the real-time value of the first registry key, and the corresponding registry key is selected based on the current desktop wallpaper mode to retrieve the wallpaper. This example involves a progressive determination; if the second and third registry keys have already changed, the desktop wallpaper mode can be directly determined and the wallpaper retrieved based on the desktop wallpaper mode, without needing to first determine the desktop wallpaper mode based on the value of the first registry key before retrieving the wallpaper.

[0053] As can be seen, the two examples above each have their advantages. The first one does not require specifying which registry key's value changed; it only needs to execute the process once until the registry key's value changed to obtain the first desktop wallpaper mode and the first desktop wallpaper at the first moment. The second one, on the other hand, requires specifying which registry key's value changed, but since the second and third registry keys each correspond to a unique desktop wallpaper mode, knowing which one's value changed allows direct inference that the current desktop wallpaper mode is the one corresponding to that registry key.

[0054] In one implementation, storing the first desktop wallpaper in the first cache unit includes: if the first cache unit already contains a wallpaper, replacing the already stored wallpaper in the first cache unit with the first desktop wallpaper; or, if the first cache unit is empty, storing the first desktop wallpaper in the first cache unit. Reading the stored first desktop wallpaper from the first cache unit and performing a blurring and transparency process on the first desktop wallpaper to obtain the first target wallpaper includes: if the already stored wallpaper in the first cache unit is updated to the first desktop wallpaper, reading the first desktop wallpaper from the first cache unit and performing a blurring and transparency process on the first desktop wallpaper to obtain the first target wallpaper. This implementation provides a description of the first cache unit and sets the interface background for the running foreground application (the first application). The first application can be any application, as long as it has enabled the linked background effect function and is displayed on the screen.

[0055] It should be understood that the first cache unit is a dedicated cache unit set up for the solution of this application. The wallpaper stored in this cache unit is used to set the interface background of the foreground application. However, storing the desktop wallpaper in the first cache unit and setting the interface background of the foreground application are two steps that may not be executed simultaneously. For example, suppose a key-value change is detected at a certain time point, and a new desktop wallpaper is stored in the first cache unit, but at this time no application is running in the foreground or no application with the linked background effect enabled is running. In this case, storing the desktop wallpaper in the first cache unit is the end of the process. As another example, suppose at another time point the foreground application switches the linked background effect from the off state to the on state. However, since no key-value change has occurred at this time, the desktop wallpaper in the first cache unit is still the one that was previously stored. Therefore, the process of obtaining the desktop wallpaper and storing the desktop wallpaper in the first cache unit will not be executed at this time. Instead, the desktop wallpaper that is currently stored in the first cache unit can be blurred and made transparent before the target wallpaper is set as the interface background of the foreground application.

[0056] Figure 2 Application B1 is an example of the first application.

[0057] In one implementation, the method further includes: at a second moment, in response to the user's launch operation of the second application, the electronic device launches and displays the first interface of the second application; when the linked background effect of the second application is enabled, a second desktop wallpaper is read from the first cache unit, the second desktop wallpaper is blurred and made transparent to obtain a second target wallpaper, and the second target wallpaper is set as the interface background of the second application. The second desktop wallpaper is the wallpaper already stored in the first cache unit at the second moment. In this implementation, for the interface displayed in the first frame of a newly launched application, since key value changes may not occur at this time, the update of the application interface cannot be directly triggered by key value changes. Therefore, in this case, the desktop wallpaper already stored in the first cache unit can be directly read, blurred and made transparent to obtain the target wallpaper, and then set as the interface background of the foreground application.

[0058] In one example, the above method further includes: setting the interface background of the second application to the default background when the linked background effect of the second application is enabled and the first cache unit is empty, or when the linked background effect of the second application is disabled, or when the second application does not support the linked background effect. In this example, for a newly launched application, if the linked background effect is not enabled or there is no stored desktop wallpaper in the first cache unit or the application does not support the linked background effect, the default background is used directly. This example provides a fallback solution to prevent the electronic device from not knowing how to set the application's interface background when the interface background does not meet the requirements for setting the linked background effect, thus causing an error.

[0059] In one implementation, the method further includes: at a third moment, when the electronic device does not detect any key value change in any of the multiple registry keys, in response to the user switching the linked background effect from off to on in the third application, reading a third desktop wallpaper from the first cache unit, blurring and making the third desktop wallpaper transparent to obtain a third target wallpaper, and setting the third target wallpaper as the interface background of the third application. The third desktop wallpaper is the wallpaper already stored in the first cache unit at the third moment. In this implementation, for newly activated linked background effects, it is also possible that the setting of the interface background to the linked background effect cannot be triggered due to the lack of key value change. Therefore, the solution adopted is to directly read the already stored desktop wallpaper from the first cache unit, blur and make it transparent to obtain the target wallpaper for setting.

[0060] In one example of this implementation, the method also includes setting the background of the third application's interface to the default background of the third application when the first cache unit is empty.

[0061] In another implementation, the method further includes: ending the process of setting the application interface background when the first desktop wallpaper is stored in the first cache unit and the screen of the electronic device does not include any application with the linked background effect enabled. In this implementation, for cases where the desktop wallpaper has undergone a key value change but there is no foreground application with the linked background effect enabled, the setting process ends. There are two possibilities for the absence of foreground applications with the linked background effect enabled: no applications are running in the foreground, or applications are running in the foreground but none of them have the linked background effect enabled. The absence of applications running in the foreground but none of them having the linked background effect enabled also includes two possibilities: the running applications do not support the linked background effect, or the running applications support the linked background effect but it is disabled.

[0062] It should be noted that the first cache unit can be used not only to cache the obtained desktop wallpaper, but also to cache the target wallpaper that has been blurred and made transparent. In this case, it is only necessary to replace the following in step S302: "Based on the real-time key values ​​of multiple registry keys at the first moment, obtain the first desktop wallpaper mode and the first desktop wallpaper of the electronic device at the first moment, and store the first desktop wallpaper in the first cache unit; read the stored first desktop wallpaper from the first cache unit, blur and make transparent the first desktop wallpaper to obtain the first target wallpaper; set the first target wallpaper as the interface background of the first application, the first application being the application displayed on the screen of the electronic device at the first moment, and the linked background effect of the first application is enabled" with "Based on the real-time key values ​​of multiple registry keys at the first moment, obtain the first desktop wallpaper mode and the first desktop wallpaper of the electronic device at the first moment; blur and make transparent the first desktop wallpaper to obtain the first target wallpaper, and store the first target wallpaper in the first cache unit; read the first target wallpaper from the first cache unit, and set the first target wallpaper as the interface background of the first application, the first application being the application displayed on the screen of the electronic device at the first moment, and the linked background effect of the first application is enabled". In this case, various implementation methods related to the first cache unit can also be modified accordingly. The first cache unit directly stores the target wallpaper instead of the source file of the desktop wallpaper. This allows for quick display when there are no key-value changes. The target wallpaper can be directly set as the application interface background simply by reading it from the first cache unit, without having to first read the source file of the desktop wallpaper, perform blurring and transparency processing to obtain the target wallpaper, and then set the application interface background.

[0063] In one implementation, a first target wallpaper is obtained by blurring and making the first desktop wallpaper transparent, and the first target wallpaper is stored in a first cache unit. This includes: if the first cache unit already has a wallpaper stored, replacing the already stored wallpaper in the first cache unit with the first target wallpaper; or, if the first cache unit is empty, storing the first target wallpaper in the first cache unit. The first target wallpaper is read from the first cache unit and set as the interface background of the first application. This includes: if the already stored wallpaper in the first cache unit is updated to the first target wallpaper, reading the first target wallpaper from the first cache unit and setting the first target wallpaper as the interface background of the first application.

[0064] As mentioned above, the first cache unit is a dedicated cache unit set up for the scheme of this application. However, unlike the previous example, the wallpaper stored in this cache unit is the target wallpaper (the wallpaper that has been blurred and made transparent) to be displayed. Specifically, it is displayed to the first application and directly set as the interface background of the first application. Storing the target wallpaper in the first cache unit and setting the interface background of the foreground application are two steps that may not be executed simultaneously. For example, suppose a key-value change is detected at a certain time point, and a new target wallpaper is stored in the first cache unit. However, at this time, no application is running in the foreground or no application with the linked background effect enabled is running. In this case, the process ends after storing the target wallpaper in the first cache unit. As another example, suppose at another time point, the foreground application switches the linked background effect from the off state to the on state. However, since no key-value change has occurred at this time, the target wallpaper in the first cache unit is still the one that was previously stored. Therefore, the previous process of obtaining the target wallpaper and storing the target wallpaper in the first cache unit will not be executed. Instead, the target wallpaper that is currently stored in the first cache unit can be directly set as the interface background of the foreground application.

[0065] In one implementation, the method further includes: at a second moment, in response to the user's launch operation of the second application, the electronic device launches and displays the first interface of the second application; when the linked background effect of the second application is enabled, a second target wallpaper is read from the first cache unit and set as the interface background of the second application, wherein the second target wallpaper is the target wallpaper already stored in the first cache unit at the second moment. In this implementation, for the interface displayed in the first frame of a newly launched application, since key value changes may not occur at this time, the update of the application interface cannot be directly triggered by key value changes. Therefore, in this case, the target wallpaper already stored in the first cache unit can be directly read and set as the interface background of the foreground application.

[0066] In one implementation, the method further includes: at a third moment, if the electronic device does not detect any key value change among the multiple registry keys, in response to the user switching the linked background effect from a closed state to an open state in the third application, reading a third target wallpaper from the first cache unit and setting the third target wallpaper as the interface background of the third application, wherein the third target wallpaper is the target wallpaper already stored in the first cache unit at the third moment. In this implementation, for newly activated linked background effects, the setting of the interface background to the linked background effect may not be triggered due to the lack of key value change; therefore, the solution adopted is to directly read the already stored target wallpaper from the first cache unit for setting.

[0067] In one implementation, the method further includes: at a fourth moment, displaying a fourth interface of a fourth application on the electronic device. The fourth interface is a window of normal size, and its background is a fourth target wallpaper. The fourth target wallpaper is obtained by blurring and making transparent the desktop wallpaper read from the first cache unit at the fourth moment. The desktop wallpaper at the fourth moment is the one displayed at the fourth moment. At a fifth moment after the fourth moment, in response to the user's click operation on the maximized window control in the fourth interface, displaying a fifth interface of the fourth application on the electronic device. The fifth interface is a window of maximized size, and its background is the fourth target wallpaper. The fourth target wallpaper is obtained by blurring and making transparent the desktop wallpaper read from the first cache unit at the fifth moment. Between the fourth and fifth moments, the electronic device does not detect any changes in the registry. In this implementation, after the window maximization operation, because the electronic device does not detect any changes in the registry (i.e., it does not detect any changes in the key values ​​of any past or multiple registry keys), it continues to set the background of the real-time interface after maximizing the window to the fourth target wallpaper.

[0068] The desktop wallpaper registry includes multiple registry entries, each containing one or more registry keys, and each registry key containing one or more possible key values ​​(values), with each key value indicating a different content.

[0069] The current desktop wallpaper modes mainly include picture mode, spotlight mode, color mode, and slideshow mode. Spotlight mode is similar to picture mode. Color mode sets the desktop wallpaper to the corresponding color based on the set color parameters. Slideshow mode changes the desktop wallpaper at regular intervals.

[0070] Taking the Windows operating system as an example, the registry key path can include a first path and a second path. Here, we take the first path as Computer\HKEY_CURRENT_USER\Control Panel\Desktop and the second path as Computer\HKEY_CURRENT_USER\Control Panel\Colors as an example. The first path is the path of the first registry key Desktop, and the second path is the path of the second registry key Colors. The first registry key includes the registry keys WallPaper and TranscodedImageCache, and the second registry key includes the registry key Background.

[0071] It should be understood that the registry key paths here are just examples and may vary depending on the settings of different electronic devices. However, registry keys are often the same across different electronic devices operating the same system, and the meanings of their values ​​are also the same. As shown in Table 1, the value of Wallpaper (an example of the first registry key) includes three cases: empty (an example of the third key value), TranscodedWallpaper (the path to the wallpaper file after transcoding by the operating system, an example of the second key value), and other (an example of the first key value). An empty value indicates that the desktop wallpaper mode is color mode; a TranscodedWallpaper value indicates that the desktop wallpaper mode is slideshow mode, and this TranscodedWallpaper indicates the file path of the current wallpaper in slideshow mode (the encrypted path of the Windows wallpaper source file in slideshow mode); and other values ​​are neither empty nor TranscodedWallpaper, indicating that the desktop wallpaper mode is picture mode or spotlight mode, and this "other" value indicates the absolute path of the wallpaper source file in picture mode or spotlight mode. The value of the TranscodedImageCache key (an example of the second registry key) is used to indicate whether the wallpaper changes during slideshow mode (during the presentation) (this only indicates whether it has changed; the actual wallpaper is still obtained through TranscodedWallpaper). The value of the Background key (the third registry key) (e.g., the fourth key) is used to indicate whether the color parameters change in solid color mode, and to show whether the changed color parameters (e.g., RGB values) can be read. When the WallPaper key is the same as the TranscodedWallpaper key mentioned above, it could be "C:\Users\<CURRENT_USER_NAME> The key "\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper" is the path to the wallpaper file after Windows transcoding when the desktop wallpaper mode is slideshow mode.

[0072] Figure 3The method described herein detects changes to the desktop wallpaper in real time by monitoring the registry. When the desktop wallpaper or related parameters (such as wallpaper mode, file path, or color parameters) change, the method retrieves the real-time desktop wallpaper mode and wallpaper based on the real-time registry key values. After blurring and making the real-time desktop wallpaper transparent, a new target wallpaper is obtained and stored in a specific cache unit. Then, the new target wallpaper is read from this cache unit and set as the application interface background with a linked background effect. All steps of this solution are independent of application operation and user interaction, providing a universal solution for setting interface backgrounds for all foreground applications. Therefore, it is unaffected by operations such as maximizing windows. This solution only requires the application to support and enable the linked background effect.

[0073] Figure 4 This is a schematic flowchart illustrating another method for setting the background of an application interface according to an embodiment of this application. Figure 4 It can be seen as Figure 3 An example of the method shown. Below is an example of... Figure 4 The steps shown will be explained below. Figure 4 The method shown defines several functions: CURRENT_USER_NAME represents the current username; REGPATH_DESKTOP represents the first path mentioned above; REGPATH_COLORS represents the second path; FILERATH_TEMP represents the absolute path of the first cache unit mentioned above; and FILERATH_TRANSCODED represents the file path corresponding to the key value TranscodedWallpaper mentioned above.

[0074] S401. Read the key value of WallPaper from the function REGPATH_DESKTOP.

[0075] S402. Determine if the WallPaper key value is empty. If the result is yes, proceed to step S403. If the result is no, proceed to step S404.

[0076] S403. Record the current desktop wallpaper mode as color mode, read the key value of Background in the function REGPATH_COLORS and record it, use the read Background key value as RGB value to generate an image, and save the generated image as the current desktop wallpaper to FILERATH_TEMP.

[0077] The generated images can be in formats such as JPG, there are no restrictions, as long as the electronic device can render the image based on the color parameters and it can be used as a desktop wallpaper.

[0078] S404. Determine whether the WallPaper key value is FILERATH_TRANSCODEDWALLPAPER. If the result is yes, proceed to step S405. If the result is no, proceed to step S406.

[0079] FILERATH_TRANSCODEDWALLPAPER can also be TranscodedWallpaper, as long as it can represent the key-value pair in slideshow mode. Figure 4 For the sake of brevity, it is represented as A1.

[0080] S405. Record the current desktop wallpaper mode as slideshow mode, read the key value of TranscodedImageCache in the function REGPATH_DESKTOP and record it, and read the file in FILERATH_TRANSCODED as the current desktop wallpaper and save it to FILERATH_TEMP.

[0081] S406. Record the current desktop wallpaper mode as image mode, read the file path indicated by the current key value of WallPaper and record it, and save the file under that file path as the desktop wallpaper to FILERATH_TEMP.

[0082] S407. Load the desktop wallpaper indicated by FILERATH_TEMP in the application interface, blur and make it transparent, and set it as the interface background of the application under the linked background effect, and display it on the screen of the electronic device.

[0083] S402-S407 constitute process 1, which is a process of obtaining or drawing the desktop wallpaper and storing it, as well as setting it as the interface background of the foreground application, after determining the desktop wallpaper mode based on the Wallpaper key value.

[0084] S408. Monitor the REGPATH_COLORS registry key. If the registry has been changed, proceed to step S409. If the registry has not been changed, continue with step S408.

[0085] S409. Determine whether the current desktop wallpaper mode is color mode. If the determination result is yes, proceed to step S410. If the determination result is no, proceed to step S408.

[0086] Since REGPATH_COLORS is being monitored here, changes in the registry are generally caused by changes in color parameters, or by switching from one desktop wallpaper mode to another color mode. Therefore, it is necessary to determine whether the current mode is color mode. If the change is due to a change in color parameters or a switch from one desktop wallpaper mode to another color mode, triggering step S409, the result will be yes. If the change is due to a switch from one color mode to another desktop wallpaper mode, triggering step S409, the result will be no.

[0087] S410. Read and record the key value of Background in the function REGPATH_COLORS.

[0088] S411. Determine whether the key value of the current Background has changed compared to the history. If the result is yes, proceed to step S412. If the result is no, proceed to step S408.

[0089] A judgment can be made by comparing the stored values ​​with the values ​​just read.

[0090] S412. Use the read Background key value as the RGB value to generate an image, and save the generated image as the current desktop wallpaper to FILERATH_TEMP.

[0091] S413. Load the desktop wallpaper indicated by FILERATH_TEMP in the application interface, blur and make it transparent, and set it as the interface background of the application under the linked background effect, and display it on the screen of the electronic device.

[0092] S414. Monitor the REGPATH_DESKTOP registry key. If the registry has been changed, proceed to step S415. If the registry has not been changed, continue to proceed to step S414.

[0093] It should be understood that steps S408 and S414 are executed in parallel; they can start executing at the same time or at different times.

[0094] S415. Read the key value of WallPaper in the function REGPATH_DESKTOP, and determine and record the current desktop wallpaper mode by executing some of the steps S402-S406 in process flow 1.

[0095] S416. Determine whether there are any changes in the current desktop wallpaper mode compared to the historical desktop wallpaper mode. If the determination result is yes, proceed to step S417. If the determination result is no, proceed to step S418.

[0096] S417, Reuse Process 1.

[0097] In other words, it switches to the remaining steps in steps S402-S407 of process flow 1 that were not completed during step S415.

[0098] S418. Determine whether the current desktop wallpaper mode is slideshow mode. If the result is yes, proceed to step S419. If the result is no, proceed to step S423.

[0099] Since this branch listens to REGPATH_DESKTOP, changes in the registry are generally due to changes in the desktop wallpaper file path (changing wallpaper in picture mode, spotlight mode, or slideshow mode), switching to one of the picture mode, spotlight mode, or slideshow mode, or switching from one of the three modes to another of the three modes or other modes. In slideshow mode, the wallpaper changes periodically, so it is also necessary to determine whether the current mode is slideshow mode.

[0100] S419 reads and records the key-value pairs of TranscodedImageCache from the REGPATH_DESKTOP function.

[0101] S420. Determine whether the key value of the current TranscodedImageCache has changed. If the result is yes, proceed to step S421. If the result is no, proceed to step S414.

[0102] Since TranscodedImageCache has not changed, and step S418 has already determined that it is slideshow mode, it means that there is no need to update the desktop wallpaper. Therefore, proceed to step S414.

[0103] S421. Read the file in FILERATH_TRANSCODED and save it as the current desktop wallpaper to FILERATH_TEMP.

[0104] S422. Load the desktop wallpaper indicated by FILERATH_TEMP in the application interface, blur and make it transparent, and set it as the interface background of the application under the linked background effect, and display it on the screen of the electronic device.

[0105] S423. Read the key value of WallPaper from the function REGPATH_DESKTOP.

[0106] S424. Determine whether the file path indicated by the key value of the current WallPaper has changed. If the determination result is yes, execute step S425; if the determination result is no, execute step S414.

[0107] Since step S424 is executed when it's determined to be in picture mode or focus mode (because step S418 determined it wasn't slideshow mode), if the key value of Wallpaper doesn't change, it means the desktop wallpaper hasn't been changed; if the key value of Wallpaper changes, it means the desktop wallpaper has been changed. When step S424 is executed under mode switching triggers, the desktop wallpaper might not change. When step S424 is triggered without mode switching, it means the desktop wallpaper has been changed, and in this case, the file path of the new wallpaper needs to be obtained.

[0108] S425. Record the file path indicated by the key value of the current WallPaper, read the file from the file path and save it as the current desktop wallpaper to FILERATH_TEMP.

[0109] In addition, after step S425 is executed, step S422 is executed; after step S422 is executed, step S414 is executed; after step S417 is executed, step S414 is executed; after step S413 is executed, step S408 is executed; and after step S407 is executed, steps S408 and S414 are executed in parallel.

[0110] from Figure 4 As can be seen, it is not always necessary to follow the steps in process 1. Figure 4 This can be seen as an example of the implementation method described above, which first determines whether it is a color mode or a slideshow mode based on the second and third registry keys, and then further determines the mode and obtains the wallpaper.

[0111] Figure 5 This is a schematic flowchart illustrating another method for setting the background of an application interface according to an embodiment of this application. Figure 5 It can be seen as Figure 3 An example of the method shown. Below is an example of... Figure 5 The steps shown will be explained.

[0112] S501, the management center (officecenter) reads the desktop wallpaper registry.

[0113] S502: The management center retrieves the wallpaper file from the desktop wallpaper registry and stores it locally.

[0114] For color modes, wallpaper files are rendered by obtaining color parameters; for other modes, the source file is read by determining the file path. Storing locally can be understood as storing in a specific cache unit, such as the first cache unit mentioned above.

[0115] S503: The management center sends the file path of the desktop wallpaper to the interactive process (UI process or display process).

[0116] It can be sent via inter-process communication (IPC).

[0117] S504: The interactive process loads the wallpaper file and refreshes the application's interface background.

[0118] It should be understood that the interactive process here can read the wallpaper file through the file path, and then execute the relevant process mentioned above to set the interface background of the foreground application with the linked background effect enabled.

[0119] S505, the management center continuously monitors registry change events reported by the desktop wallpaper process in the operating system.

[0120] The desktop wallpaper process modifies the desktop wallpaper registry after receiving a user's request to change the desktop wallpaper. The management center can then monitor these registry changes. Additionally, in slideshow mode, the timed switching of the desktop wallpaper also causes registry changes.

[0121] When a user performs any one or more of the following operations—switching desktop wallpaper modes, changing the file path of the desktop wallpaper, or modifying color parameters in color mode—the registry of the desktop wallpaper will be modified accordingly, allowing the management center to detect the changes in the registry.

[0122] S506. When the management center detects a registry change event, it sends a callback of the registry change event to the desktop wallpaper process.

[0123] S507. Triggered by step S506, the management center reads the current registry.

[0124] S508: The management center retrieves the wallpaper file from the desktop wallpaper registry and stores it locally.

[0125] S509, The management center sends the file path of the desktop wallpaper to the interactive process.

[0126] S510: The interactive process loads the wallpaper file and refreshes the application's interface background.

[0127] S511: The desktop wallpaper process refreshes the desktop wallpaper periodically in slideshow mode.

[0128] This means changing the desktop wallpaper at fixed time intervals.

[0129] S512, The management center sends a callback of registry change events to the desktop wallpaper process.

[0130] S513. Triggered by step S513, the management center reads the current registry.

[0131] S514. The management center retrieves the wallpaper file from the desktop wallpaper registry and stores it locally.

[0132] S515, The management center sends the file path of the desktop wallpaper to the interactive process.

[0133] S516: The interactive process loads the wallpaper file and refreshes the application's interface background.

[0134] The methods of the embodiments of this application have been described above with reference to the accompanying drawings. It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially, these steps are not necessarily executed in the order shown in the figures. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the steps or stages of other steps. The apparatus of the embodiments of this application will now be described with reference to the accompanying drawings.

[0135] Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Figure 6 As shown, the electronic device 100 may include a processor 110, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, display screen 194, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, etc.

[0136] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0137] For example, Figure 6The processor 110 shown may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0138] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0139] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0140] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0141] The electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0142] In this embodiment of the application, a display screen is needed to show the running interface of the application and the desktop interface, etc.

[0143] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs.

[0144] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0145] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.

[0146] This application can be applied to touch screen devices or non-touch screen devices without limitation. Therefore, the input module of electronic device 100 can also include keyboard, mouse, etc.

[0147] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0148] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0149] 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.

[0150] This application also provides an electronic device, which includes: one or more processors and a memory; the memory is coupled to one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to enable the electronic device to perform the steps in any of the above methods.

[0151] This application also provides a chip system applied to an electronic device. The chip system includes one or more processors, which invoke computer instructions to cause the electronic device to perform the steps in any of the methods described above. Optionally, the chip system further includes a memory electrically connected to the processor. Optionally, the chip system may also include a communication interface.

[0152] This application also provides a computer-readable storage medium storing instructions that, when executed by an electronic device, can implement any of the methods described above. This computer-readable medium may include at least: any entity or device capable of carrying computer program code (instructions) to a photographic device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0153] This application also provides a computer program product, which includes a computer program that, when executed by an electronic device, can implement any of the above-described methods. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form.

[0154] 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.

[0155] 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.

[0156] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / 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. For example, 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; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0157] 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.

[0158] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0159] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0160] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0161] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0162] The above-described 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 method for setting the background of an application interface, characterized in that, include: The registry of the desktop wallpaper of the electronic device is continuously monitored. The registry of the desktop wallpaper includes multiple registry keys, which are used to indicate the real-time desktop wallpaper mode and the real-time desktop wallpaper. The desktop wallpaper mode of the electronic device includes multiple modes among picture mode, focus mode, color mode and slideshow mode. At the first moment, the electronic device, based on detecting a change in the value of any one or more of the plurality of registry keys, performs the following steps: Based on the real-time key values ​​of the multiple registry keys at the first moment, the first desktop wallpaper mode and the first desktop wallpaper of the electronic device at the first moment are obtained, and the first desktop wallpaper is stored in the first cache unit; The first desktop wallpaper is read from the first cache unit and then blurred and made transparent to obtain the first target wallpaper. The first target wallpaper is set as the interface background of the first application, which is the application displayed on the screen of the electronic device at the first moment, and the linkage background effect of the first application is turned on.

2. The method according to claim 1, characterized in that, The plurality of registry keys include a first registry key, a second registry key, and a third registry key; the first registry key is used to indicate the desktop wallpaper mode and the file path of the live wallpaper, the second registry key is used to indicate whether the desktop wallpaper changes in slideshow mode, and the third registry key is used to indicate the live color parameters in color mode; the change in the value of the first registry key is used to detect the change of desktop wallpaper mode and the change of desktop wallpaper in picture mode or focus mode during continuous detection, the change in the value of the second registry key is used to detect the change of desktop wallpaper in slideshow mode during continuous detection, and the change in the value of the third registry key is used to detect the change of color parameters in color mode during continuous detection.

3. The method according to claim 2, characterized in that, The step of obtaining the first desktop wallpaper mode and first desktop wallpaper of the electronic device at a first moment based on the real-time key values ​​of the plurality of registry keys at a first moment includes: If the real-time key value of the first registry key is the first key value, determine whether the first desktop wallpaper mode is image mode or focus mode, and obtain the source file of the first desktop wallpaper according to the file path indicated by the first key value; If the real-time value of the first registry key is the second key value, the first desktop wallpaper mode is determined to be slideshow mode, and the source file of the first desktop wallpaper is obtained according to the file path indicated by the second key value; When the real-time key value of the first registry key is the third key value, the first desktop wallpaper mode is determined to be a color mode, and the first color parameter of the desktop wallpaper of the electronic device at the first moment is obtained according to the fourth key value of the third registry key at the first moment. Then, the first desktop wallpaper is rendered using a graphics library according to the first color parameter.

4. The method according to claim 1, characterized in that, The step of storing the first desktop wallpaper in the first cache unit includes: If the first cache unit already stores a wallpaper, replace the stored wallpaper in the first cache unit with the first desktop wallpaper; or... If the first cache unit is empty, the first desktop wallpaper is stored in the first cache unit; The step of reading the stored first desktop wallpaper from the first cache unit and performing a blurring and transparency process on the first desktop wallpaper to obtain the first target wallpaper includes: When the wallpaper stored in the first cache unit is updated to the first desktop wallpaper, the first desktop wallpaper is read from the first cache unit, and the first desktop wallpaper is blurred and made transparent to obtain the first target wallpaper.

5. The method according to claim 1, characterized in that, The method further includes: At the second moment, in response to the user's launch operation of the second application, the electronic device launches and displays the first interface of the second application; When the background effect of the second application is enabled, the second desktop wallpaper is read from the first cache unit, the second desktop wallpaper is blurred and made transparent to obtain the second target wallpaper, and the second target wallpaper is set as the interface background of the second application. The second desktop wallpaper is the wallpaper already stored by the first cache unit at the second moment.

6. The method according to claim 5, characterized in that, The method further includes: When the linked background effect of the second application is enabled and the first cache unit is empty, or when the linked background effect of the second application is disabled, or when the second application does not support the linked background effect, the interface background of the second application is set to the default background of the second application.

7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: At the third moment, the electronic device does not detect any change in the value of any of the multiple registry keys. In response to the user's operation of switching the linked background effect from off to on in the third application, it reads the third desktop wallpaper from the first cache unit, performs blurring and transparency processing on the third desktop wallpaper to obtain the third target wallpaper, and sets the third target wallpaper as the interface background of the third application. The third desktop wallpaper is the wallpaper already stored by the first cache unit at the third moment.

8. An electronic device, characterized in that, The electronic device includes: one or more processors, and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 7.

9. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, The computer program product includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 7.