Dynamic icon generation method, device and equipment and computer readable storage medium

By executing the icon update module in the terminal's virtual machine, generating dynamic icons and sending them to the desktop management program, the problems of low stability and high resource consumption in the prior art dynamic icon generation program are solved, and higher system stability and resource management efficiency are achieved.

CN120010970APending Publication Date: 2025-05-16BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311533303.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-16
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In the prior art, the program that generates dynamic icons runs in the operating system, has low stability, is difficult to limit the system access rights of the program, and has a large resource consumption.

Method used

Dynamic icon information is determined by executing the icon update module in a virtual machine running on the terminal and sending it to the desktop manager to generate the icon for the target application.

Benefits of technology

Execution of icon update modules in virtual machines can limit high-permission interface calls, improve system stability, and reduce CPU and memory usage through resource management to avoid resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010970A_ABST
    Figure CN120010970A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, in particular to a dynamic icon generation method and device, equipment and a computer readable storage medium. The dynamic icon generation method is executed by a virtual machine running on a terminal and comprises the steps that an icon updating module of a target application is obtained, and the icon updating module comprises icon basic information and resource information needed by an icon of the target application; an icon updating module is executed in a target operation mode, so that the icon updating module determines dynamic icon information of a target application according to icon basic information and resource information; the dynamic icon information is sent to a desktop management program running on the terminal, and the desktop management program generates an icon of the target application according to the dynamic icon information. According to the method and the device, the icon updating module can be limited to call the interface, the execution process of the dynamic icon can be checked, the icon updating module is closed and restarted when an error occurs, other processes are not influenced, and the usage amount of a CPU and a memory of the module can be limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a method, device, equipment and computer-readable storage medium for generating a dynamic icon. Background Art

[0002] Desktop icons can be displayed on the display screen of the terminal, and the icons can be used to open the applications corresponding to the icons.

[0003] The icons of some applications have dynamic effects. In the related art, running a program that generates dynamic icons in the operating system where the desktop management program is located has low stability, difficulty in limiting the system access rights of the program, and high resource consumption. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method, device, equipment and computer-readable storage medium for generating a dynamic icon, which can solve the above problems.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for generating a dynamic icon is provided, which is executed by a virtual machine running on a terminal, and the method includes:

[0006] Acquire an icon update module of a target application, wherein the icon update module includes basic icon information and resource information required for the icon of the target application;

[0007] By executing the icon update module in the target operation mode, the icon update module determines the dynamic icon information of the target application according to the icon basic information and the resource information;

[0008] The dynamic icon information is sent to a desktop management program running on the terminal, wherein the desktop management program generates an icon of the target application according to the dynamic icon information.

[0009] According to a second aspect of an embodiment of the present disclosure, a method for generating a dynamic icon is provided, which is executed by a desktop management program running on a terminal, and the method includes:

[0010] Receiving dynamic icon information of a target application, wherein the dynamic icon information is generated by a virtual machine running on the terminal by acquiring an icon update module of the target application and executing the icon update module in a target operation mode to generate icon basic information and resource information contained in the icon update module;

[0011] An icon of the target application is generated according to the dynamic icon information.

[0012] According to a third aspect of an embodiment of the present disclosure, a device for generating a dynamic icon is provided, which is configured on a virtual machine running on a terminal, and the device includes:

[0013] An acquisition unit, configured to acquire an icon update module of a target application, wherein the icon update module includes basic icon information and resource information required for the icon of the target application;

[0014] An execution unit is configured to execute the icon update module in a target operation mode so that the icon update module determines the dynamic icon information of the target application according to the icon basic information and the resource information;

[0015] The sending unit is configured to send the dynamic icon information to a desktop management program running on the terminal, wherein the desktop management program generates an icon of the target application according to the dynamic icon information.

[0016] According to a fourth aspect of an embodiment of the present disclosure, a device for generating a dynamic icon is provided, which is configured in a desktop management program running on a terminal, and the device includes:

[0017] A receiving unit configured to receive dynamic icon information of a target application, wherein the dynamic icon information is generated by a virtual machine running on the terminal by acquiring an icon update module of the target application and executing the icon update module in a target running mode to generate the icon basic information and resource information contained in the icon update module;

[0018] A generating unit is configured to generate an icon of the target application according to the dynamic icon information.

[0019] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including: a processor and a memory;

[0020] The memory is used to store computer programs;

[0021] The processor is used to execute the method for generating the dynamic icon as described in the first and second aspects by calling the computer program.

[0022] According to a sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for generating a dynamic icon as described in the first and second aspects is implemented.

[0023] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0024] The present invention executes an icon update module in a virtual operating system of a virtual machine and determines dynamic icon information, and then sends the dynamic icon information to a desktop management program to generate a corresponding dynamic icon. Executing the icon update module in the virtual operating system of a virtual machine can, on the one hand, limit the icon update module from calling a high-authority interface, and on the other hand, check the execution process of the dynamic icon in the virtual machine, and close and restart the icon update module when an error occurs, without affecting other ongoing processes. In addition, using a virtual machine to execute the icon update module can also limit the CPU (Central Processing Unit) and memory usage of the module, and can also suspend or continue execution at any time.

[0025] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0027] Figure 1 It is a schematic flow chart of a method for generating a dynamic icon according to an exemplary embodiment of the present disclosure.

[0028] Figure 2 It is a structural diagram of an icon update module according to an exemplary embodiment of the present disclosure.

[0029] Figure 3 It is a schematic diagram of a method for generating a dynamic icon according to an exemplary embodiment of the present disclosure.

[0030] Figure 4 It is a schematic diagram of a method for generating a dynamic icon according to an exemplary embodiment of the present disclosure.

[0031] Figure 5 It is a schematic flow chart of a method for generating a dynamic icon according to an exemplary embodiment of the present disclosure.

[0032] Figure 6 The present invention is a block diagram of a device for generating a dynamic icon according to an exemplary embodiment of the present invention.

[0033] Figure 7 The present invention is a block diagram of a device for generating a dynamic icon according to an exemplary embodiment of the present invention.

[0034] Figure 8 It is a schematic block diagram of a device for generating a dynamic icon according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0036] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0037] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0038] Figure 1 The present invention is a schematic flow chart of a method for generating a dynamic icon according to an embodiment of the present invention, which can be executed by a virtual machine running on a terminal. The method for generating a dynamic icon can be used to generate an application icon in a desktop window displayed on a screen of a terminal, and the terminal includes but is not limited to a mobile phone, a tablet computer, a wearable device, a sensor, an Internet of Things device, and other communication devices.

[0039] like Figure 1 As shown, the method for generating a dynamic icon includes:

[0040] In step S101, an icon update module of a target application is obtained, wherein the icon update module includes basic icon information and resource information required for the icon of the target application;

[0041] In step S102, the icon update module is executed in the target operation mode so that the icon update module determines the dynamic icon information of the target application according to the icon basic information and the resource information;

[0042] In step S103, the dynamic icon information is sent to a desktop management program running on the terminal, wherein the desktop management program generates an icon of the target application according to the dynamic icon information.

[0043] In some embodiments, the icon update module may generate the icon that needs to be updated next time at a certain interval and send it to the desktop management program to generate a new icon for the target application.

[0044] By updating the icon of the target application, the icon of the target application is changed to achieve a dynamic icon effect.

[0045] For example, the icon of a calendar program can change according to the date, the icon of a weather program can change according to the weather conditions of the day, and the icon of a charging software or battery management application can change according to the current battery capacity.

[0046] In some embodiments, the target application includes any application displayed in a desktop window.

[0047] Specifically, the target application should include an icon update module, and the virtual machine can obtain the icon update module to enable the corresponding target application to display a dynamic icon on the desktop window.

[0048] In some embodiments, the icon update module executes within a virtual machine.

[0049] After the icon update module is executed, the dynamic icon information of the target application corresponding to the icon update module can be determined, and the dynamic icon information can be sent to the desktop management program to generate the icon of the target application.

[0050] In some embodiments, the desktop management program is used to manage the desktop window displayed by the terminal, including generating icons for each application displayed on the desktop window.

[0051] The desktop management program may generate a corresponding icon in the area where the target application is located according to the received dynamic icon information.

[0052] In some embodiments, the virtual machine may include webAssembly (WASM).

[0053] It should be noted that the virtual machine can be selected according to the actual needs of the technicians, and the present disclosure does not limit this.

[0054] The present disclosure can execute an icon update module in a virtual operating system of a virtual machine and determine dynamic icon information, and send the dynamic icon information to a desktop management program to generate a dynamic icon for a corresponding target application. Executing the icon update module in a virtual operating system of a virtual machine can, on the one hand, limit the icon update module from calling an interface with too high a permission, and obtain the privacy information of the terminal, leading to privacy leakage problems; on the other hand, it can ensure the stability of the system, and the virtual machine can check any step in the dynamic icon execution process, and close and restart the corresponding icon update module in the event of an error, without affecting other running processes. In addition, the use of a virtual machine can limit the usage of the CPU and memory by the icon update module, avoiding the problem of excessive waste of system resources, and at the same time, the process can be suspended or continued at any time, which is more flexible and convenient.

[0055] Figure 2 It is a structural diagram of an icon update module according to an embodiment of the present disclosure.

[0056] like Figure 2 As shown, in some embodiments, the icon update module 200 includes:

[0057] Update the main program 210;

[0058] Description file 220, including basic information of icons corresponding to the target application and the operation mode of the update main program;

[0059] Resource package 230, including resource information required by the icon of the target application;

[0060] The step of determining the dynamic icon information of the target application by executing the icon update module 200 includes:

[0061] The update main program 210 is run according to the running mode of the update main program described in the description file 220, so that the update main program 210 determines the dynamic icon information of the target application according to the resource information and the icon basic information.

[0062] In some embodiments, the update main program 210 includes supporting programs running in the virtual machine.

[0063] For example, in a WASM virtual machine, the update main program 210 includes a WASM program, which may be a compiled WASM module having a WASM instruction set and may be executed in an interpreted mode.

[0064] In some embodiments, the resource package 230 includes resource information required by the icon of the target application.

[0065] The resource package 230 is used to provide the necessary resources required by the update main program 210 to generate dynamic icon information during operation, such as image resources, audio resources, text information, etc.

[0066] In some embodiments, the resource package 230 may be published on an application store or other online website after signature verification.

[0067] The update main program 210 can download the corresponding resource package 230 through the network to obtain necessary resources.

[0068] In some embodiments, the update main program 210 may use interfaces corresponding to different operating modes according to different operating modes, and execute according to the operating mode specified by the description file 220 .

[0069] In some embodiments, the format of the description file may be determined according to the virtual machine and the update main program.

[0070] For example, in a WASM virtual machine, the description file may be a file in json format, such as Manifest.json.

[0071] In some embodiments, the description file 220 includes basic information of the icon corresponding to the target application and the running mode of the update main program.

[0072] In addition to indicating the adopted operation mode to the update main program, the description file may also indicate basic information of the icon of the target application.

[0073] In some embodiments, the description file includes basic icon information corresponding to the target application, and the basic icon information is used to describe the basic content of the icon format of the target application.

[0074] In some embodiments, the icon basic information may include at least one of the following: the name and version number of the icon, the icon permission statement, the icon indication information, and the icon setting information.

[0075] The name of the icon is the name of the icon of the target application. The version number is used to determine whether the icon update module is supported when the virtual machine version is iterated. If the icon version number is not supported by the virtual machine, the virtual machine cannot obtain the icon update module and cannot generate dynamic icon information by executing the icon update module.

[0076] When the virtual machine executes the icon update module, some permissions may be involved. The icon permission declaration is used to declare the necessary permissions that the icon update module obtains. For example, it may include permissions to use the network, permissions to store files, permissions to obtain system information, etc.

[0077] The icon indication information may be in a string format, and is used to indicate an entry of an icon update module.

[0078] The icon setting information is basic setting information about the icon of the application, including, for example, the size of the icon, the type of the icon, the shape of the icon, and the like.

[0079] In some embodiments, the description file 220 includes an operating mode for updating the main program.

[0080] The running mode is used to indicate the running mode of the update main program.

[0081] In some embodiments, the operating modes include:

[0082] Timing mode, by presetting a fixed time interval, the timer triggers the operation; every time interval, the update main program will run once to update the icon of the target application;

[0083] Event trigger mode, triggering the operation of the update main program by monitoring preset associated events; for example, if the target application monitors a notification message or an activity event through a network connection, the operation of the update main program is triggered to generate a dynamic icon corresponding to the notification message or activity event;

[0084] The self-running mode meets the special customization requirements of some application manufacturers. The update main program using the self-running mode will be thrown into a task pool and run automatically in the task pool.

[0085] In some embodiments, the operation mode of the update main program includes one of the following three: timing mode, event trigger mode, and self-running mode; and running the update main program according to the operation mode of the update main program described in the description file includes:

[0086] When the running mode of the update main program is the timing mode, the icon update module is added to the thread pool for execution according to the next update time of the icon update module monitored;

[0087] When the operation mode of the update main program is the event trigger mode, the icon update module is added to the thread pool for execution according to the monitored trigger event;

[0088] When the running mode of the main update program is the self-running mode, the icon update module is assigned to an independent thread for execution.

[0089] In some embodiments, the update main program provides different interfaces in different operation modes.

[0090] The interfaces provided only for the timing mode include: int dynico_gettimeout(); through this interface, the update main program can obtain the next update time of the target application icon;

[0091] The interfaces provided only for the event trigger mode include: int dynico_geteventfd(); through this interface, the update main program can obtain the system call (eventfd) of the associated event that the target application wants to monitor;

[0092] The interfaces provided only for the self-running mode include: int dynico_testevent(); through this interface, the desktop management program on the terminal can open an independent thread to run the icon update module of this mode.

[0093] In some embodiments, the interface provided by the update main program also includes:

[0094] uint8_t*dynico_prepare_buffer(int width, int height, int mode); This interface is used to allow the icon update module to allocate enough space for the icon memory area to store data between the virtual machine and the desktop management program; where the mode parameter is used to indicate the update mode adopted by the desktop management program;

[0095] int dynico_run(uint8_t*buf); used to execute the current task and update the dynamic icon information to buf. int returns the size of the dynamic icon information. If == 0, it means that the dynamic icon information update is completed. The desktop management program can update the icon of the target application according to the generated dynamic icon information.

[0096] int dynico_active(bool is_active); The desktop management program can indicate to the icon update module whether the icon of the current target application is in active state. If it is in active state, it indicates that the user can currently see the icon of the target application on the desktop window, and the icon update module is run to update the dynamic icon; if it is in dormant state, it indicates that the user cannot currently see the icon of the target application on the desktop window, and the icon update module is not run or stopped to reduce resource consumption.

[0097] Based on the above interface code, the update main program can run in different operation modes to generate dynamic icon information, and the desktop management program can generate the corresponding target application icon through the dynamic icon information.

[0098] In some embodiments, the desktop management program may generate an icon of a size corresponding to the description of the target application according to the basic icon information described in the description file in the icon update module, and set an update mode for the icon.

[0099] The desktop management program can update the icon of the target application according to the set update mode by acquiring the dynamic icon information generated by the corresponding icon update module.

[0100] Dynamic icons are achieved by updating the icons of target applications.

[0101] In some embodiments, the method further comprises: determining an update mode of the desktop management program;

[0102] In the case where the update mode is the SVG graphics update mode, the dynamic icon information includes SVG data;

[0103] When the update mode is the canvas mode, the dynamic icon information includes a canvas instruction;

[0104] When the update mode is the pixel mode, the dynamic icon information includes a pixel value corresponding to a pixel address of the area where the target application is located.

[0105] In some embodiments, the update mode may be specified by the desktop management program, and the icon update program determines the type of dynamic icon information to be generated and sent by determining the update mode of the desktop management program.

[0106] In some other embodiments, the update mode may be specified by the icon update module, and the desktop management program updates the icon of the target application according to the update mode specified by the icon update module.

[0107] In some embodiments, when the desktop management program receives an SVG instruction and / or a canvas instruction, the desktop management program may draw an updated icon according to the received corresponding instruction.

[0108] In some embodiments, when the update mode is a pixel mode, the desktop management program can send the pixel address of the area where the icon of the target application is located to the virtual machine, and the icon update module running in the virtual machine will fill the pixel address with the pixel value by itself, that is, the icon update module fills the pixel address of the area where the icon is located with the pixel value corresponding to the pixel value to generate the corresponding icon on the desktop window.

[0109] Because the pixel mode is filled with pixel values ​​by the icon update module itself, the icon generation in this mode is more flexible, but correspondingly, the programming difficulty is also greater.

[0110] In some embodiments, the method further includes: allocating a memory space of a corresponding size to the icon update module according to an update mode of the desktop management program and a predefined correspondence between the update mode and the memory space size.

[0111] In some embodiments, the memory space required by the pixel mode is larger than the memory space required by the SVG graphics update mode and the canvas mode.

[0112] In some embodiments, the number of target applications includes one or more.

[0113] Correspondingly, the number of icon update modules also includes one or more.

[0114] In some embodiments, the desktop management program can enable the terminal to run a virtual machine to execute multiple icon update modules in batches and multiple times through the virtual machine, so that the multiple icon update modules generate corresponding dynamic icon information.

[0115] By using a virtual machine to run multiple icon update modules, terminals with limited CPU and memory resources can host multiple dynamic icons or small dynamic panels on the desktop window, thereby improving the user's interactive experience; and in terminals with strong CPU performance and large memory resources, the desktop management program can be allowed to introduce a large number of applications with dynamic icons, thereby improving the operability of the desktop window.

[0116] In some embodiments, the virtual machine and the desktop management program run in different processes, and sending the dynamic icon information to the desktop management program running on the terminal includes: sending the dynamic icon information to the desktop management program running on the terminal through a cross-process communication channel established between the two processes.

[0117] Through the cross-process communication channel, dynamic icons can be generated even if the desktop management program and the virtual machine do not belong to the same process.

[0118] Figure 3 It is a schematic diagram of a method for generating a dynamic icon according to an embodiment of the present disclosure.

[0119] like Figure 3 As shown, in some embodiments, the running desktop management program forms a desktop window 320 on the display screen of the terminal, and the desktop window 320 includes an icon 330 of the target application. A communication channel 340 can be directly established between the icon update module 200 and the icon 330 of the target application. Through this communication channel 340, information is transmitted between the virtual machine 310 and the icon 330 of the target application to ensure that the icon of the target application is drawn correctly.

[0120] In some embodiments, the virtual machine may include a virtual machine executor, and the virtual machine executor is written into the desktop hypervisor so that the virtual machine and the desktop hypervisor run in the same process.

[0121] The virtual machine executor includes a container and a scheduler for executing the icon update module.

[0122] Figure 4 It is a schematic diagram of a method for generating a dynamic icon according to an embodiment of the present disclosure.

[0123] In some embodiments, when the number of target applications includes multiple ones, the process of the virtual machine includes a scheduling thread and multiple working threads, and the execution of the icon update module includes: allocating the icon update modules of multiple target applications to different working threads for execution through the scheduling thread.

[0124] Among them, the scheduling thread is responsible for monitoring events. The scheduling thread can first determine the operation mode of each icon update module and put them into different monitoring queues respectively. When the queue in the timing mode triggers the time interval of the next update or the queue in the event trigger mode triggers the associated event fd, the scheduling thread can throw the triggered icon update module into the work queue to wait for execution. The scheduling thread can monitor the queue in the timing mode through a timer (timer) and monitor the queue in the event trigger mode by monitoring the event fd through eventpoll (epoll).

[0125] like Figure 4 As shown, the scheduling thread can determine the next timeout time of each icon update module in the timing mode and add it to the queue of the timing mode, and determine the event trigger fd of each icon update module in the event trigger mode and add it to the queue of the event trigger mode. By monitoring the queues of the timing mode and event trigger mode, the monitored icon update modules are put into the work queue.

[0126] Multiple worker threads form a worker thread pool. When all worker threads in the thread pool are occupied, the scheduling thread can add the icon update module to be run to the work queue to wait for the worker thread pool to be vacated and then execute it in sequence. Figure 4 As shown, the action queue includes icon update module A, icon update module B, and icon update module C to be executed, and the execution order is from top to bottom.

[0127] The working thread in the working thread pool can obtain the icon update module from the working queue and execute the icon update module.

[0128] Through this embodiment, the present disclosure enables a virtual machine to reasonably allocate resources and realize the generation of dynamic icons when facing multiple icon update modules.

[0129] In some embodiments, the method further includes: determining a visible area on the desktop; placing application icons in a non-visible area in a dormant state; and placing application icons in a visible area in an active state.

[0130] The desktop management program can determine the visible area on the desktop window, and make the application icons in the non-visible area in a dormant state, and the application icons in the visible area in an active state.

[0131] The icon update module corresponding to the dormant application icon will stop running, and its icon update priority will be lower; while the icon update module corresponding to the active application icon will run first to ensure the timely dynamic change of the icons in the visible area of ​​the desktop window. In this way, the resources consumed by the generation of dynamic icons are limited on the basis of ensuring the user experience.

[0132] In some embodiments, the resource restrictions imposed by the desktop management program on dynamic icons also include: restrictions on CPU occupancy and restrictions on memory occupancy.

[0133] Regarding the limitation of CPU occupancy rate, specifically, the desktop management program can control the CPU time of executing the icon update module to prevent it from taking up too much time. For example, 50% or even higher CPU time can be allocated to the icon update module in the active state, while 1% less time can be allocated to the icon update module in the dormant state.

[0134] Regarding the limitation of memory usage, specifically, when loading the icon update module, the desktop management program can limit the memory size occupied by the icon update module. When the memory is exceeded, the icon update module can fail to execute and the icon update module can be closed or restarted.

[0135] In some embodiments, the method further includes: performing security restrictions on interfaces required for generating the icon of the target application.

[0136] Specifically, the security restrictions imposed by the desktop management program on the icon update module may include at least one of the following:

[0137] The desktop management program only provides the necessary API interfaces to the icon update module. During the interaction with the terminal operating system, the desktop management program will block all illegal interfaces of the icon update module.

[0138] All interfaces needed in the icon update module must obtain permission declarations in the description file, and the icon update module can only use approved interfaces;

[0139] All interfaces provided to the icon update module will be placed in a sandbox to restrict its limited access. For example, if the icon update module needs to access disk data, it will locate a temporary directory, and the icon update module cannot access disk data outside the temporary directory; the terminal system-sensitive information in the interface, such as MAC address, IEME address, etc., are replaced with random values; the icon update module is prohibited from uploading data to the Internet, or is restricted to uploading data to websites in the whitelist; the icon update module is not allowed to obtain user information, only APIs (such as login accounts, etc.) are provided to it, and only the execution results (success or failure) are returned.

[0140] The present invention discloses a method for generating dynamic icons based on a virtual machine, which can enable a desktop management program to directly load and use the method of the present invention to generate dynamic icons in a desktop window, occupying a small memory space, consuming fewer resources, and updating application icons in a timely manner, thereby increasing security and not affecting the stability of other program processes in the main system.

[0141] Corresponding to the embodiment of the method for generating a dynamic icon on the virtual machine side of the present disclosure, the present disclosure also provides an embodiment of the method for generating a dynamic icon on the corresponding desktop management program side.

[0142] Figure 5 The present invention is a schematic flow chart of a method for generating a dynamic icon in an embodiment of the present invention. The method for generating a dynamic icon can be executed by a desktop management program running on a terminal. The method for generating a dynamic icon can be used to generate an application icon in a desktop window displayed on a screen of a terminal, and the terminal includes but is not limited to a mobile phone, a tablet computer, a wearable device, a sensor, an Internet of Things device, and other communication devices.

[0143] like Figure 5 As shown, the method for generating a dynamic icon includes:

[0144] In step S501, dynamic icon information of a target application is received, wherein the dynamic icon information is generated by a virtual machine running on the terminal by acquiring an icon update module of the target application and executing the icon update module in a target operation mode according to basic icon information and resource information contained in the icon update module;

[0145] In step S502, an icon of the target application is generated according to the dynamic icon information.

[0146] In some embodiments, the icon update module includes: an update main program; a description file, containing basic icon information corresponding to the target application and the operating mode of the update main program; a resource package, containing resource information required for the icon of the target application; wherein the dynamic icon information is generated by the virtual machine running the update main program according to the operating mode.

[0147] In some embodiments, the running mode of the update main program includes one of the following three: timing mode, event trigger mode, and self-running mode; running the update main program according to the running mode of the update main program described in the description file includes: when the running mode of the update main program is the timing mode, the icon update module is added to the thread pool for execution according to the next update time of the icon update module monitored; when the running mode of the update main program is the event trigger mode, the icon update module is added to the thread pool for execution according to the trigger event monitored; when the running mode of the update main program is the self-running mode, the icon update module is assigned an independent thread for execution.

[0148] In some embodiments, the method also includes: determining an update mode of the desktop management program; when the update mode is an SVG graphics update mode, the dynamic icon information includes SVG data; when the update mode is a canvas mode, the dynamic icon information includes canvas instructions; when the update mode is a pixel mode, the dynamic icon information includes a pixel value corresponding to a pixel address of an area where the target application is located.

[0149] In some embodiments, the method further includes: allocating a memory space of a corresponding size to the icon update module according to an update mode of the desktop management program and a predefined correspondence between the update mode and the memory space size.

[0150] In some embodiments, the virtual machine and the desktop management program run in different processes, and sending the dynamic icon information to the desktop management program running on the terminal includes: sending the dynamic icon information to the desktop management program running on the terminal through a cross-process communication channel established between the two processes.

[0151] In some embodiments, the number of target applications includes one or more.

[0152] In some embodiments, when the number of target applications includes multiple ones, the process of the virtual machine includes a scheduling thread and multiple working threads, and the execution of the icon update module includes: allocating the icon update modules of multiple target applications to different working threads for execution through the scheduling thread.

[0153] In some embodiments, the method further includes: determining a visible area on the desktop; placing application icons in a non-visible area in a dormant state; and placing application icons in a visible area in an active state.

[0154] In some embodiments, the method further includes: performing security restrictions on interfaces required for generating the icon of the target application.

[0155] The implementation process of each embodiment in the above method can be specifically referred to the implementation process of the corresponding embodiment of the method for generating a dynamic icon on the virtual machine side, which will not be described in detail here.

[0156] Corresponding to the embodiment of the method for generating a dynamic icon of the present disclosure, the present disclosure also provides an embodiment of a corresponding device for generating a dynamic icon.

[0157] See also Figure 6 , Figure 6 FIG. 1 is a block diagram of a device for generating a dynamic icon in one embodiment of the present disclosure. Figure 6 As shown, the dynamic icon generation device is configured on a virtual machine running on a terminal, and the device includes:

[0158] The acquisition unit 610 is configured to acquire an icon update module of a target application, wherein the icon update module includes basic icon information and resource information required for the icon of the target application;

[0159] The execution unit 620 is configured to execute the icon update module in the target operation mode so that the icon update module determines the dynamic icon information of the target application according to the icon basic information and the resource information;

[0160] The sending unit 630 is configured to send the dynamic icon information to a desktop management program running on the terminal, wherein the desktop management program generates an icon of the target application according to the dynamic icon information.

[0161] In some embodiments, the icon update module includes: an update main program; a description file, containing basic icon information corresponding to the target application and an operating mode of the update main program; a resource package, containing resource information required for the icon of the target application; wherein, determining the dynamic icon information of the target application by executing the icon update module includes: running the update main program according to the operating mode of the update main program described in the description file, so that the update main program determines the dynamic icon information of the target application based on the resource information and the basic icon information.

[0162] In some embodiments, the running mode of the update main program includes one of the following three: timing mode, event trigger mode, and self-running mode; running the update main program according to the running mode of the update main program described in the description file includes: when the running mode of the update main program is the timing mode, the icon update module is added to the thread pool for execution according to the next update time of the icon update module monitored; when the running mode of the update main program is the event trigger mode, the icon update module is added to the thread pool for execution according to the trigger event monitored; when the running mode of the update main program is the self-running mode, the icon update module is assigned an independent thread for execution.

[0163] In some embodiments, the device is further configured to: determine an update mode of the desktop management program; when the update mode is an SVG graphics update mode, the dynamic icon information includes SVG data; when the update mode is a canvas mode, the dynamic icon information includes canvas instructions; when the update mode is a pixel mode, the dynamic icon information includes a pixel value corresponding to a pixel address of the area where the target application is located.

[0164] In some embodiments, the apparatus is further configured to: allocate a memory space of a corresponding size to the icon update module according to an update mode of the desktop management program and a predefined correspondence between the update mode and the memory space size.

[0165] In some embodiments, the virtual machine and the desktop management program run in different processes, and sending the dynamic icon information to the desktop management program running on the terminal includes: sending the dynamic icon information to the desktop management program running on the terminal through a cross-process communication channel established between the two processes.

[0166] In some embodiments, the number of target applications includes one or more.

[0167] In some embodiments, when the number of target applications includes multiple ones, the process of the virtual machine includes a scheduling thread and multiple working threads, and the execution of the icon update module includes: allocating the icon update modules of multiple target applications to different working threads for execution through the scheduling thread.

[0168] In some embodiments, the device is further configured to: determine a visible area on the desktop; put application icons in the non-visible area into a dormant state; and put application icons in the visible area into an active state.

[0169] In some embodiments, the apparatus is further configured to: perform security restrictions on interfaces required to be used in generating the icon of the target application.

[0170] See also Figure 7 , Figure 7 FIG. 1 is a block diagram of a device for generating a dynamic icon in one embodiment of the present disclosure. Figure 7 As shown, the dynamic icon generation device is configured in a desktop management program running on a terminal, and the device includes:

[0171] The receiving unit 710 is configured to receive dynamic icon information of a target application, wherein the dynamic icon information is generated by a virtual machine running on the terminal by acquiring an icon update module of the target application and executing the icon update module in a target operation mode according to basic icon information and resource information contained in the icon update module;

[0172] The generating unit 720 is configured to generate the icon of the target application according to the dynamic icon information.

[0173] In some embodiments, the icon update module includes: an update main program; a description file, containing basic icon information corresponding to the target application and the operating mode of the update main program; a resource package, containing resource information required for the icon of the target application; wherein the dynamic icon information is generated by the virtual machine running the update main program according to the operating mode.

[0174] In some embodiments, the virtual machine and the desktop management program run in different processes of the same terminal, and receiving the dynamic icon information of the target application includes: receiving the dynamic icon information sent by the virtual machine through an inter-process communication channel established between the two processes.

[0175] In some embodiments, the target application includes one or more.

[0176] In some embodiments, the device is further configured to: determine a visible area on the desktop; put application icons in the non-visible area into a dormant state; and put application icons in the visible area into an active state.

[0177] In some embodiments, the apparatus is further configured to: perform security restrictions on interfaces required to be used in generating the icon of the target application.

[0178] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0179] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the delay mitigation method as described in any of the above embodiments by calling the computer program.

[0180] An embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for alleviating delay as described in any of the above embodiments is implemented.

[0181] Figure 8 800 is a schematic block diagram of a device 800 for generating a dynamic icon according to an embodiment of the present disclosure. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0182] Reference Figure 8 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0183] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned information receiving method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0184] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0185] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0186] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0187] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0188] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0189] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0190] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G LTE, 5G NR, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0191] In an exemplary embodiment, the apparatus 800 may be implemented by 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), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned information receiving method.

[0192] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to complete the above-mentioned information receiving method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0193] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure 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 techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0194] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0195] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0196] The method and device provided in the embodiments of the present disclosure are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present disclosure, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

Claims

1. A method for generating a dynamic icon, characterized in that: The method is executed by a virtual machine running on a terminal, and includes: Acquire an icon update module of a target application, wherein the icon update module includes basic icon information and resource information required for the icon of the target application; By executing the icon update module in the target operation mode, the icon update module determines the dynamic icon information of the target application according to the icon basic information and the resource information; The dynamic icon information is sent to a desktop management program running on the terminal, wherein the desktop management program generates an icon of the target application according to the dynamic icon information.

2. The method according to claim 1, characterized in that The icon updating module comprises: Update the main program; A description file, including the basic information of the icon corresponding to the target application and the operation mode of the update main program; A resource package, including the resource information required for the icon of the target application; The method of executing the icon update module in the target operation mode so that the icon update module determines the dynamic icon information of the target application according to the icon basic information and the resource information includes: The update main program is run according to the running mode of the update main program described in the description file, so that the update main program determines the dynamic icon information of the target application according to the icon basic information and the resource information.

3. The method according to claim 2, characterized in that The operation mode of the update main program includes one of the following three: timing mode, event trigger mode, and self-running mode; The step of running the update main program according to the running mode of the update main program described in the description file includes: When the operation mode of the update main program is the timing mode, the icon update module is added to the thread pool for execution according to the next update time of the icon update module monitored; When the operation mode of the update main program is the event trigger mode, the icon update module is added to the thread pool for execution according to the monitored trigger event; When the running mode of the update main program is the self-running mode, the icon update module is assigned to an independent thread for execution.

4. The method according to claim 1, characterized in that: The method further comprises: Determining an update mode of the desktop management program; In the case where the update mode is the SVG graphics update mode, the dynamic icon information includes SVG data; When the update mode is the canvas mode, the dynamic icon information includes a canvas instruction; When the update mode is the pixel mode, the dynamic icon information includes a pixel value corresponding to a pixel address of the area where the target application is located.

5. The method according to claim 4, characterized in that The method further comprises: A memory space of a corresponding size is allocated to the icon update module according to the update mode of the desktop management program and the predefined correspondence between the update mode and the memory space size.

6. The method according to claim 1, characterized in that The virtual machine and the desktop management program are running in different processes, and the sending of the dynamic icon information to the desktop management program running on the terminal includes: The dynamic icon information is sent to the desktop management program running on the terminal through the cross-process communication channel established between the two processes.

7. The method according to claim 1, characterized in that In the case that the number of the target applications includes multiple ones, the process of the virtual machine includes a scheduling thread and multiple working threads, and the executing the icon updating module includes: The icon update modules of multiple target applications are respectively assigned to different working threads for execution through the scheduling thread.

8. A method for generating a dynamic icon, characterized in that: The method is performed by a desktop management program running on a terminal, and includes: Receiving dynamic icon information of a target application, wherein the dynamic icon information is generated by a virtual machine running on the terminal by acquiring an icon update module of the target application and executing the icon update module in a target operation mode to generate icon basic information and resource information contained in the icon update module; An icon of the target application is generated according to the dynamic icon information.

9. The method according to claim 8, characterized in that The icon updating module comprises: Update the main program; A description file, including the basic information of the icon corresponding to the target application and the operation mode of the update main program; A resource package, including the resource information required for the icon of the target application; The dynamic icon information is generated by the virtual machine running the update main program according to the running mode.

10. The method according to claim 8, characterized in that The method further comprises: Determine the visible area on the desktop; Put the application icons in the non-visible area into a dormant state; Makes the application icon in the visible area active.

11. The method according to claim 8, characterized in that The method further comprises: Security restrictions are imposed on the interfaces required for generating the icon of the target application.

12. A device for generating a dynamic icon, characterized in that: A virtual machine configured to run on a terminal, the device comprising: An acquisition unit, configured to acquire an icon update module of a target application, wherein the icon update module includes basic icon information and resource information required for the icon of the target application; An execution unit is configured to execute the icon update module in a target operation mode so that the icon update module determines the dynamic icon information of the target application according to the icon basic information and the resource information; The sending unit is configured to send the dynamic icon information to a desktop management program running on the terminal, wherein the desktop management program generates an icon of the target application according to the dynamic icon information.

13. A device for generating a dynamic icon, characterized in that: A desktop management program configured to run on a terminal, the device comprising: A receiving unit configured to receive dynamic icon information of a target application, wherein the dynamic icon information is generated by a virtual machine running on the terminal by acquiring an icon update module of the target application and executing the icon update module in a target running mode to generate the icon basic information and resource information contained in the icon update module; A generating unit is configured to generate an icon of the target application according to the dynamic icon information.

14. An electronic device, characterized in that: include: Processor, memory; The memory is used to store computer programs; The processor is used to execute the method for generating a dynamic icon according to any one of claims 1 to 11 by calling the computer program.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for generating a dynamic icon described in any one of claims 1 to 11 is implemented.