Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example one
Referring to fig. 1, a flowchart of a method for displaying a dynamic desktop background according to a first embodiment of the present invention is shown, which may specifically include the following steps:
step 101, receiving a dynamic desktop background generation request sent by a user;
in the embodiment of the present invention, after the mobile terminal starts the display screen, the user interface of the windows Aero (interactive informational Reflective Open) of the display terminal receives the dynamic desktop background generation request, and displays the user interaction interface, that is, the display of the desktop background and the application icon.
For example, as shown in fig. 1A, a dynamic desktop background generation request may be sent to a windows adaptive Reflective Open (windows) of a display terminal according to an APP Rolling icon (i.e., a dynamic desktop background generation application).
Step 102, prompting a user to select an icon to be displayed on the dynamic desktop background according to the generation request; the icons to be displayed comprise application icons or image icons;
in the embodiment of the present invention, after the terminal receives a dynamic desktop background generation request sent by the APP Rolling icon to the windows Aero (adaptive informational Reflective Open) of the display terminal, the desktop application APP list is displayed according to the request, as shown in fig. 1B, the user selects an icon to be displayed, which needs to be added to the dynamic desktop background, through touch operation.
Of course, as shown in fig. 1B and 1C, the icon to be displayed may be an application icon or an image icon.
It is to be understood that the icon to be displayed may also be a folder icon, or any other icon that can be displayed as a dynamic desktop background, and embodiments of the present invention are not limited thereto.
103, extracting the dynamic display file of the application icon or the image icon stored in the preset cache pool;
in the embodiment of the invention, the dynamic display file of the icon to be displayed, which is stored in the preset cache pool, is extracted according to the icon to be displayed, wherein the preset cache pool is arranged in the mobile terminal system and is specially used for storing the desktop display file, and the desktop display file not only comprises a desktop background file, but also comprises a desktop icon display style file, a display effect file and the like.
It can be understood that the parameters related to the display effect are stored in each display file to achieve different display effects of the desktop background and the desktop icon, and the parameters of the icons for achieving different physical dynamic effects are different, which is not specifically limited by the embodiment of the present invention.
104, if the preset cache pool is empty, acquiring physical data of the application icon or the image icon, wherein the physical data at least comprises displacement, rotation and scaling data displayed by the application icon or the image icon according to the gravity sensing data of the mobile terminal;
in the embodiment of the invention, if the dynamic desktop background is generated according to the selected icon to be displayed for the first time, or a newly added desktop background and a newly added icon to be displayed are set according to a user, when the dynamic desktop background is generated, the dynamic display file corresponding to the icon to be displayed cannot be stored in the preset cache pool, and then the preset cache pool is empty.
It can be understood that the preset cache pool only caches the dynamic display files of the icons to be displayed within a certain time period, and if the cache is overtime, the dynamic display files of the icons to be displayed are deleted, so that if a request for generating a dynamic desktop background of a corresponding icon to be displayed is not received for a long time, the corresponding cached dynamic display files of the icons to be displayed are deleted by the cache pool, and the preset cache pool is empty. The embodiment of the present invention is not limited to the data buffering time of the preset buffer pool.
When the dynamic display file corresponding to the icon to be displayed is unsuccessfully extracted from the preset cache pool, the physical data of the icon to be displayed which needs to be displayed currently is obtained, wherein the physical data mainly comprises gravity sensing data for displaying the desktop icon effect, displacement, rotation, scaling data and the like of the application icon.
It is to be understood that the physical data is not limited to the above description, and the embodiment of the present invention does not impose limitations thereon.
105, generating a physical dynamic effect file of the application icon or the image icon according to the physical data;
in the embodiment of the invention, the dynamic effect file of the icon to be displayed is generated according to the extracted physical data of the current desktop.
For example, a physical operation module or a physical engine is added before the icon dynamic desktop background generation module in the desktop application, and the module is written by using a low-level C language and is accessed into the application through JNI (just noticeable information), so that the operation performance is improved, and the icons generate displacement, rotation and zooming effects; and after the current gravity direction of the mobile phone is obtained through the mobile phone gravity sensing module, adjusting the gravity direction vector of the physical space, and generating a dynamic effect file of the icon to be displayed according to the specific parameters.
The physical engine is written by using a low-level language, and the floating point operation efficiency is improved by fully utilizing bottom hardware resources, so that the physical simulation performance is improved. The use of the cache pool reduces the time for destroying and creating the rigid body object, and can also improve the overall operation efficiency. The physical performance is improved, and the number of rigid bodies can be more, so that the phenomenon of frame loss caused by excessive consumption of a CPU (Central processing Unit) can be avoided.
And 106, rendering the physical dynamic effect file on the desktop, and generating a dynamic desktop background with displacement, rotation and zooming effects displayed by the application icon or the image icon according to the gravity sensing data of the mobile terminal.
In the embodiment of the invention, taking an Android system as an example, after the Android system is started, system processes such as Zygote, ServiceManager, SystemServer and the like are started, and Binder initialization is completed in the ServiceManager process; the system services such as ActivityManagerService, WindowManagerService, PackageManagerService and the like in the SystemServer process are registered in the ServiceManager; and finally, launching the Launcher desktop application, wherein the Launcher is an application program and runs in a process of the Launcher, and the visible desktop is an Activity in the Launcher, so that the rendering process is also an Activity in the desktop display.
Specifically, after the extracted physical data is generated into a dynamic effect file of the icons to be displayed, the dynamic effect file is rendered into the desktop according to the parameters corresponding to each icon included in the dynamic effect file and displayed through a Launcher, wherein the dynamic effect file is mapped into the desktop area of each application icon to be displayed according to the gravity sensing data of the mobile terminal, the gravity direction of the application is changed through the gravity sensing of the mobile terminal, and the moving and rolling effects of the icons on the desktop are achieved.
In the embodiment of the invention, a request is generated by receiving a dynamic desktop background sent by a user; prompting a user to select an icon to be displayed on the dynamic desktop background according to the generation request; the icons to be displayed comprise application icons or image icons; extracting the dynamic display file of the application icon or the image icon stored in the preset cache pool; if the preset cache pool is empty, acquiring physical data of the application icon or the image icon, wherein the physical data at least comprises displacement, rotation and scaling data displayed by the application icon or the image icon according to the gravity sensing data of the mobile terminal; generating a physical dynamic effect file of the application icon or the image icon according to the physical data; rendering the physical dynamic effect file on the desktop, and generating a dynamic desktop background of displacement, rotation and zooming effects displayed by the application icon or the image icon according to the gravity sensing data of the mobile terminal. The method and the device have the advantages that the desktop icon dynamic display file is generated by acquiring the physical data of the application corresponding to the desktop icon, so that the dynamic effect of the desktop icon is displayed.
Example two
Referring to fig. 2, a flowchart of a method for displaying a dynamic desktop background according to a second embodiment of the present invention is shown, which may specifically include the following steps:
step 201, receiving a dynamic desktop background generation request sent by a user;
this step is the same as step 101 and will not be described in detail here.
Step 202, prompting a user to select an icon to be displayed on the dynamic desktop background according to the generation request; the icons to be displayed comprise application icons or image icons;
this step is the same as step 102 and will not be described in detail here.
Step 203, extracting the dynamic display file of the application icon or the image icon stored in the preset cache pool;
this step is the same as step 103 and will not be described in detail here.
Step 203A, if the preset cache pool is empty, acquiring physical data of the application icon or the image icon, wherein the physical data at least comprises displacement, rotation and scaling data displayed by the application icon or the image icon according to the gravity sensing data of the mobile terminal;
this step is the same as step 104 and will not be described in detail here.
In step 203B, if the preset cache pool is not empty, releasing a memory required for acquiring the physical data of the application icon or the image icon.
Specifically, when the dynamic display file of the icon to be displayed in the preset cache pool is successfully extracted, that is, the preset cache pool is not empty, the memory required for acquiring the physical data of the application icon is released, so that unnecessary memory occupation is reduced.
Step 204, generating a physical dynamic effect file of the application icon or the image icon according to the physical data;
this step is the same as step 105 and will not be described in detail.
Step 205, rendering the physical dynamic effect file to the desktop, and generating a dynamic desktop background of the displacement, rotation and zooming effects exhibited by the application icon or the image icon according to the gravity sensing data of the mobile terminal.
Specifically, as shown in fig. 2A-2B, when the icon to be displayed is an application icon, by acquiring physical data of the icon to be displayed, a background desktop dynamic effect that the icon rolls on the desktop along with the movement of the mobile terminal is realized; as shown in fig. 2C, when the icon to be displayed is an image icon, by acquiring physical data of the icon to be displayed, a background desktop dynamic effect that the image icon rolls on the desktop along with the movement of the mobile terminal is realized.
Of course, as shown in fig. 2D, the dynamic desktop display background does not affect the display of the normal desktop icon, but only displays the dynamic effect of the icon to be displayed as the background.
Step 206, storing the physical dynamic effect file of the application icon or the image icon in the preset cache pool.
Specifically, the generated dynamic display file of the icon to be displayed is stored in the preset cache pool, so that when the icon to be displayed needs to be displayed next time, the corresponding dynamic display file is directly extracted from the preset cache pool, dynamic effect rendering of the icon to be displayed is performed, and the corresponding dynamic display file does not need to be generated again every time when the icon to be displayed display request is received.
Preferably, after step 205, further comprising:
step 207, receiving a dynamic desktop background closing request sent by the user.
Specifically, when a multi-screen icon of the mobile terminal is switched, a mobile phone screen is closed, or a display effect of a current dynamic desktop background is explicitly closed, it is considered that a closing request of the current dynamic desktop background is received.
And 208, acquiring the dynamic display file of the application icon or the image icon in the dynamic desktop background according to the closing request, and storing the dynamic display file in the preset cache pool.
Specifically, after receiving a closing request of a current dynamic desktop background, the current desktop enters a dormant state, a dynamic display file of the dynamic desktop background of the desktop is obtained and stored in a preset cache pool, and the dynamic display file is called again when the dynamic desktop background is awakened to perform desktop rendering, so that the dynamic desktop background is generated.
It can be understood that, when the multi-screen icons are switched, the current desktop state is in the dormant state, and after the next-screen icon is switched, the dynamic display file of the icon to be displayed cached before can be reused from the preset cache pool, and the state of the dynamic display file can be activated to directly perform rendering display.
The position and the state of the screen icon after switching are consistent with the position and the state of the screen icon before switching, so that a dynamic display file of the icon to be displayed of the previous screen stored in a preset cache pool can be directly started for rendering the dynamic display effect of the current dynamic desktop background, the repeated creation and destruction of physical data are reduced, the utilization rate of a memory is greatly improved, the occupation of CPU (Central processing Unit) resources caused by creation and destruction is reduced, and the problem of screen blocking during switching is solved.
Preferably, after step 205, further comprising:
step 209, receiving a touch operation of the user on the application icon or the image icon on the dynamic desktop background;
specifically, the user may wake up an icon in the dynamic desktop background for performing a dynamic display effect through a touch operation, as shown in fig. 2E, for example, the user wakes up a picture icon in the dynamic desktop background through a click operation, then the picture content is displayed, and further operation is performed.
Step 210, displaying an application corresponding to the application icon or an image corresponding to the image icon according to the touch operation.
Specifically, if the user wakes up an application icon in the dynamic desktop background through a click operation, the application content is presented and further operations can be performed.
It can be understood that the touch operation received in the background of the dynamic desktop and the touch operation of the desktop icon may be distinguished from each other, so as to prevent the dynamic picture and the static picture on the same desktop display position from overlapping, which may cause inaccurate touch operation.
In the embodiment of the invention, a request is generated by receiving a dynamic desktop background sent by a user; prompting a user to select an icon to be displayed on the dynamic desktop background according to the generation request; the icons to be displayed comprise application icons or image icons; if the preset cache pool is empty, acquiring physical data of the application icon or the image icon, wherein the physical data at least comprises displacement, rotation and scaling data displayed by the application icon or the image icon according to the gravity sensing data of the mobile terminal; and if the preset cache pool is not empty, releasing the memory required for acquiring the physical data of the application icon or the image icon. Generating a physical dynamic effect file of the application icon or the image icon according to the physical data; rendering the physical dynamic effect file on the desktop, and generating a dynamic desktop background of displacement, rotation and zooming effects displayed by the application icon or the image icon according to the gravity sensing data of the mobile terminal. And the dynamic display file of the icon to be displayed is stored in the preset cache pool. And receiving a dynamic desktop background closing request sent by a user. And acquiring the dynamic display file of the application icon or the image icon in the dynamic desktop background according to the closing request, and storing the dynamic display file in the preset cache pool. The method and the device have the advantages that the desktop icon dynamic display file is generated by acquiring the physical data of the application corresponding to the desktop icon to display the dynamic effect of the desktop icon, and the dynamic display file of the screen before switching is effectively utilized to render the effect of the icon to be displayed after switching when the screen is switched, so that the aims of effectively reducing memory waste, improving physical simulation performance and reducing the destruction and creation time of the physical data are fulfilled.
EXAMPLE III
Referring to fig. 3, a block diagram of a mobile terminal according to a third embodiment of the present invention is shown.
The mobile terminal 300 includes:
a dynamic desktop background generation request receiving module 301, configured to receive a dynamic desktop background generation request sent by a user;
a to-be-displayed icon selecting module 302, configured to prompt a user to select an icon to be displayed on the dynamic desktop background according to the generation request; the icons to be displayed comprise application icons or image icons;
a dynamic display file extracting module 303, configured to extract a dynamic display file of the application icon or the image icon, where the dynamic display file is stored in the preset cache pool;
a physical data obtaining module 304, configured to obtain physical data of the application icon or the image icon if the preset cache pool is empty, where the physical data at least includes displacement, rotation, and scaling data exhibited by the application icon or the image icon according to the gravity sensing data of the mobile terminal;
a dynamic effect file generation module 305, configured to generate a physical dynamic effect file of the application icon or the image icon according to the physical data;
a dynamic desktop background generating module 306, configured to render the physical dynamic effect file onto the desktop, and generate a dynamic desktop background with displacement, rotation, and scaling effects exhibited by the application icon or the image icon according to the gravity sensing data of the mobile terminal.
Referring to fig. 4, the functions of the modules of the mobile terminal 300 and the interaction relationship between the modules will be described in detail.
A dynamic desktop background generation request receiving module 301, configured to receive a dynamic desktop background generation request sent by a user;
a to-be-displayed icon selecting module 302, configured to prompt a user to select an icon to be displayed on the dynamic desktop background according to the generation request; the icons to be displayed comprise application icons or image icons;
a dynamic display file extracting module 303, configured to extract a dynamic display file of the application icon or the image icon, where the dynamic display file is stored in the preset cache pool;
a physical data obtaining module 303A, configured to obtain physical data of the application icon or the image icon if the preset cache pool is empty, where the physical data at least includes displacement, rotation, and scaling data exhibited by the application icon or the image icon according to the gravity sensing data of the mobile terminal;
a memory releasing module 303B, configured to release a memory required for acquiring the physical data of the application icon or the image icon if the preset cache pool is not empty.
A dynamic effect file generation module 304, configured to generate a physical dynamic effect file of the application icon or the image icon according to the physical data;
a dynamic desktop background generating module 305, configured to render the physical dynamic effect file onto the desktop, and generate a dynamic desktop background with displacement, rotation, and scaling effects exhibited by the application icon or the image icon according to the gravity sensing data of the mobile terminal.
A dynamic display file storage module 306, configured to store the physical dynamic effect file of the application icon or the image icon in the preset cache pool.
A dynamic desktop background closing request receiving module 307, configured to receive a dynamic desktop background closing request sent by a user.
And a preset cache pool storage module 308, configured to obtain the dynamic display file of the application icon or the image icon in the dynamic desktop background according to the close request, and store the dynamic display file in the preset cache pool.
A touch operation receiving module 309, configured to receive a touch operation performed by a user on the application icon or the image icon on the dynamic desktop background;
a display module 310, configured to display, according to the touch operation, an application corresponding to the application icon or an image corresponding to the image icon.
In the embodiment of the invention, a request is generated by receiving a dynamic desktop background sent by a user; prompting a user to select an icon to be displayed on the dynamic desktop background according to the generation request; the icons to be displayed comprise application icons or image icons; the dynamic display file extraction module is used for extracting the dynamic display files of the application icons or the image icons stored in the preset cache pool; if the preset cache pool is empty, acquiring physical data of the application icon or the image icon, wherein the physical data at least comprises displacement, rotation and scaling data displayed by the application icon or the image icon according to the gravity sensing data of the mobile terminal; and if the preset cache pool is not empty, releasing the memory required for acquiring the physical data of the application icon or the image icon. Generating a physical dynamic effect file of the application icon or the image icon according to the physical data; rendering the physical dynamic effect file on the desktop, and generating a dynamic desktop background of displacement, rotation and zooming effects displayed by the application icon or the image icon according to the gravity sensing data of the mobile terminal. And the dynamic display file of the icon to be displayed is stored in the preset cache pool. And receiving a dynamic desktop background closing request sent by a user. And acquiring the dynamic display file of the application icon or the image icon in the dynamic desktop background according to the closing request, and storing the dynamic display file in the preset cache pool. The method and the device have the advantages that the desktop icon dynamic display file is generated by acquiring the physical data of the application corresponding to the desktop icon to display the dynamic effect of the desktop icon, and the dynamic display file of the screen before switching is effectively utilized to render the effect of the icon to be displayed after switching when the screen is switched, so that the aims of effectively reducing memory waste, improving physical simulation performance and reducing the destruction and creation time of the physical data are fulfilled.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described in this disclosure may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described in this disclosure. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a camera device according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.