Desktop wallpaper window and application program interaction method and computer program product

By detecting data changes in the application and broadcasting updated data content to the window collection, the problem that desktop wallpaper cannot be updated in real time is solved, real-time updates synchronized with application data are achieved, system resource consumption is reduced, and system performance is guaranteed.

CN119902839APending Publication Date: 2025-04-29HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411959333.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In the prior art, desktop wallpaper cannot be updated in real time and cannot accurately reflect the latest status of data in the application. Frequent polling operations increase system load, consume more system resources, and affect system performance.

Method used

When the application determines that the data content of the program window changes, it actively broadcasts the changed data content to each window in the window collection, including desktop wallpaper windows, real-time updates are achieved.

Benefits of technology

It realizes real-time update of desktop wallpaper according to changes in data in the application, ensuring that the content displayed on the desktop wallpaper is synchronized with the data content corresponding to the application's program window, significantly reducing the consumption of system resources and ensuring system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902839A_ABST
    Figure CN119902839A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an interaction method of a desktop wallpaper window and an application program and a computer program product. The method is applied to an application program and can comprise the steps that whether data content corresponding to a program window of the application program changes or not is determined; under the condition that the data content changes, the changed data content is broadcasted to each window in a window set, the window set comprises a desktop wallpaper window, and the changed data content is used for updating desktop wallpaper by the desktop wallpaper window. According to the technical scheme, the desktop wallpaper can be updated in real time according to the change of the data in the application program, and meanwhile consumption of system resources is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the technical field of desktop wallpapers, and more specifically, relate to a method for interacting a desktop wallpaper window with an application program and a computer program product. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] In order to enhance the diversity and fun of desktop wallpapers on terminal devices, related technologies have proposed a method for dynamically generating desktop wallpapers based on the data content of applications. Specifically, this method relies on the Electron framework to create a borderless window that is always on the top layer, and obtains data content from the application by calling a specific API interface. Subsequently, Canavas or WebGL technology is used in the window to generate desktop wallpapers corresponding to the data content.

[0004] However, the above method requires the desktop wallpaper window to periodically poll the application through the API interface to obtain the latest data content. Due to the fixed polling frequency, the content displayed by the desktop wallpaper cannot be updated in real time and cannot accurately reflect the latest status of the data in the application. In addition, frequent polling operations will increase the system load, consume more system resources, and affect system performance. Summary of the invention

[0005] In a first aspect of the embodiments of the present disclosure, a method for interacting a desktop wallpaper window with an application is provided, the method being applied to an application, the method comprising:

[0006] Determining whether data content corresponding to the program window of the application program has changed;

[0007] When the data content changes, the changed data content is broadcast to each window in the window set, wherein the window set includes a desktop wallpaper window, and the changed data content is used by the desktop wallpaper window to update the desktop wallpaper.

[0008] Optionally, the method further includes: updating the data content in response to an interactive operation initiated in the program window; and / or receiving an interactive event from the desktop wallpaper window to update the data content.

[0009] Optionally, when the changed data content is stored locally, the changed data content is obtained locally; when the changed data content is not stored locally, the changed data content is sent by the server in response to a corresponding request from the terminal where the application is located.

[0010] Optionally, the method also includes: before broadcasting the changed data content, filtering out wallpaper data content used to generate desktop wallpaper from the changed data content; comparing the wallpaper data content with cached historical wallpaper data content, the historical wallpaper data content being the wallpaper data content last broadcast by the application; broadcasting the changed data content to each window in the window set includes: when the comparison result shows that the wallpaper data content is different from the historical wallpaper data content, broadcasting the wallpaper data content to the each window and storing the wallpaper data content; and, when the comparison result shows that the wallpaper data content is the same as the historical wallpaper data content, not broadcasting the wallpaper data content.

[0011] Optionally, the desktop wallpaper is generated by the desktop wallpaper window using front-end rendering technology.

[0012] In a second aspect of the embodiments of the present disclosure, a method for interacting between a desktop wallpaper window and an application is provided. The method is applied to a desktop wallpaper window, and the method includes:

[0013] receiving data content broadcast by an application, wherein the data content is broadcast by the application when the data content corresponding to the program window of the application changes;

[0014] Rendering is performed based on the received data content to generate a desktop wallpaper matching the data content for display.

[0015] Optionally, the rendering based on the received data content includes: using a front-end rendering technology to render based on the received data content.

[0016] Optionally, at least one interactive element is displayed on the desktop wallpaper, and each interactive element is bound to a corresponding interactive event. The method also includes: in response to an interactive behavior initiated in the desktop wallpaper, determining a target interactive element corresponding to the interactive behavior; and sending the interactive event bound to the target interactive element to the application, so that the application updates the data content corresponding to its program window based on the received interactive event.

[0017] Optionally, determining the target interactive element corresponding to the interactive behavior includes: intercepting position information of the interactive behavior on the desktop wallpaper; and determining the target interactive element according to the position information and area information corresponding to each interactive element.

[0018] In a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

[0019] processor;

[0020] a memory for storing instructions executable by the processor;

[0021] The processor implements the method as described in any one of the first aspect or the second aspect by running the executable instructions.

[0022] In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the method described in any one of the first aspect or the second aspect is implemented.

[0023] In a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method described in any one of the first aspect or the second aspect.

[0024] The above embodiments of the present disclosure have at least the following beneficial effects:

[0025] When the application determines that the data content corresponding to its own program window has changed, the disclosed solution actively broadcasts the changed data content to each window in the window set. The window set includes a desktop wallpaper window, so the desktop wallpaper window can update the desktop wallpaper according to the received data content. In this way, the desktop wallpaper is updated in real time according to the changes in the data in the application, and it can be ensured that the content displayed by the desktop wallpaper is synchronized with the data content corresponding to the program window of the application. In addition, compared with the interface polling method, the broadcast message mechanism can significantly reduce the consumption of system resources and ensure system performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0027] Figure 1 is a schematic diagram of a system architecture provided by an exemplary embodiment;

[0028] Figure 2It is a flowchart of a method for interaction between a desktop wallpaper window and an application program provided by an exemplary embodiment;

[0029] Figure 3 is a schematic diagram of a process of screening and comparing wallpaper data content provided by an exemplary embodiment;

[0030] Figure 4 It is another interactive method diagram of a desktop wallpaper window and an application program provided by an exemplary embodiment;

[0031] Figure 5 is a schematic diagram of a desktop wallpaper showing interactive elements provided by an exemplary embodiment;

[0032] Figure 6 is a schematic diagram of determining a target interactive element provided by an exemplary embodiment;

[0033] Figure 7 It is a structural diagram of a desktop wallpaper window and an application program provided by an exemplary embodiment;

[0034] Figure 8 It is a flowchart of interaction between a desktop wallpaper window and an application program provided by an exemplary embodiment;

[0035] Fig. 9 It is a block diagram of a device for interacting a desktop wallpaper window with an application program provided by an exemplary embodiment;

[0036] Fig.10 It is a block diagram of another interactive device between a desktop wallpaper window and an application program provided by an exemplary embodiment;

[0037] Fig.11 is a schematic diagram of a readable storage medium corresponding to the above method provided by an exemplary embodiment;

[0038] Fig.12 It is a schematic diagram of an electronic device capable of implementing the above method provided by an exemplary embodiment.

[0039] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0040] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0041] Those skilled in the art know that the embodiments of the present disclosure can be implemented as a system, device, equipment, method or computer-readable storage medium. Therefore, the present disclosure can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0042] According to an embodiment of the present disclosure, a method for interaction between a desktop wallpaper window and an application program and a computer program product are proposed.

[0043] In this document, it should be understood that any number of elements in the drawings is for illustration and not limitation, and any naming is only for distinction and does not have any limiting meaning. In addition, the data involved in this disclosure may be data authorized by the user or fully authorized by all parties.

[0044] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.

[0045] Application Scenario Overview

[0046] In the scenario of dynamically generating desktop wallpapers based on the data content of an application, related technologies usually rely on the Electron framework to create a borderless window that is always at the top level, and obtain the data content from the application by calling a specific API interface. Subsequently, Canavas or WebGL technology is used in the window to generate a desktop wallpaper corresponding to the data content. However, this method requires the desktop wallpaper window to regularly poll the application through the API interface to obtain the latest data content. Due to the fixed polling frequency, the content displayed by the desktop wallpaper cannot be updated in real time and cannot accurately reflect the latest status of the data in the application. In addition, frequent polling operations will increase the load on the system, consume more system resources, and affect system performance.

[0047] It can be seen that in the scenario of dynamically generating desktop wallpapers based on the data content of an application, there may be a problem of not being able to ensure that the content displayed on the desktop wallpaper is synchronized with the data content of the application, and there may be a problem of excessive consumption of system resources.

[0048] It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario. SUMMARY OF THE INVENTION

[0050] In view of this, this specification provides a technical solution for the interaction between a desktop wallpaper window and an application program.

[0051] The core concept of this specification is: when the application determines that the data content corresponding to its own program window has changed, it actively broadcasts the changed data content to each window in the window set. The window set includes a desktop wallpaper window, so the desktop wallpaper window can update the desktop wallpaper according to the received data content. In this way, the desktop wallpaper is updated in real time according to the changes in the data in the application, which can ensure that the content displayed on the desktop wallpaper is synchronized with the data content corresponding to the program window of the application. In addition, compared with the interface polling method, the broadcast message mechanism can significantly reduce the consumption of system resources and ensure system performance.

[0052] Exemplary Methods

[0053] The following will (combined with Figure 1 The system architecture diagram shown in the figure) describes the technical concept of this specification in detail through specific embodiments.

[0054]

System Architecture

[0055] In the embodiments of the present disclosure, the terminal may be an electronic device used by a user. The terminal may specifically include but is not limited to a smart phone, a desktop computer, a tablet computer, a laptop computer, an e-book reader, a smart watch, a smart bracelet, and other electronic devices with certain computing capabilities, and the electronic device may run software or websites of instant messaging, social networking, gaming, education, and other categories, and may be applied to scenarios of multi-person audio and video calls.

[0056] The server may include a server, a server cluster formed by multiple servers, or a cloud server. The server may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0057] The terminal and the server may be connected directly or indirectly via wired communication or wireless communication, which is not particularly limited in the present disclosure.

[0058] based on Figure 1As shown in the system architecture diagram, the disclosed solution is mainly implemented on the terminal. The terminal includes a desktop wallpaper window and at least one application, and each application can update the desktop wallpaper in real time according to the data content of the application through the interactive method described in the present disclosure. When the data content of the application is not stored locally in the terminal, the required data content can be obtained from the server by sending a data sending request to the server.

[0059] The following will take the method of interacting between a desktop wallpaper window and an application provided by an embodiment of the present disclosure as an example for exemplary description. Figure 2 , Figure 2 This is a flowchart of a method for interaction between a desktop wallpaper window and an application provided by an exemplary embodiment. The method is applied to an application and may include the following steps:

[0060] Step 201: Determine whether the data content corresponding to the program window of the application program has changed.

[0061] The "application" described in this embodiment can be any application deployed on the terminal, such as shopping applications, entertainment applications, educational applications, and the like. The application can be an APP developed by the user and open sourced by the user, or it can be a ready-made software downloaded from an official application store. The present disclosure does not specifically limit the specific type and source of the application. The program window of an application refers to a way for the application to display its interface to the user, which provides the user with a visual operation area. The program window can be composed of frame elements provided by the operating system, and the frame elements may include a title bar, a border, a minimize or maximize control, and the like. In short, the application can be regarded as a behind-the-scenes worker, responsible for handling all necessary calculations and logic. The program window is the foreground performer, responsible for presenting the functions of the application in a user-friendly form and receiving instructions from the user. The application can interact with the user through the program window, and the program window provides an interface for the application to interact with the outside world.

[0062] The data content corresponding to the program window can be understood as the data content displayed in the program window. Taking a certain music APP as an example, the data content displayed in the program window of the music APP may include but is not limited to: relevant content of the song being played (such as song title, lyrics, singer, user comments, etc.), song data of major music charts. For this music APP, changes in the data content corresponding to its program window include playlist updates, song playback status changes, and so on. Exemplarily, one or more listeners can be set in the program window to monitor changes in the data content corresponding to the program window.

[0063] In some possible implementations, the data content corresponding to the program window can be updated based on an event trigger mechanism. The trigger event may include an interactive operation initiated by a user in the program window, and / or an interactive event from a desktop wallpaper window. The following describes these two types of trigger events:

[0064] Users can initiate interactive behaviors through controls (such as buttons, text boxes, etc.) in the program window, such as triggering the song switching control in the program window of the music APP to implement the song switching operation, triggering the pause control to implement the pause playback operation, etc. The application will respond to the interactive operation initiated by the user in the program window and update the data content corresponding to the program window. Specifically, the program window captures the user's interactive operation and encapsulates the relevant information (such as the type and parameters of the interactive operation) into a message or request and passes it to the core logic layer of the application. After receiving the aforementioned message or request, the application processes the business logic and updates the internal data structure. After the update is completed, the application will notify the program window to refresh the interface to reflect the latest data changes, thereby ensuring that the user sees the latest data content that matches the user's interactive operation. Taking the music APP as an example, the user can click the collection control in the program window of the music APP. The program window captures the interactive behavior and sends a request to the music APP, which carries information such as the ID of the collected song. After receiving the request, the music APP verifies the validity of the song ID and updates the collection record in the database. After the update is completed, the application notifies the program window to update the display content related to the collection, such as displaying the new number of collections or updating the status of the collection control. In this way, it is possible to update the data content corresponding to the program window in response to the interactive operation initiated by the user in the program window.

[0065] In addition, the present disclosure is to achieve the synchronization and update of the content displayed on the desktop wallpaper and the data content corresponding to the program window of the application. On this basis, some operating functions of the application can be further integrated into the desktop wallpaper to provide users with more convenient operating functions through the desktop wallpaper. For example, interactive elements can be displayed on the desktop wallpaper, so that users can directly perform quick operations on the application through the interactive elements on the desktop wallpaper. It should be noted that the display of interactive elements is only an example, and the present disclosure does not specifically limit the specific implementation method of the operating function of the integrated application on the desktop wallpaper. In this embodiment, the user can initiate an interactive operation in the desktop wallpaper window without opening the program window of the application to initiate the interactive behavior. The desktop wallpaper window can capture the user's interactive behavior, and determine the interactive event corresponding to the user's interactive behavior, and then send the interactive event to the application. The application can update the data content corresponding to the program window based on the received interactive event so that the updated data content can correspond to the user's interactive behavior.

[0066] In this embodiment, the update of the data content corresponding to the program window is triggered according to the user's interactive behavior, which can provide the user with instant visual feedback, flexibly meet the user's interactive needs, and enhance the user's sense of control and interactive experience. In addition, this method of updating the data content is only updated when the user initiates the interactive behavior, which reduces the load of the terminal and the application program and can avoid the jamming phenomenon caused by frequent data updates.

[0067] Step 202: when the data content changes, broadcast the changed data content to each window in the window set, wherein the window set includes a desktop wallpaper window, and the changed data content is used by the desktop wallpaper window to update the desktop wallpaper.

[0068] The window set may include only the desktop wallpaper window, or may include the desktop wallpaper window and other windows. The other windows may be program windows of other applications. When the application determines that the data content corresponding to its program window has changed, the changed data content may be broadcast to each window included in the window set. Exemplarily, the Rxlpc (Reactive Extensions Inter-Process Communication) library may be used to implement broadcast communication. The Rxlpc library is a cross-process communication library based on RxJS (Reactive Extensions for JavaScript) for implementing inter-process communication in applications. In essence, the Rxlpc library uses LocalStorage to implement cross-window communication. Of course, other communication mechanisms may also be used to implement broadcasting, which is not limited in the present disclosure.

[0069] The desktop wallpaper window generates a new desktop wallpaper based on the changed data content. It is understandable that the changed data content may contain a lot of information, and the data required to generate the desktop wallpaper may be a part of the changed data content. Therefore, after receiving the changed data content, the desktop wallpaper window can filter out the data required to generate the desktop wallpaper, and then generate the desktop wallpaper based on the filtered data. The desktop wallpaper in this embodiment can be any one of a static wallpaper or a dynamic wallpaper, and those skilled in the art can set the wallpaper type according to actual needs.

[0070] In the above embodiment, when the application determines that the data content corresponding to its own program window has changed, it actively broadcasts the changed data content to each window in the window set. The window set includes a desktop wallpaper window, so the desktop wallpaper window can update the desktop wallpaper according to the received data content. In this way, the desktop wallpaper is updated in real time according to the changes in the data in the application, and it can be ensured that the content displayed by the desktop wallpaper is synchronized with the data content corresponding to the program window of the application. In addition, compared with the interface polling method, the broadcast message mechanism can significantly reduce the consumption of system resources and ensure system performance.

[0071] In some possible implementations, the application can obtain the changed data content locally, or obtain the changed data content from the server. Generally, the data content of the application can be cached locally in the application, or it can be cached locally in the terminal where the application is located. Caching locally in the application means storing the data content of the application in the running environment of the application, and caching locally in the terminal means storing the data content of the application in the storage system of the terminal device where it is located. Taking the music APP as an example, the current playlist, recently played songs, user operation history, etc. can be cached locally in the application to quickly respond to user interaction behaviors. Larger resources such as downloaded song files and cover pictures can be cached locally in the terminal to ensure that users can play music without a network connection.

[0072] Therefore, when the application determines that the data content corresponding to its program window has changed, it can first query whether the changed data content exists locally (including the application local and the terminal local). If the changed data content exists locally, the changed data content can be directly obtained from the local and broadcast to each window in the window set. In this way, the efficiency of obtaining the changed data content can be significantly improved, thereby improving the real-time and efficiency of desktop wallpaper updates.

[0073] If the changed data content does not exist locally, a data acquisition request can be sent to the server, so that the server can send the changed data content to the terminal where the application is located in response to the data acquisition request. Then, the application can broadcast the data content from the server to each window in the window set. This method does not require the local storage of massive data content, reducing the local storage burden. In addition, by obtaining the changed data content from the server, the latest and accurate data content can be obtained, which helps to improve the effectiveness of the generated desktop wallpaper.

[0074] In some possible implementations, the changed data content may include a lot of data content, and the wallpaper data content used to generate the desktop wallpaper may be a part of it. Therefore, before broadcasting the changed data content, the application can filter out the wallpaper data content used to generate the desktop wallpaper from the changed data content, and then compare the filtered wallpaper data content with the cached historical wallpaper data content. The historical wallpaper data content refers to the wallpaper data content that the application last broadcast to each window in the window set. It should be noted that the present disclosure does not specifically limit the specific implementation method of the above-mentioned data screening and comparison. For example, a message filter can be deployed in the application, and the historical wallpaper data content can be stored in the message filter. Figure 3 FIG. 1 is a flow chart of a method for screening and comparing wallpaper data content provided by an exemplary embodiment. Figure 3 As shown, the process may include the following steps:

[0075] S301: configuring the data fields that the desktop wallpaper window needs to subscribe to in the message filter.

[0076] S302: Constructing buffer data according to the configured data fields.

[0077] The historical wallpaper data content can be searched from the historical broadcast data content according to the configured data field, and the found historical wallpaper data content is used as the cache area data. It should be noted that the two steps S301 and S302 can be executed during the interaction between the application and the desktop wallpaper window, or can be executed in advance before the interaction.

[0078] S303: Filter out wallpaper data content from the changed data content.

[0079] S304: Determine whether the filtered wallpaper data content is the same as the historical wallpaper data content in the cache area.

[0080] Exemplarily, a diff comparison can be performed between the filtered wallpaper data content and the cached historical wallpaper data content. If the comparison result shows that the filtered wallpaper data content is different from the historical wallpaper data content, it means that the desktop wallpaper needs to be updated. In this case, it can jump to S305. If the comparison result shows that the filtered wallpaper data content is the same as the historical wallpaper data content, it means that the desktop wallpaper does not need to be updated. In this case, there is no need to broadcast the filtered wallpaper data content, and the process ends directly.

[0081] S305: broadcasting the filtered wallpaper data content to each window, and storing the filtered wallpaper data content to use it for data comparison in the next broadcast.

[0082] S306: The desktop wallpaper window may be rendered based on the received wallpaper data content to generate a new desktop wallpaper.

[0083] In addition, the application can also choose to cache historical data content instead of just caching wallpaper data content. Before broadcasting the changed data content, the changed data content can also be compared with the cached historical data content. Historical data content refers to the data content broadcast by the application last time. If the comparison result shows that the two are the same, there is no need to broadcast. If the comparison result shows that the two are not the same, it is determined whether the different parts include wallpaper data content used to generate desktop wallpaper. If the different parts include wallpaper data content, it means that the desktop wallpaper needs to be updated, and the application can broadcast the changed data content obtained this time to each window, and store the changed data content obtained this time. If the different parts do not include wallpaper data content, it means that the desktop wallpaper does not need to be updated and the application does not need to broadcast.

[0084] In this embodiment, before the application broadcasts the changed data content, the wallpaper data content is compared with the historical wallpaper data content, and whether to broadcast the wallpaper data content is determined based on the comparison result. In this way, the amount of data that the desktop wallpaper window needs to receive and process can be reduced, and the frequent message processing of the desktop wallpaper window can be reduced. The desktop wallpaper is updated only when the wallpaper data content changes, thereby ensuring real-time update of the desktop wallpaper and further reducing the consumption of system performance.

[0085] In some possible implementations, the desktop wallpaper window can generate desktop wallpaper using front-end rendering technology. Front-end rendering technology refers to the use of Web technology (such as HTML, CSS, JavaScript) to create and update visual content directly on the user interface. The desktop wallpaper window can perform front-end rendering based on the received changed data content to generate a new desktop wallpaper. Compared with the related art of drawing desktop wallpapers by off-screen rendering, all rendering work in this embodiment is performed in the foreground, which can not only improve the generation efficiency of desktop wallpapers, but also further reduce the consumption of system performance. In addition, in the case where the desktop wallpaper can provide user interaction functions, the desktop wallpaper is generated by front-end rendering technology, and real-time interaction with users can be achieved based on user interaction behaviors, thereby enhancing the user's interactive experience.

[0086] Corresponding to the above-mentioned interaction method on the application side, in another embodiment of the present disclosure, a desktop wallpaper window interaction method is also provided. Figure 4 , Figure 4 This is a flowchart of a method for interaction between a desktop wallpaper window and an application provided by an exemplary embodiment. The method is applied to a desktop wallpaper window, and the method may include the following steps:

[0087] Step 401: receiving data content broadcast by an application, wherein the data content is broadcast by the application when the data content corresponding to the program window of the application changes.

[0088] For related content in this step, please refer to Figure 2 The embodiments shown will not be described in detail here.

[0089] Step 402: Rendering is performed based on the received data content to generate a desktop wallpaper matching the data content for display.

[0090] The desktop wallpaper generated in this embodiment can be a static wallpaper or a dynamic wallpaper. Compared with the method in the related art in which the desktop wallpaper window calls an interface to poll to obtain data content, in this embodiment, the desktop wallpaper window only needs to receive the data content broadcast by the application and generate the desktop wallpaper based on the received data content, which greatly reduces the workload of the desktop wallpaper window. In addition, this method effectively improves the real-time performance of updating the desktop wallpaper, and can ensure that the content displayed by the desktop wallpaper is synchronized with the data content corresponding to the program window of the application. In addition, the broadcast message mechanism can significantly reduce the consumption of system resources and ensure system performance.

[0091] In some possible implementations, the desktop wallpaper window can generate desktop wallpaper using front-end rendering technology. That is, the desktop wallpaper window can perform front-end rendering based on the received changed data content to generate a new desktop wallpaper. Compared with the related art of drawing desktop wallpaper by off-screen rendering, all rendering work in this embodiment is performed in the foreground, which can not only improve the generation efficiency of desktop wallpaper, but also further reduce the consumption of system performance. In addition, in the case where the desktop wallpaper can provide user interaction functions, generating desktop wallpaper through front-end rendering technology can achieve real-time interaction with users according to user interaction behaviors, thereby improving the user's interactive experience.

[0092] In some possible implementations, at least one interactive element may be displayed on the generated desktop wallpaper, and each interactive element is bound to a corresponding interactive event. The interactive element may be a control, an input box, a gesture operation, and the like. The disclosure does not specifically limit the display form, meaning, and display position of the interactive element. An interactive event may be understood as an event triggered by a user's interactive behavior. For example, the user's behavior of pausing playback corresponds to the interactive event of pausing playback, and the user's interactive behavior of sliding to view comments corresponds to the interactive event of scrolling to display comments. Figure 5 FIG. 1 is a schematic diagram of a desktop wallpaper showing interactive elements provided by an exemplary embodiment. Figure 5As shown, taking the music APP as an example, the content displayed on the desktop wallpaper may include interactive elements (such as pause controls, song switching controls), comments on the currently playing song, and wallpaper backgrounds generated based on the cover of the currently playing song. The above is only an example, and the desktop wallpaper may also display playlists, lyrics, popular songs, or content related to the currently playing song, which is not limited by the present disclosure.

[0093] When a user initiates an interactive behavior on the desktop wallpaper, the desktop wallpaper window can respond to the interactive behavior and determine the target interactive element corresponding to the interactive behavior. Figure 5 When a sliding gesture operation is performed on the song comment area in the desktop wallpaper window, the desktop wallpaper window can determine that the interactive behavior corresponds to switching the comment target interactive element. Then, the desktop wallpaper window can send the interactive event bound to the target interactive element to the application. The application can update the data content corresponding to its program window according to the received interactive event. Then, the application can broadcast the updated data content to the desktop wallpaper window, so that the desktop wallpaper window generates a new desktop wallpaper based on the updated data content. For the user, what he can perceive is: in Figure 5 After initiating a sliding gesture operation in the song comment area in Figure 5 The comments shown are transformed into other comments of the song "123456", thus realizing a quick comment viewing function.

[0094] In this embodiment, the user can directly perform quick functional operations on the application through the interactive elements on the desktop wallpaper, which greatly improves the fun and convenience of user interaction.

[0095] In some possible implementations, since the desktop wallpaper window is usually located at the top layer of the device display layer, when the user initiates an interactive behavior on the desktop wallpaper, there may be a problem of grabbing focus between the desktop wallpaper and the application on the desktop. At the device operating system level, "focus" refers to the window or element to which the user's interactive behavior is directed. Usually, only the window with focus can receive and process the user's input. When it comes to "grabbing focus", it means that two or more programs try to get control of the user's input at the same time, which may lead to unexpected behavior. For example, a program may interrupt another program in use and automatically put itself in the foreground, thereby interfering with the user's operation. For the desktop wallpaper window and the desktop application, if the desktop wallpaper window tries to process input events such as mouse clicks, it may compete with the desktop application layer for focus. For example, when a user clicks an icon or window on the desktop, the user originally hopes that the click event will be received by the target application. But if the desktop wallpaper window is also listening to these click events, it may intercept these events by mistake, resulting in the click event not being passed to the correct application, and the operation originally desired by the user cannot be achieved.

[0096] In view of this, the present embodiment proposes a solution in which the desktop wallpaper window determines the target interactive element by intercepting the location information of the interactive behavior. It can be understood that each interactive element on the desktop wallpaper has corresponding area information, and the area information represents the boundary range of the corresponding interactive element. In other words, each interactive element corresponds to a wallpaper area. When a user initiates an interactive behavior on the desktop wallpaper, the desktop wallpaper window can intercept the location information of the interactive behavior on the desktop wallpaper. Exemplarily, the location information can be coordinate information, represented by (x, y). It should be noted that the present disclosure does not particularly limit the specific interception technology. Furthermore, the desktop wallpaper window can traverse the area information corresponding to each interactive element to determine which interactive element's corresponding area the position represented by the location information falls within. The determined interactive element is used as the target interactive element.

[0097] Figure 6 FIG. 1 is a schematic diagram of determining a target interactive element provided by an exemplary embodiment. Figure 6 As shown, the process may include the following steps:

[0098] S601: The desktop wallpaper window intercepts the location information of the user interaction behavior on the desktop wallpaper.

[0099] User interaction behavior can be understood as user interaction operations.

[0100] S602: The desktop wallpaper window traverses the DOM elements according to the position information, and ends the traversal when the query result is empty.

[0101] In this embodiment, a DOM tree (Document Object Model Tree) is used to construct the correspondence between the interactive elements and the region information. Each DOM node represents an interactive element, and the node information of each DOM node includes the region information corresponding to the corresponding interactive element.

[0102] S603: For any DOM node, determine, according to the node information of the DOM node, whether the location information of the interactive behavior falls within the wallpaper area corresponding to the DOM node.

[0103] If yes, jump to S604; if no, jump to S602 to re-query the next DOM node.

[0104] S604: Determine the interactive event bound to the current DOM node.

[0105] The current DOM node refers to the node whose location information of the interactive behavior falls within its corresponding wallpaper area. By determining the current DOM node, the target interactive element can be determined, and then the interactive event bound to the target interactive element can be determined.

[0106] In this embodiment, the desktop wallpaper window does not intercept user interaction behavior, but intercepts the location information of user interaction behavior. At the same time, the application on the desktop can capture the user interaction behavior. In this way, the desktop wallpaper window can determine the target interaction element that needs to be responded to based on the intercepted location information, and the desktop application can perform corresponding processing according to the captured user interaction behavior, thereby realizing parallel processing of the desktop application and the desktop wallpaper window, without affecting each other, and avoiding the problem that the desktop application cannot process the corresponding event of the user interaction behavior due to the desktop wallpaper window grabbing the focus.

[0107] Figure 4 The embodiment shown describes the specific implementation process of the disclosed solution from the perspective of the desktop wallpaper window. Figure 2 Corresponding to the technical solution based on the application perspective in the illustrated embodiment, the disclosed solution realizes a complete interactive process by cooperating with the desktop wallpaper window. Figure 2 All descriptions related to the desktop wallpaper window in the process of obtaining data content, determining interactive events, generating wallpapers, etc. in the illustrated embodiment are also applicable to Figure 4 The illustrated embodiments will not be described in detail here.

[0108] Figure 7 This is a schematic diagram of the structure of a desktop wallpaper window and an application program provided by an exemplary embodiment. Figure 7In , you can rely on the CEF (Chromium Embedded Framework) framework to create a desktop wallpaper window. The desktop wallpaper window is embedded with a CEF container, which is used to intercept the location information of user interaction behavior. Figure 7 The structure shown, Figure 8 This is a flowchart of the interaction between a desktop wallpaper window and an application provided by an exemplary embodiment, and the interaction process involves the desktop wallpaper window and the application. Figure 8 As shown, the above interaction process may include the following steps:

[0109] S801: The CEF container embedded in the desktop wallpaper window intercepts the location information of the interactive behavior.

[0110] S802: The desktop wallpaper window determines the target interactive element according to the intercepted position information and the area information corresponding to each interactive element.

[0111] S803: The desktop wallpaper window sends the interaction event bound to the target interactive element to the application program.

[0112] S804: The application updates the data content corresponding to its program window based on the received interaction event.

[0113] S805: The application sends the updated data content to the internally integrated message filter.

[0114] S806: The message filter selects wallpaper data content from the updated data content, and compares whether the wallpaper data content is the same as the cached historical wallpaper data content.

[0115] S807: When the filtered wallpaper data content is different from the cached historical wallpaper data content, the application program broadcasts the filtered wallpaper data content to the desktop wallpaper window.

[0116] S808: The desktop wallpaper window is rendered based on the received wallpaper data content to generate a new desktop wallpaper.

[0117] In this embodiment, not only can the content displayed on the desktop wallpaper be kept highly synchronized with the data content corresponding to the program window of the application, so as to display real-time application information to the user through the desktop wallpaper, but also some operating functions of the application can be integrated into the desktop wallpaper to provide users with faster operations. For example, the operating functions of the music APP are integrated into the desktop wallpaper, and the user can directly trigger the interactive elements on the desktop wallpaper to implement operations such as switching songs, playing, pausing songs, and viewing comments.

[0118] Exemplary Devices

[0119] In an exemplary embodiment of the present disclosure, a device for interacting a desktop wallpaper window with an application is also provided.

[0120] See also Fig. 9 , Fig. 9 The block diagram of an interactive device between a desktop wallpaper window and an application program provided by an exemplary embodiment can be applied to an application program.

[0121] like Fig. 9 As shown, the interactive device 900 for the desktop wallpaper window and the application program may include: a determination module 901 and a broadcast module 902. Among them:

[0122] The determination module 901 is used to determine whether the data content corresponding to the program window of the application program has changed;

[0123] The broadcast module 902 is used to broadcast the changed data content to each window in the window set when the data content changes, wherein the window set includes a desktop wallpaper window, and the changed data content is used by the desktop wallpaper window to update the desktop wallpaper.

[0124] In one embodiment, the device further comprises:

[0125] The updating module 903 is used to update the data content in response to an interactive operation initiated in the program window; and / or to receive an interactive event from the desktop wallpaper window to update the data content.

[0126] In one embodiment, when the changed data content is stored locally, the changed data content is obtained locally; when the changed data content is not stored locally, the changed data content is sent by the server in response to a corresponding request from the terminal where the application is located.

[0127] In one embodiment, the device further includes: a comparison module 904, which is used to filter out wallpaper data content used to generate desktop wallpaper from the changed data content before broadcasting the changed data content; compare the wallpaper data content with cached historical wallpaper data content, where the historical wallpaper data content is the wallpaper data content broadcasted by the application last time;

[0128] The broadcast module 902 is specifically used for: when the comparison result shows that the wallpaper data content is different from the historical wallpaper data content, broadcasting the wallpaper data content to each window and storing the wallpaper data content; and when the comparison result shows that the wallpaper data content is the same as the historical wallpaper data content, not broadcasting the wallpaper data content.

[0129] In one embodiment, the desktop wallpaper is generated by the desktop wallpaper window using a front-end rendering technology.

[0130] See also Fig.10 , Fig.10 The block diagram of an interactive device between a desktop wallpaper window and an application program provided by an exemplary embodiment can be applied to a desktop wallpaper window.

[0131] like Fig.10 As shown, the interactive device 1000 for the desktop wallpaper window and the application program may include: a receiving module 1001 and a rendering module 1002. Among them:

[0132] The receiving module 1001 is used to receive data content broadcast by an application, where the data content is broadcast by the application when the data content corresponding to the program window changes;

[0133] The rendering module 1002 is used to perform rendering based on the received data content to generate a desktop wallpaper matching the data content for display.

[0134] In one embodiment, the rendering module 1002 is specifically used to: use front-end rendering technology to render based on the received data content.

[0135] In one embodiment, at least one interactive element is displayed on the desktop wallpaper, each interactive element is respectively bound to a corresponding interactive event, and the device further includes:

[0136] The sending module 1003 is used to determine the target interactive element corresponding to the interactive behavior in response to the interactive behavior initiated in the desktop wallpaper; and send the interactive event bound to the target interactive element to the application so that the application updates the data content corresponding to its program window based on the received interactive event.

[0137] In one embodiment, determining the target interactive element corresponding to the interactive behavior includes: intercepting position information of the interactive behavior on the desktop wallpaper; and determining the target interactive element according to the position information and area information corresponding to each interactive element.

[0138] The specific details of each module of the above-mentioned desktop wallpaper window and application interaction device 900 and desktop wallpaper window and application interaction device 1000 have been described in detail in the previous description of the desktop wallpaper window and application interaction method process, so they are not repeated here.

[0139] It should be noted that, although several modules or units of the interactive device 900 for desktop wallpaper window and application program and the interactive device 1000 for desktop wallpaper window and application program are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0140] Exemplary Media

[0141] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0142] See also Fig.11 , Fig.11 It is a schematic diagram of a readable storage medium corresponding to a method for interacting a desktop wallpaper window with an application program provided by an exemplary embodiment.

[0143] refer to Fig.11 As shown, a readable storage medium 1100 for implementing the above method according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the readable storage medium of the present disclosure is not limited thereto. In the present disclosure, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0144] The readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0145] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0146] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0147] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0148] Exemplary Electronic Devices

[0149] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned method for interacting between a desktop wallpaper window and an application is also provided.

[0150] See also Fig.12 , Fig.12 It is a schematic diagram of an electronic device capable of implementing the above method provided by an exemplary embodiment.

[0151] Refer to the following Fig.12 1200 according to this embodiment of the present disclosure is described. Fig.12 The electronic device 1200 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0152] like Fig.12As shown, the electronic device 1200 is in the form of a general computing device. The components of the electronic device 1200 may include but are not limited to: at least one processing unit 1201, at least one storage unit 1202, and a bus 1203 connecting different system components (including the storage unit 1202 and the processing unit 1201).

[0153] The storage unit stores program codes, and the program codes can be executed by the processing unit 1201, so that the processing unit 1201 executes the steps of the above-mentioned various embodiments of this specification.

[0154] The storage unit 1202 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 12021 and / or a cache storage unit 12022 , and may further include a read-only storage unit (ROM) 12023 .

[0155] The storage unit 1202 may also include a program / utility 12024 having a set (at least one) of program modules 12025, such program modules 12025 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the reality of a network environment.

[0156] The bus 1203 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0157] The electronic device 1200 may also communicate with one or more external devices 1204 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1200, and / or communicate with any device that enables the electronic device 1200 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1205. Furthermore, the electronic device 1200 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1206. As shown, the network adapter 1206 communicates with other modules of the electronic device 1200 via a bus 1203. It should be understood that although Fig.12 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0158] Exemplary computer program products

[0159] In an exemplary embodiment of the present disclosure, a computer program product is further provided, including a computer program / instruction, which implements the steps of the method described in any of the above embodiments when executed by a processor.

[0160] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0161] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0162] It should be noted that, although several units / modules or subunits / modules of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0163] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0164] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.

Claims

1. A method for interaction between a desktop wallpaper window and an application, characterized in that: The method is applied to an application program, and the method comprises: Determining whether data content corresponding to the program window of the application program has changed; When the data content changes, the changed data content is broadcast to each window in the window set, wherein the window set includes a desktop wallpaper window, and the changed data content is used by the desktop wallpaper window to update the desktop wallpaper.

2. The method according to claim 1, characterized in that Also includes: In response to an interactive operation initiated within the program window, updating the data content; and / or, Receive an interaction event from the desktop wallpaper window and update the data content.

3. The method according to claim 1, characterized in that In the case where the changed data content is stored locally, the changed data content is obtained locally; In the case that the changed data content is not stored locally, the changed data content is sent by the server in response to a corresponding request of the terminal where the application is located.

4. The method according to claim 1, characterized in that: The method further includes: before broadcasting the changed data content, filtering out wallpaper data content used to generate desktop wallpaper from the changed data content; comparing the wallpaper data content with cached historical wallpaper data content, the historical wallpaper data content being the wallpaper data content broadcasted by the application last time; The method of broadcasting the changed data content to each window in the window set includes: when a comparison result shows that the wallpaper data content is different from the historical wallpaper data content, broadcasting the wallpaper data content to each window and storing the wallpaper data content; and when the comparison result shows that the wallpaper data content is the same as the historical wallpaper data content, not broadcasting the wallpaper data content.

5. The method according to claim 1, characterized in that The desktop wallpaper is generated by the desktop wallpaper window using front-end rendering technology.

6. A method for interacting a desktop wallpaper window and an application, characterized in that: The method is applied to a desktop wallpaper window, and the method comprises: receiving data content broadcast by an application, wherein the data content is broadcast by the application when the data content corresponding to the program window of the application changes; Rendering is performed based on the received data content to generate a desktop wallpaper matching the data content for display.

7. The method according to claim 6, characterized in that At least one interactive element is displayed on the desktop wallpaper, and each interactive element is respectively bound to a corresponding interactive event. The method further includes: In response to an interactive behavior initiated in the desktop wallpaper, determining a target interactive element corresponding to the interactive behavior; The interactive event bound to the target interactive element is sent to the application, so that the application updates the data content corresponding to its program window based on the received interactive event.

8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor implements the method according to any one of claims 1 to 7 by running the executable instructions.

9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.