Resource update control method, electronic device and chip system

By analyzing the content changes of resources to be updated, only the resources that need to be updated are updated, which solves the problem of increased processor load and power consumption of electronic devices when operating applications, and achieves high efficiency and energy saving in resource updating.

CN117707753BActive Publication Date: 2024-09-20HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310758180.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2024-09-20
Estimated Expiration
2043-06-25

AI Technical Summary

Technical Problem

When the electronic device detects the operation of the application program, it needs to update related resources, resulting in an increase in processor load, and may cause congestion and increased power consumption.

Method used

By detecting the resources to be updated associated with the target operation, analyzing whether their contents will change, and only updating the resources whose contents will change, avoiding meaningless updates, thereby reducing processor load and power consumption.

Benefits of technology

It effectively reduces the impact of resource updates on processor load, reduces meaningless update operations, improves the pertinence and efficiency of resource updates, and reduces overall load and power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117707753B
    Figure CN117707753B
Patent Text Reader

Abstract

The embodiments of the present application disclose a resource update control method, an electronic device, and a chip system, which are applicable to the field of computer technology. The method includes: when a target operation on an application is detected, a number of resources to be updated associated with the target operation are determined. Under the target operation, whether the content of each resource to be updated will change. For resources whose content will not change in the resources to be updated, no resource update is performed. For resources whose content will change in the resources to be updated, a resource update is performed. The embodiments of the present application can reduce the load on the processor caused by updating resources in response to the operation of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource update control method, electronic equipment and chip system. Background Art

[0002] When the electronic device detects a specific operation on an application (hereinafter referred to as an operation), it will respond to the operation and update the specific resources associated with the operation, thereby updating and maintaining the resource content. The resource update operation will increase a certain processor load.

[0003] Therefore, a method for reducing the processor load of an electronic device is needed in practical applications. Summary of the invention

[0004] In view of this, embodiments of the present application provide a resource update control method, an electronic device, and a chip system, which can reduce the processor load brought to the electronic device by resource updates.

[0005] A first aspect of an embodiment of the present application provides a resource update control method, including:

[0006] When a target operation on an application is detected, several resources to be updated associated with the target operation are determined, and it is analyzed whether the content of each resource to be updated will change under the target operation.

[0007] For resources whose contents will not change among the resources to be updated, no resource update is performed.

[0008] For resources whose contents will change among the resources to be updated, update the resources.

[0009] Embodiments of the present application can implement update control of one or more resources to be updated associated with the target operation. Continue to perform normal updates for resources to be updated whose resource content will change, thereby ensuring the timeliness of the resources to be updated. For resources to be updated whose resource content will not change, you can choose not to update them, thereby avoiding meaningless updates to these resources to be updated. Therefore, from the overall perspective of all resources to be updated, embodiments of the present application avoid updating a large number of resources to be updated that have no content updates, and implement targeted updates to local resources. Therefore, the load on the processor caused by this part of meaningless updates can be avoided, and the load caused by the overall resource update can be reduced, thereby effectively reducing the load on the electronic device processor, while reducing the power consumption caused to the electronic device.

[0010] In a first possible implementation manner of the first aspect, the resource to be updated is a list resource, and the first list is any resource to be updated.

[0011] Analyze whether the content of each resource to be updated will change under the target operation, including:

[0012] Analyze whether data recorded in the first list will change during the process of responding to the target operation. The data changes include: deleting data, adding data, and replacing data.

[0013] The embodiments of the present application can realize targeted identification of whether content will occur in list resources in response to operations on an application.

[0014] In a second possible implementation manner of the first aspect, the resource to be updated is a target component list.

[0015] When a target operation on an application is detected, several resources to be updated associated with the target operation are determined, including:

[0016] When a target operation on an application is detected, several preset services associated with the target operation are determined.

[0017] Determine the target component list under each preset service.

[0018] In the embodiment of the present application, a list of target components that may actually be involved in the target operation is determined by associating the target operation with a preset service, thereby enabling accurate positioning of the target component list.

[0019] In a third possible implementation manner of the first aspect, the preset service includes: any service among an accessibility management service, a search management service, and an account and synchronization management service.

[0020] After analysis and testing, it was found that when the three services, Accessibility Management Service, Search Management Service, and Account and Synchronization Management Service, updated the component list in response to the target operation, there were a large number of meaningless component list update operations. That is, many component list contents did not change, but were still refreshed. Therefore, in the embodiment of the present application, any of the Accessibility Management Service, Search Management Service, and Account and Synchronization Management Service is treated as a preset service, which can effectively reduce the update operations of the component lists corresponding to these services, thereby reducing the corresponding processor load.

[0021] As an embodiment of the present application, for an accessibility management service, its subordinate target component list may include: an accessibility service component list.

[0022] As an embodiment of the present application, for the search management service, its subordinate target component list may include: a local search service component list, a global search service component list, and an online search service component list.

[0023] As an embodiment of the present application, for the account and synchronization management service, its subordinate target component list may include: an account authentication service component list and an account synchronization service component list.

[0024] In a fourth possible implementation manner of the first aspect, the target operation is an installation operation, an update operation, or an uninstallation operation.

[0025] Since installation operations, update operations or uninstall operations are extremely common and high-frequency operations for applications, processing resource update control for these operations can effectively improve the processor load caused by resource updates during actual use of electronic devices, thereby improving the effectiveness and practicality of the embodiments of the present application.

[0026] In a fifth possible implementation of the first aspect, the first component list is any target component list. Analyzing whether the content of each to-be-updated resource will change under the target operation includes:

[0027] When the target operation is an installation operation, it is analyzed whether the program package of the application program contains the components required to be recorded in the first component list.

[0028] When the program package does not include the components required to be recorded in the first component list, it is determined that the content of the first component list will not change.

[0029] In actual applications, for an installation operation, when the application package includes the specific component, it means that in this installation operation, the content of the first component list needs to add the specific component information of the application. Therefore, the embodiment of the present application can realize a simple, accurate and fast identification of whether the content of the resource to be updated will change in the installation operation.

[0030] As an embodiment of the present application, for the accessibility management service, it is possible to query whether the application package contains an accessibility service component. If the package contains an accessibility service component, it means that in this update operation, the accessibility service component information of the application needs to be added to the accessibility service component list.

[0031] For the search management service, check whether the application package contains the local search service component, the global search service component, and the online search service component. If the package contains any of these components, it means that in this update operation, the component information of the application needs to be added to the component list under the search management service.

[0032] For the Account and Synchronization Management Service, check whether the application package contains the Account Authentication Service component and the Account Synchronization Service component. If the package contains any of these components, it means that in this update operation, the component information of the application needs to be added to the component list under the Account and Synchronization Management Service.

[0033] In a sixth possible implementation of the first aspect, the first component list is any target component list. Analyzing whether the content of each to-be-updated resource will change under the target operation includes:

[0034] When the target operation is an uninstall operation, it is analyzed whether component information of the application is recorded in the first component list.

[0035] When component information of the application is not recorded in the first component list, it is determined that the content of the first component list will not change.

[0036] In actual applications, the uninstallation operation is to remove the application from the electronic device. Therefore, when the component information of the application is not recorded in the first component list, it means that the component information of application A in the first component list does not need to be cleared after uninstallation, that is, the content of the first component list will not change. Therefore, the embodiment of the present application can realize simple, accurate and fast identification of whether the content of the resource to be updated will change under the uninstallation operation.

[0037] In a seventh possible implementation of the first aspect, the first component list is any target component list. Analyzing whether the content of each to-be-updated resource will change under the target operation includes:

[0038] When the target operation is an update operation, it is analyzed whether the program package of the application contains the components required to be recorded in the first component list, and it is analyzed whether the component information of the application is recorded in the first component list.

[0039] When the program package does not include the components required to be recorded in the first component list, and the component information of the application is not recorded in the first component list, it is determined that the content of the first component list will not change.

[0040] As an embodiment of the present application, the update operation includes: a version update operation, a content update operation, and a permission update operation.

[0041] In actual applications, the specific operational conditions of the update operation are relatively complicated, and the embodiments of the present application can be compatible with the situations that may arise under these specific update operations, so that the component list can be updated in time when the content of the target component list needs to change, and the component list will not be updated when the content of the target component list does not need to change.

[0042] As an embodiment of the present application, when the target operation is a version update operation in an update operation, the operations on the program package are all operations on the new version of the program package. For example, "analyzing whether the program package of the current application contains the components required to be recorded in the first component list" can be concretized as: analyzing whether the program package of the new version of the application contains the components required to be recorded in the first component list. That is, the embodiment of the present application determines whether there are components required to be recorded for the new version of the program part. If so, it means that the component information in the first component list needs to be updated.

[0043] In an eighth possible implementation manner of the first aspect, when a broadcast associated with an application is detected, an operation event corresponding to the broadcast is determined.

[0044] When the determined operation event is an operation event corresponding to the target operation, it is determined that the target operation on the application is detected.

[0045] The embodiments of the present application can quickly and accurately determine the current target operation on the application by broadcasting events.

[0046] As an embodiment of the present application, for the installation operation, it can be set that when the ACTION_PACKAGE_ADDED broadcast is detected or the ACTION_PACKAGE_ADDED broadcast and the ACTION_PACKAGE_CHANGED broadcast are detected, it is determined that the installation operation of the application is detected. For the update operation, it can be set that when the ACTION_PACKAGE_CHANGED broadcast is detected, it is determined that the update operation of the application is detected. For the uninstallation operation, it can be set that when the ACTION_PACKAGE_REMOVED broadcast is detected, it is determined that the uninstallation operation of the application is detected.

[0047] A second aspect of an embodiment of the present application provides a resource update control device, including:

[0048] The resource determination module is used to determine a number of resources to be updated associated with the target operation when a target operation on the application is detected.

[0049] The analysis module is used to analyze whether the content of each resource to be updated will change under the target operation.

[0050] The stop updating module is used to not update the resources whose contents will not change among the resources to be updated.

[0051] The resource update module is used to update resources whose contents will change.

[0052] As an optional embodiment of the present application, the resource update control device can serve as an execution entity to implement any method of the above-mentioned first aspect.

[0053] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any method of the first aspect when executing the computer program.

[0054] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of any one of the above-mentioned first aspects is implemented.

[0055] In a fifth aspect, an embodiment of the present application provides a chip system, the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement any method as described in any one of the first aspects above. The chip system can be a single chip, or a chip module composed of multiple chips.

[0056] In a sixth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any method described in the first aspect above.

[0057] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1A A schematic diagram of the hardware structure of a mobile phone provided in an embodiment of the present application;

[0059] Figure 1B A software structure block diagram of an electronic device provided in an embodiment of the present application;

[0060] Figure 2 A flowchart of the resource update control method provided in the embodiment of the present application;

[0061] Figure 3 Another implementation flow chart of the resource update control method provided in the embodiment of the present application;

[0062] Figure 4A A timing diagram of various events under the android.bg thread when installing an application provided in an embodiment of the present application;

[0063] Figure 4B A timing diagram of various events under the android.bg thread when disabling an application component provided in an embodiment of the present application;

[0064] Figure 4C A timing diagram of various events under the android.bg thread when uninstalling an application provided in an embodiment of the present application;

[0065] Figure 5 Another implementation flow chart of the resource update control method provided in the embodiment of the present application;

[0066] Figure 6 Another implementation flow chart of the resource update control method provided in the embodiment of the present application;

[0067] Figure 7 A schematic diagram of the structure of a resource update control device provided in an embodiment of the present application;

[0068] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0070] When an electronic device detects a specific operation on an application (hereinafter referred to as an operation), it will respond to the operation and update the specific resources associated with the operation, thereby updating and maintaining the resource content. The resource update operation will increase the processor load to a certain extent and may cause the processor to be blocked. At the same time, the resource update will also increase the power consumption of the electronic device.

[0071] Take an electronic device with an Android system as an example to illustrate:

[0072] In the Android system, common operations on applications generally include: installation operations, update operations, and uninstall operations, among which update operations include version update operations, content update operations, and permission update operations (such as disabling or restoring components) of applications. These common operations can be triggered by manual operations of users or performed by electronic devices themselves. For example, users manually update applications or electronic devices automatically update electronic devices to implement update operations on applications.

[0073] When performing these operations, the electronic device will trigger multiple associated services. These services will update one or more service component lists (hereinafter referred to as component lists, where component lists are resources) under them after being triggered to maintain the validity of these component lists. As a result, when an operation is triggered, the electronic device will synchronously update multiple component lists.

[0074] For example, for the installation operation, the electronic device will trigger multiple associated services, including but not limited to accessibility management services, search management services, and account and synchronization management services. Among them, each service will update its own subordinate component list after being triggered. For example, for the accessibility management service, after being triggered, the content of the corresponding accessibility service component list (hereinafter referred to as the accessibility list) will be updated according to the installed application. Specifically, it can be queried whether there is an accessibility component in the application package (that is, whether it supports accessibility services. If there is an accessibility component, it supports accessibility services, such as supporting blind mode related functions, etc.). If the application supports accessibility services, the accessibility component is added to the accessibility list. If it does not support it, the accessibility list will be refreshed. In this way, timely recording of applications that support accessibility services is achieved, and the update and maintenance of the accessibility list is achieved. For another example, for the search management service, after being triggered, the content of the local search component list, the global search component list, and the online search component list under itself will be updated according to the installed application. Specifically, it is possible to query whether the application package contains a search component. If it does (i.e., supports search services), the search component is added to the local search component list, the global search component list, and the online search component list. If it does not contain a search component, the barrier-free list is refreshed. This allows for timely recording of applications that support search services.

[0075] However, in actual applications, it is found that not every operation on an application involves changes in the content of related resources. Even for some resources, operations in many cases do not involve changes in the content of resources. For example, for the above-mentioned barrier-free services, many applications do not support barrier-free services. Therefore, for these applications that do not support barrier-free services, the installation, update and uninstallation of their applications will trigger the barrier-free management service and update the barrier-free list. However, the updating of the barrier-free list at this time is essentially refreshing the barrier-free list, and will not add or delete information to the barrier-free list, that is, it will not cause the content of the barrier-free list to change. For the case where the operation does not involve changes in the content of resources, the update operation of resources at this time does not have much practical significance, but will increase the invalid processor load and cause unnecessary power consumption. For example, for electronic devices installed with Android systems, various services need to parse the meta data of each component in the process of building a service list (including updating the service list), and need to access the application resource package across packages. This whole process is cumbersome and time-consuming. However, for operations that do not involve changes in the content of the component list, updating the component list in response to the operation will result in meaningless updates to the component list, and the update operation will also increase unnecessary processor load and cause unnecessary power consumption.

[0076] In order to reduce the processor load of the electronic device caused by the resource update caused by the application operation, in the embodiment of the present application, after detecting the preset operation, the electronic device will not directly update the resources associated with the preset operation, but first analyze whether the preset operation may cause the content of each associated resource to change. For example, whether it will cause the addition or deletion of a certain resource content. For resources with content changes, the resource update operation is performed normally. For resources without content changes, the resource update operation is terminated.

[0077] Since the embodiment of the present application can timely determine whether the content of each resource associated with the operation may change after the preset operation occurs, and terminate the update of the resources without content change, the embodiment of the present application can effectively avoid some invalid update operations on resources in actual applications, that is, it can avoid the processor load caused by these resource update operations, thereby reducing the processor load of the electronic device and reducing the power consumption of the electronic device.

[0078] The resource update control method provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, personal computers and servers. In this case, the electronic device is the executor of the resource update control method provided in the embodiment of the present application, and the embodiment of the present application does not impose any restrictions on the specific type of the electronic device. At the same time, the embodiment of the present application does not impose any restrictions on the operating system installed and run by the electronic device, which can be determined according to the actual application situation. For example, when the electronic device is a terminal device such as a mobile phone or a tablet computer, the operating system can be an Android system, an IOS system or a Windows system, etc. When the electronic device is a non-terminal device such as a personal computer or a server, the operating system can be a Windows system, a Mac OS system, a Linux system or a UNIX system, etc.

[0079] The following takes the electronic device as a mobile phone as an example. Figure 1A A schematic structural diagram of the mobile phone 100 is shown.

[0080] The mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a SIM card interface 195, etc. The sensor module 180 may include a gyroscope sensor 180A, an acceleration sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an ambient light sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, and a touch sensor 180K (of course, the mobile phone 100 may also include other sensors, such as a temperature sensor, a pressure sensor, an air pressure sensor, a bone conduction sensor, etc., which are not shown in the figure).

[0081] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0082] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (Neural-network Processing Unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. Among them, the controller can be the nerve center and command center of the mobile phone 100. The controller can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0083] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0084] The processor 110 can run the resource update control provided in the embodiment of the present application to reduce the load on the processor caused by the resource update and improve the user experience. The processor 110 can include different devices. For example, when the CPU and GPU are integrated, the CPU and GPU can cooperate to execute the resource update control provided in the embodiment of the present application. For example, part of the algorithm in the resource update control is executed by the CPU, and another part of the algorithm is executed by the GPU to obtain faster processing efficiency.

[0085] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. The display screen 194 can be used to display information input by a user or information provided to a user and various graphical user interfaces (GUI). For example, the display screen 194 can display photos, videos, web pages, or files, etc. For another example, the display screen 194 can display a graphical user interface. The graphical user interface includes a status bar, a hidden navigation bar, a time and weather widget, and application icons, such as a browser icon. The status bar includes the operator name (such as China Mobile), the mobile network (such as 4G), the time, and the remaining power. The navigation bar includes a back key icon, a home key icon, and a forward key icon. In addition, it can be understood that in some embodiments, the status bar may also include a Bluetooth icon, a Wi-Fi icon, an external device icon, etc. It can also be understood that in other embodiments, the graphical user interface may also include a Dock bar, and the Dock bar may include commonly used application icons, etc. When the processor detects a touch event of a user's finger (or a stylus, etc.) for a certain application icon, in response to the touch event, the user interface of the application corresponding to the application icon is opened, and the user interface of the application is displayed on the display screen 194.

[0086] In the embodiment of the present application, the display screen 194 can be an integrated flexible display screen, or a spliced ​​display screen consisting of two rigid screens and a flexible screen located between the two rigid screens. After the processor 110 runs the resource update control provided in the embodiment of the present application, the processor 110 can control the external audio output device to switch the output audio signal.

[0087] The camera 193 (a front camera or a rear camera, or one camera can be used as both a front camera and a rear camera) is used to capture still images or videos. Generally, the camera 193 may include a photosensitive element such as a lens group and an image sensor, wherein the lens group includes a plurality of lenses (convex lenses or concave lenses) for collecting light signals reflected by the object to be photographed and transmitting the collected light signals to the image sensor. The image sensor generates an original image of the object to be photographed based on the light signal.

[0088] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store the code of the operating system, application programs (such as camera applications, WeChat applications, etc.). The data storage area can store data created during the use of the mobile phone 100 (such as images, videos, etc. collected by the camera application), etc.

[0089] The internal memory 121 may also store one or more computer programs corresponding to the resource update control provided in the embodiment of the present application. The one or more computer programs are stored in the above-mentioned memory 121 and are configured to be executed by the one or more processors 110. The one or more computer programs include instructions, and the above-mentioned instructions can be used to execute such as Figures 2 to 6 In each step of the corresponding embodiment, the computer program may include an account verification module and a priority comparison module. Among them, the account verification module is used to authenticate the system authentication account of other electronic devices in the local area network; the priority comparison module can be used to compare the priority of the audio output request service and the priority of the current output service of the audio output device. The state synchronization module can be used to synchronize the device state of the audio output device currently connected to the electronic device to other electronic devices, or synchronize the device state of the audio output device currently connected to other devices to the local. When the code for resource update control stored in the internal memory 121 is executed by the processor 110, the processor 110 can control the electronic device to perform resource update control.

[0090] In addition, the internal memory 121 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0091] Of course, the resource update control code provided in the embodiment of the present application can also be stored in an external memory. In this case, the processor 110 can run the resource update control code stored in the external memory through the external memory interface 120, and the processor 110 can control the electronic device to perform resource update control.

[0092] The functions of the sensor module 180 are described below.

[0093] The gyroscope sensor 180A can be used to determine the motion posture of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180A. That is, the gyroscope sensor 180A can be used to detect the current motion state of the mobile phone 100, such as shaking or stillness.

[0094] When the display screen in the embodiment of the present application is a foldable screen, the gyroscope sensor 180A can be used to detect a folding or unfolding operation on the display screen 194. The gyroscope sensor 180A can report the detected folding operation or unfolding operation as an event to the processor 110 to determine the folded state or unfolded state of the display screen 194.

[0095] The acceleration sensor 180B can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes). That is, the gyroscope sensor 180A can be used to detect the current motion state of the mobile phone 100, such as shaking or stillness. When the display screen in the embodiment of the present application is a foldable screen, the acceleration sensor 180B can be used to detect the folding or unfolding operation acting on the display screen 194. The acceleration sensor 180B can report the detected folding operation or unfolding operation as an event to the processor 110 to determine the folding state or unfolding state of the display screen 194.

[0096] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The mobile phone emits infrared light outward through the light emitting diode. The mobile phone uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone. When insufficient reflected light is detected, the mobile phone can determine that there is no object near the mobile phone. When the display screen in the embodiment of the present application is a foldable screen, the proximity light sensor 180G can be set on the first screen of the foldable display screen 194, and the proximity light sensor 180G can detect the size of the folding angle or unfolding angle between the first screen and the second screen based on the optical path difference of the infrared signal.

[0097] The gyroscope sensor 180A (or the acceleration sensor 180B) can send the detected motion state information (such as angular velocity) to the processor 110. The processor 110 determines whether the current state is handheld or tripod based on the motion state information (for example, when the angular velocity is not 0, it means that the mobile phone 100 is in the handheld state).

[0098] The fingerprint sensor 180H is used to collect fingerprints. The mobile phone 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0099] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the mobile phone 100, which is different from the position of the display screen 194.

[0100] Exemplarily, the display screen 194 of the mobile phone 100 displays a main interface, which includes icons of multiple applications (such as a camera application, a WeChat application, etc.). The user clicks the icon of the camera application in the main interface through the touch sensor 180K, triggering the processor 110 to start the camera application and turn on the camera 193. The display screen 194 displays the interface of the camera application, such as a viewfinder interface.

[0101] The wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0102] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0103] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110. In an embodiment of the present application, the mobile communication module 150 can also be used to interact with other electronic devices for information.

[0104] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0105] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2. In the embodiment of the present application, the wireless communication module 160 can be used to access the access point device and send and receive messages to other electronic devices.

[0106] In addition, the mobile phone 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. For example, music playback, recording, etc. The mobile phone 100 can receive input from the key 190 and generate key signal input related to the user settings and function control of the mobile phone 100. The mobile phone 100 can use the motor 191 to generate a vibration prompt (such as a vibration prompt for an incoming call). The indicator 192 in the mobile phone 100 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 in the mobile phone 100 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 195, or pulled out from the SIM card interface 195, to achieve contact and separation with the mobile phone 100.

[0107] It should be understood that in actual applications, the mobile phone 100 may include Figure 1A The embodiments of the present application are not limited to the more or fewer components shown. The illustrated mobile phone 100 is only an example, and the mobile phone 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.

[0108] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device. Figure 1B It is a software structure block diagram of the electronic device according to an embodiment of the present application.

[0109] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0110] The application layer may include a series of application packages and the management of applications (ie, application management).

[0111] like Figure 1B As shown, the application package may include applications such as desktop, settings, and application store. Application management may include management functions such as application installation, application update, application uninstallation, and application disablement / recovery.

[0112] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0113] like Figure 1B As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, an accessibility management service (AccessibilityManagerService), a search management service (SearchManagerService) and an account and synchronization management service (RegisteredServicesCache), etc.

[0114] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0115] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0116] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0117] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).

[0118] The Resource Manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, etc. The Resource Manager can obtain Resource objects and application package resources (ApkAssets), etc.

[0119] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0120] The accessibility management service is used to manage accessibility services in electronic devices (manage applications that support accessibility services). For example, a service component list of accessibility services can be constructed to record the status of each application that supports accessibility services in the electronic device.

[0121] The search management service is used to manage the search services in electronic devices. For example, a list of service components with search service capabilities (such as local search, global search, and online search) can be constructed to record the status of each application supporting the search service in the electronic device.

[0122] The account and synchronization management service is used to manage the account authentication service and account synchronization service in the electronic device. For example, a service component list of the account authentication service and account synchronization service can be constructed to record the status of each application supporting the account synchronization service in the electronic device.

[0123] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0124] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0125] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0126] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0127] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0128] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.164, MP3, AAC, AMR, JPG, PNG, etc.

[0129] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0130] A 2D graphics engine is a drawing engine for 2D drawings.

[0131] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0132] The following is an example of the workflow of the software and hardware of the mobile phone 100, with reference to a scenario where the mobile phone 100 performs resource update control.

[0133] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into raw input events, which are stored in the kernel layer. The application framework layer obtains the raw input events from the kernel layer and updates the service component list in the mobile phone by calling various services in the application framework layer (such as accessibility management service, search management service, and account and synchronization management service, etc.) to maintain the service component list.

[0134] The embodiment of the present application can be applied to any situation where the update of associated resources is triggered due to the operation of electronic device applications, so as to reduce the processor load caused by resource updates. Accordingly, according to different actual application scenarios, the specific reference of "resources" may also be different. For example, in some application scenarios, resources can refer to data resources such as the application itself or associated audio, video, pictures, components or plug-ins. At this time, the content of the resources refers to the specific data content contained in these data resources themselves, such as the specific audio content contained in the audio or the specific video content contained in the video. In other optional embodiments, resources can also refer to: an information list or list (hereinafter referred to as list resources, and the data object used to record the list resources is referred to as target data) for recording the audio, video, picture, component or plug-in data of the application. At this time, the content of the resources refers to the information content of the target data recorded in these list resources, such as the data identification of the target data.

[0135] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0136] It should be noted that in actual applications, the number of resources associated with a single operation may be one or more. In the embodiment of the present application, the processing method for whether each resource is updated is the same. Therefore, a single resource is used as an example for illustration. Figure 2 The following is a flowchart of the resource update control method provided in the first embodiment of the present application, which is described in detail as follows:

[0137] S101, when the electronic device detects a target operation on an application, it determines resources to be updated that are associated with the target operation.

[0138] In practical applications, there can be multiple types of operations on electronic devices, and the resource situations associated with each operation may also be different. Therefore, in the embodiment of the present application, the technician can select one or more operations according to actual needs as the operation (i.e., target operation) for processing in the embodiment of the present application. For example, in some embodiments, the target operation may include any operation in the installation operation, update operation, and uninstallation operation of the application. At the same time, for each target operation, there may be multiple resources associated with it. In the embodiment of the present application, one or more resources can also be selected from the resources associated with each target operation according to actual needs as the resource object processed in the embodiment of the present application. For example, in some optional embodiments, all resources associated with the target operation that may be updated with the target operation can be used as the resource object processed in the embodiment of the present application. For example, assuming that in practical applications, when the application is installed, the update of resource A, resource B, and resource C may be triggered. At this time, resource A, resource B, and resource C can be selected as the resource object processed in the embodiment of the present application, and some of the resources can also be selected as the resource object processed in the embodiment of the present application. It should be noted that for each target operation, one or more resources can be independently selected as the resource object processed in the embodiment of the present application.

[0139] In the case of presetting the specific operations included in the target operation and the resource objects associated with each target operation. The electronic device can detect whether there is an operation on the application during operation, and determine whether the operation belongs to the target operation. When the target operation on the application is detected, the resource object actually associated with the target operation is determined, and used as the resource to be updated in the embodiment of the present application. Among them, the embodiment of the present application does not make too many restrictions on the detection method of the specific target operation, and can be determined according to the actual application situation. For example, in some optional embodiments, it is possible to detect whether there is an operation on the application by detecting an operation event, and determine whether the operation is a target operation based on the event type of the operation event. Since the embodiment of the present application is described with respect to a single resource, the resource to be updated determined at this time can be any resource object actually associated with the target operation.

[0140] S102, the electronic device analyzes whether the resource content of the resource to be updated will change when the target operation is performed on the application.

[0141] After determining the target operation and the resource to be updated, the embodiment of the present application can continue to analyze whether the target operation on the application will cause the resource content of the resource to be updated to change. That is, whether the electronic device will involve changes in the content of the resource to be updated during the normal response to the target operation, such as whether it will cause the content of the resource to be updated to be added, deleted or replaced. Among them, the embodiment of the present application does not make too many restrictions on the specific analysis method of whether the resource content of the resource to be updated will change, which can be set by technical personnel according to actual needs.

[0142] For example, in some optional embodiments, it is assumed that the resource to be updated is a data resource (such as audio data, etc.). At this time, the electronic device can determine whether, in the process of responding to the target operation, part or all of the content of the existing resource to be updated will be deleted, whether the content of the resource to be updated will be replaced. And if the resource to be updated does not currently exist in the electronic device, whether the resource to be updated will be added, etc. If these situations may occur, it can be determined that the resource content of the resource to be updated will change.

[0143] For another example, in some other optional embodiments, it is assumed that the resource to be updated is a list resource (such as a component list, etc.). At this time, the electronic device can determine whether the target data recorded in the list resource will change in the process of responding to the target operation. For example, whether the existing target data will be deleted, updated or replaced, whether new target data will be added, etc. If these situations are likely to occur, it can be determined that the resource content of the resource to be updated will change (that is, the information of the target data recorded in the list resource will change).

[0144] S103: If the analysis result shows that the resource content of the resource to be updated will change, the electronic device updates the resource to be updated.

[0145] S104: If the analysis result shows that the resource content of the resource to be updated does not change, the electronic device does not update the resource to be updated.

[0146] When the analysis result shows that the resource content of the resource to be updated will change, it means that updating the resource to be updated at this time is the real demand behavior of the electronic device. Therefore, at this time, the embodiment of the present application can continue to update the resource to be updated normally to maintain the validity of the resource to be updated. On the contrary, when the analysis result shows that the resource content of the resource to be updated will not change, it means that if the resource to be updated is updated at this time, it is likely to perform update operations such as data refresh that do not involve changes in substantial content. That is, the update operation of the resource to be updated at this time is likely to have no practical significance. Therefore, at this time, the embodiment of the present application does not continue to perform subsequent update operations on the resource to be updated, or it can also be described as stopping the update operation of the resource to be updated. Among them, the embodiment of the present application does not make too many restrictions on the specific update operation of the resource to be updated, and can be determined according to the actual situation of the electronic device. For example, part or all of the content of the resource to be updated can be deleted, or it can be replaced or newly added.

[0147] It should be understood that when the embodiment of the present application decides whether to perform an update operation on a resource to be updated, whether or not the resource to be updated is ultimately updated will not affect other normal responses of the electronic device to the target operation.

[0148] Take an example to illustrate, assuming that the target operation is an uninstall operation on application A, and the resource to be updated is multimedia resource A downloaded by the application (including audio data, video data and picture data of application A). And assuming that under normal circumstances, when the electronic device responds to the uninstall operation on application A, it will normally uninstall application A on the one hand, and will clear the multimedia resources cached by the application on the other hand. When applied in combination with the embodiment of the present application, while the electronic device is normally uninstalling application A, if the analysis result is that the resource content of multimedia resource A will change, then the electronic device can continue to delete multimedia resource A normally at this time. On the contrary, if the analysis result is that the resource content of multimedia resource A will not change, then the electronic device can uninstall application A normally, but will not continue to delete multimedia resource A.

[0149] For another example, an example is used to illustrate. It is assumed that the target operation is the installation operation of application A, and the resource to be updated is a component list A used to record the component list A supporting function A in each application (when a certain application contains component A corresponding to function A, it can be considered that the application supports function A). At the same time, it is assumed that under normal circumstances, when the electronic device detects the installation operation of application A, on the one hand, it will normally install application A, and on the other hand, it will update component list A according to the components contained in application A. If application A contains component A, the component information of application A is added to component list A. If application A does not contain component A, refresh component list A. When applied in conjunction with the embodiment of the present application, the electronic device can detect whether component A is included in application A while installing application A normally. If application A contains component A, it can be determined that the analysis result is that the resource content of the resource to be updated will change, and at this time, component list A can be updated and the component information of application A can be added. On the contrary, if application A does not contain component A, it can be determined that the analysis result is that the resource content of the resource to be updated will not change, and at this time, component list A can not be updated.

[0150] In an embodiment of the present application, for any resource to be updated associated with the target operation, a targeted analysis of whether a change in resource content will occur can be achieved. In the case where the resource content will change, the resource to be updated can continue to be updated normally, thereby ensuring the timeliness of the resource to be updated. In the case where the resource content will not change, it can be chosen not to update the resource to be updated, thereby avoiding meaningless updates to the resource to be updated. Therefore, from the perspective of a single resource to be updated, an embodiment of the present application can avoid updating the resource to be updated without content updates, and therefore can avoid the load on the processor caused by this part of meaningless updates, thereby effectively reducing the load on the electronic device processor, while reducing the power consumption caused to the electronic device.

[0151] Considering that the operation of an application in actual applications often involves multiple resources, that is, the target operation in actual applications is often associated with multiple resources to be updated. Therefore, in actual applications, the process of processing a single application target operation often involves the simultaneous processing of update judgment and control of multiple resources to be updated. Based on this, Figure 2 Based on the embodiment shown, the description is given from the perspective that there may be multiple resources to be updated. Figure 3 , is a flowchart of another resource update control method provided in an embodiment of the present application, which is described in detail as follows:

[0152] S201: When the electronic device detects a target operation on an application, it determines one or more resources to be updated that are associated with the target operation.

[0153] S201 is an extension of S101, that is, what is determined in S101 is a resource to be updated associated with the target operation, while what is determined in S201 is several resources to be updated associated with the target operation. Therefore, the description of S201 can refer to the relevant description in S101, and will not be repeated here. The following is an explanation of the differences between S201 and S101:

[0154] In the case where the specific operations included in the target operation and the resource objects associated with each target operation are pre-set. The electronic device can detect whether there is an operation on the application during operation, and determine whether the operation belongs to the target operation. When the target operation on the application is detected, some or all of the resource objects associated with the target operation can be used as resources to be updated in the embodiment of the present application. For example, assuming that in an actual application, when the application is installed, the update of resources A, B, C and D may be triggered, and resources A, B and C therein are all used as resource objects processed in the embodiment of the present application. On this basis, when the target operation is an installation operation, any one or more resources among resources A, B and C can be used as resources to be updated in the embodiment of the present application.

[0155] S202, the electronic device analyzes whether the resource content of each resource to be updated will change under the target operation.

[0156] Similarly, S202 is an extension of S102, that is, the electronic device will determine whether the resource content of each resource to be updated will change. Since the judgment logic for whether each resource to be updated will change is the same, the relevant instructions in S102 can be referred to to implement the processing of each resource to be updated.

[0157] In the embodiment of the present application, any single resource to be updated may be referred to as a first resource. When the resource to be updated is a list resource, the first resource may also be referred to as a first list.

[0158] S203: For a resource to be updated whose content will change as a result of analysis, the electronic device updates the resource to be updated.

[0159] S204: For the to-be-updated resources whose content has not changed as a result of the analysis, no update is performed.

[0160] S103 and S104 are both processing methods for a single resource to be updated. When there are multiple resources to be updated, the analysis result of each resource to be updated may be "the resource content will change" or "the resource content will not change". Therefore, accordingly, based on S103 and S104, the embodiment of the present application can choose to update the resources whose resource content will change normally for the case where there are multiple resources to be updated, and no longer continue to update the resources whose resource content will not change. Among them, the specific operation on a single resource to be updated can refer to the description of S103 and S104, which will not be repeated here.

[0161] exist Figure 2 On the basis of the illustrated embodiment, the embodiment of the present application can realize the update control of multiple resources to be updated associated with the target operation. For the resources to be updated whose resource content will change, normal updates continue to be performed to ensure the timeliness of the resources to be updated. For the resources to be updated whose resource content will not change, it can be chosen not to update, thereby avoiding meaningless updates to these resources to be updated. Therefore, from the overall perspective of all resources to be updated, the embodiment of the present application avoids updating a large number of resources to be updated that have no content updates. Therefore, the load on the processor caused by the meaningless update of this part can be avoided, and the load caused by the overall resource update can be reduced, thereby effectively reducing the load on the electronic device processor, while reducing the power consumption caused to the electronic device.

[0162] As an embodiment of the present application, the following is an example in which the target operation includes: installation operation, update operation and uninstallation operation, and the resources include a service component list.

[0163] When performing operations such as installing, updating, and uninstalling an application, the electronic device will trigger the associated service and then build a list of related service components. The following first describes several services mainly involved in the embodiment of the present application. Refer to Table 1 for the relevant information of several services provided by the embodiment of the present application:

[0164] Table 1

[0165]

[0166] Among them, triggering factors refer to some factors that can trigger the corresponding service. For example, for the accessibility management service, when a broadcast event such as power-on broadcast, unlock broadcast, user switching, and application installation, uninstallation, and update occurs in the electronic device (i.e., package installation, uninstallation, and update broadcast), the accessibility management service can be triggered to run. In the embodiment of the present application, there can be at least two specific implementation scenarios for the account and synchronization management service: synchronization adapter service (SyncAdaptersCache) and account authentication service (AccountAuthenticatorCache).

[0167] The following uses an Android electronic device as an example to illustrate the process of updating the service component list:

[0168] 1. Application installation operation:

[0169] When installing an application through the app store or other sources, the package manager service (PackageManagerService, PMS) in the electronic device will send ACTION_PACKAGE_ADDED broadcast and ACTION_PACKAGE_CHANGED broadcast, and the android.bg thread will handle the broadcast. Specifically, when processing the broadcast, the android.bg thread triggers the accessibility management service, search management service, account and synchronization management service, and other related services. At this time, these services will begin to update their corresponding service component lists. In the process of building the service component list, it is necessary to access the application resource package across packages and parse the metadata of each component. As a result, the entire android.bg thread takes a long time.

[0170] For example, you can refer to Figure 4A, is a timing diagram of various schematic events under the android.bg thread provided by an embodiment of the present application when downloading and installing application A in the application market (the resource update control method in the embodiment of the present application is not adopted). In the embodiment of the present application, the events corresponding to the accessibility management service, search management service, account and synchronization management service and other related services under the installation operation are respectively referred to as: event A1, event B1, event C1 and event D1. Among them, each event is composed of multiple smaller unit events (that is, it contains smaller events). For example, event A1 can include event a1, and event a1 can include event a2, and event a2 can include event a3, etc. Similarly, event B1 can include event b1, and event b1 can include event b2, etc. Among them, in the process of processing these events, the states of the android.bg thread processing events include at least: Running, Runnable, Uninterruptible Sleep (IO), Runnable (Preempted), Sleeping, and Uninterruptible Sleep (non-IO).

[0171] As a specific embodiment of the present application, in the embodiment of the present application, the relevant parameters of each state: duration (Wall duration), average duration (Avg Wall duration) and number of times (Occurrences) are as shown in Table 2 below:

[0172] Table 2

[0173]

[0174] 2. Application update operation:

[0175] When performing manual / automatic version updates, content updates, or permission updates on an application, PMS will issue an ACTION_PACKAGE_CHANGED broadcast, which will be handled by the android.bg thread. Specifically, when the android.bg thread handles the broadcast, it triggers the accessibility management service, search management service, account and synchronization management service, and other related services. At this time, these services will begin to update their corresponding service component lists.

[0176] For example, you can refer to Figure 4B, is a timing diagram of various schematic events under the android.bg thread when a component of application A is disabled (the resource update control method in the embodiment of the present application is not adopted) provided in an embodiment of the present application. In the embodiment of the present application, the events corresponding to the accessibility management service, search management service, account and synchronization management service and other related services under the update operation are respectively referred to as: event A2, event B2, event C2 and event D2. Among them, each event is composed of multiple smaller unit events. For example, event A2 can include event a11, and event a11 can include event a21, event a21 can include event a31, etc. Similarly, event B2 can include event b11, event b11 can include event b21, etc.

[0177] As a specific embodiment of the present application, in the embodiment of the present application, in the process of processing these events, the parameters related to each state of the android.bg thread processing events are as follows in Table 3:

[0178] Table 3

[0179]

[0180] 3. Uninstallation of the application:

[0181] When uninstalling an application, PMS sends out ACTION_PACKAGE_REMOVED broadcast, which is handled by android.bg thread. Specifically, when android.bg thread handles the broadcast, it triggers accessibility management service, search management service, account and synchronization management service and other related services. At this time, these services will start to update their corresponding service component lists.

[0182] For example, you can refer to Figure 4C , is a timing diagram of various schematic events under the android.bg thread when an application A is uninstalled (the resource update control method in the embodiment of the present application is not adopted) provided in an embodiment of the present application. In the embodiment of the present application, the events corresponding to the accessibility management service, search management service, account and synchronization management service and other related services under the uninstall operation are respectively referred to as: event A3, event B3, event C3 and event D3. Among them, each event is composed of multiple smaller unit events (and contains smaller events). For example, event A3 can include event a12, and event a12 can include event a22, and event a22 can include event a32, etc. Similarly, event B3 can include event b12, and event b12 can include event b22, etc.

[0183] As a specific embodiment of the present application, in the embodiment of the present application, in the process of processing these events, the parameters related to each state of the android.bg thread processing events are as follows in Table 4:

[0184] Table 4

[0185]

[0186] In order to reduce the time consumption in the above-mentioned target operation process, in some optional implementation methods, it is possible to choose to cache all resources that may be used in real time, so that the electronic device can call resources in time when needed. However, it is found in actual applications that real-time caching of resources consumes a lot of system memory, which may cause insufficient system memory and problems in the operation of electronic devices. For example, in actual applications, it is found that when an application resource (apkAssets) object is cached in real time, the system memory required is about 1M. When the system needs to cache more application resources, the system memory will be occupied for a long time, which may easily cause the electronic device to run stuck. Therefore, this method still has certain defects and is less practical.

[0187] exist Figure 3 Based on the embodiments shown, reference can be made to Figure 5 , is a flowchart of a resource update control method provided in an embodiment of the present application. In the embodiment of the present application, the target operation includes at least: installation operation, update operation and uninstallation operation, and the resource includes a service component list. In the embodiment of the present application, S201 can be replaced by S301, S202 can be replaced by S302, S203 can be replaced by S3030, and S204 can be replaced by S304. The details are as follows:

[0188] S301, when the electronic device detects a target operation on an application, it determines a number of preset services associated with the target operation and a list of target components under each preset service.

[0189] In the embodiment of the present application, the operation of controlling the update of the component list is collectively referred to as the target operation, and the specific operation type included in the target operation can be set by the technician. For example, in some embodiments, the target operation can include any operation of the installation operation, the update operation, and the uninstallation operation. On this basis, when the installation operation, the update operation, or the uninstallation operation is detected, the S301 process can be triggered.

[0190] Since the number of services associated with each operation may be one or more, the specific circumstances of each service are different. For example, some services will update the component list when the target operation occurs, while others will not. For another example, it is found in actual applications that even for services that update the component list, the degree of additional load brought to the processor by different services when updating the component list varies depending on the service type. Therefore, in actual applications, it is possible to select some or all of the services triggered by the target operation from all services associated with the target operation as the preset services in the embodiments of the present application according to demand.

[0191] As an optional embodiment of the present application, it is found in actual application that the three services, namely, the accessibility management service, the search management service and the account and synchronization management service, often build or update the corresponding component list when responding to target operations such as installation operations, update operations and uninstall operations. And through analysis and testing, it is found that when these three services update the component list in response to the target operation, there are a large number of meaningless component list update operations. That is, the contents of many component lists have not changed, but they are still refreshed. Therefore, in the embodiment of the present application, the accessibility management service, the search management service and the account and synchronization management service are all used as preset services. At this time, when the target operation is detected, the accessibility management service, the search management service and the account and synchronization management service can be used as associated preset services. As another optional embodiment of the present application, any one or more of the above three services can also be used as preset services. That is, in the embodiment of the present application, the preset service includes: any one or more of the accessibility management service, the search management service and the account and synchronization management service.

[0192] Since each preset service has at least one component list, there are certain differences in the situations of each component list. For example, different component lists are used to record different component types. For example, component list A can be used to record information about applications with component a (i.e., supporting service a corresponding to component a), while component list B can be used to record information about applications that support component b (i.e., supporting service b corresponding to component b). Therefore, in actual applications, it is also possible to independently select the component list that specifically controls whether to update under each preset service based on actual needs (these selected component lists are also referred to as target component lists in the embodiments of the present application). On this basis, during the actual operation of the electronic device, the target component lists corresponding to each preset service can be selected based on these selection settings.

[0193] As an optional embodiment of the present application, all component lists under the preset service may be used as the target component list, so as to minimize the processor load caused by the component list update for these preset services.

[0194] Taking an example to illustrate, in an embodiment of the present application, for the accessibility management service, its subordinate target component list may include: an accessibility service component list. For the search management service, its subordinate target component list may include: a local search service component list, a global search service component list, and an online search service component list. And for the account and synchronization management service, its subordinate target component list may include: an account authentication service component list and an account synchronization service component list. In other optional embodiments, the component lists contained in the above three services may also be independently set.

[0195] In the case of pre-setting the target operation, preset service and target component list, the embodiment of the present application does not make too many restrictions on the detection method of the specific target operation. For example, in some optional embodiments, it can be judged whether the target operation is detected by detecting a specific event corresponding to the target operation. For example, when broadcast A corresponding to target operation A is detected, it can be determined that target operation A is detected.

[0196] As a specific embodiment of the present application, for the installation operation, it can be set that when an ACTION_PACKAGE_ADDED broadcast is detected, or when an ACTION_PACKAGE_ADDED broadcast and an ACTION_PACKAGE_CHANGED broadcast are detected, it is determined that an installation operation on the application is detected. For the update operation, it can be set that when an ACTION_PACKAGE_CHANGED broadcast is detected, it is determined that an update operation on the application is detected. For the uninstall operation, it can be set that when an ACTION_PACKAGE_REMOVED broadcast is detected, it is determined that an uninstall operation on the application is detected. Among them, these broadcasts can all be regarded as package operation events (handlePackageEvent) for the application, that is, operations are performed on the application.

[0197] S302, the electronic device analyzes whether the content of each target component list will change under the target operation.

[0198] After determining the target component list that needs to be updated and controlled, the embodiment of the present application begins to analyze whether the content of each target component list may change under the target operation.

[0199] As an optional embodiment of the present application, the method of analyzing each target component list is the same, so only a single target component list is used as an example for explanation. Assume that the target component list currently being processed is the first component list (the first component list is any target component list), and the target operations include: installation operation, uninstallation operation and update operation as an example. At this time, S302 can be replaced by: S3021 to S3023, as follows:

[0200] S3021, when the target operation is an installation operation, analyze whether the program package of the current application contains the components required to be recorded in the first component list. If the program package contains the components required to be recorded in the first component list, it is determined that the content of the first component list will change. If the program package does not contain the components required to be recorded in the first component list, it means that this update operation will not cause the content of the first component list to change.

[0201] Assume that the currently operated application is application A. When performing the installation operation of application A, it is possible to query whether the program package of application A contains the components required to be recorded in the first component list, that is, to determine whether application A supports the specific functions required to be recorded in the first component list. If the program package contains the specific component, it means that in this installation operation, the content of the first component list needs to add the specific component information of application A.

[0202] For example, for the accessibility management service, it is possible to determine whether application A supports the accessibility service function, that is, to query whether the program package of application A contains the accessibility service component. If the program package contains the accessibility service component, it means that in this update operation, the information of the accessibility service component of application A needs to be added to the accessibility service component list.

[0203] For the search management service, check whether the program package of application A contains local search service components, global search service components, and online search service components. If the program package contains any of these components, it means that in this update operation, the component information of application A needs to be added to the component list under the search management service. For example, when the program package contains a local search service component, it means that the local search service component information of application A needs to be added to the local search service component list. When the program package contains a global search service component, it means that the global search service component information of application A needs to be added to the global search service component list.

[0204] For the Account and Synchronization Management Service, check whether the package of Application A contains the Account Authentication Service component and the Account Synchronization Service component. If the package contains any of these components, it means that under this update operation, the component information of Application A needs to be added to the component list under the Account and Synchronization Management Service. For example, when the package contains the Account Authentication Service component, it means that the Account Authentication Service component information of Application A needs to be added to the Account Authentication Service component list. When the package contains the Account Synchronization Service component, it means that the Account Synchronization Service component information of Application A needs to be added to the Account Synchronization Service component list.

[0205] S3022, when the target operation is an uninstall operation, analyzing whether the first component list records component information of the current application. If the first component list records component information of the current application, it is determined that the content of the first component list will change. If the first component list does not record component information of the current application, it is determined that the content of the first component list will not change.

[0206] Corresponding to the installation operation, the uninstallation operation is to remove application A from the electronic device. Therefore, at this time, what the embodiment of the present application needs to analyze is whether the component information of application A is recorded in the first component list already locally. When the component information of application A is recorded, it means that the component information of application A in the first component list needs to be cleared after uninstallation, that is, the content of the first component list needs to change. On the contrary, it means that the component information of application A in the first component list does not need to be cleared after uninstallation, that is, the content of the first component list does not need to change.

[0207] As an optional embodiment of the present application, the specific operation details for the first component list belonging to the accessibility management service, search management service and account and synchronization management service are basically similar to those during the installation operation. The difference is that the object of the query is the first component list, and the content of the query is whether the first component list contains the component information of application A. Therefore, you can refer to the relevant instructions in the above S3021, which will not be repeated here.

[0208] Since the first component list may be stored in the electronic device in the form of a cache, in some embodiments, the first component list may be analyzed or queried by traversing the first component list of the global cache.

[0209] S3023, when the target operation is an update operation, analyzing whether the program package of the current application contains the components required to be recorded in the first component list, and whether the first component list records the component information of the current application. If the program package contains the components required to be recorded in the first component list, and / or the first component list records the component information of the current application, it is determined that the content of the first component list will change.

[0210] In actual applications, the specific operation of the update operation is relatively complex, such as version update operation, content update operation or permission update operation. There may be certain differences in the content involved in different operations. Therefore, in order to be compatible with the situations that may occur under these specific update operations, it is possible to update the component list in time when the content of the target component list needs to change, and not to update the component list when the content of the target component list does not need to change. In the embodiment of the present application, the components contained in the program package of application A and the component information recorded in the first component list can be considered at the same time. Among them, when the program package of application A contains the components required to be recorded in the first component list, it means that the component information in the first component list may need to be updated to the component information recorded in the program package. When the component information of the current application is recorded in the first component list, the update operation at this time may cause the component information of the record to be deleted or replaced. Therefore, in the embodiment of the present application, when any one or both of these two situations occur, it can be determined that the content of the first component list needs to change. On the contrary, if neither of the two situations exists, that is, the program package does not contain the components required to be recorded in the first component list, and the component information of the current application is not recorded in the first component list. This means that this update operation has little to do with the first component list, so it is highly likely that the content of the first component list will not change.

[0211] As an embodiment of the present application, when the target operation is a version update operation in an update operation, the operations on the program package are all operations on the new version of the program package. For example, "analyzing whether the program package of the current application contains the components required to be recorded in the first component list" can be concretized as: analyzing whether the program package of the new version of the application contains the components required to be recorded in the first component list. That is, the embodiment of the present application determines whether there are components required to be recorded for the new version of the program part. If so, it means that the component information in the first component list needs to be updated.

[0212] S303, the electronic device updates the component list whose contents in the target component list will be changed.

[0213] S304: The electronic device does not update the component list whose contents do not occur in the target component list.

[0214] When it is determined whether the content of each target component list will change, the target component list whose content will change can be updated normally. The specific component list update details are not limited here and can be determined according to the actual application situation. For the target component list whose content will not change, you can choose not to update it. This avoids meaningless update operations on these target component lists whose content will not change, and reduces the load brought to the processor by these update operations.

[0215] It should be understood that in actual applications, the update control for each target component list can be independent of each other, or can be linked to each other, which can be determined according to the actual situation of the target component list. Therefore, the operations of S302 to S304 can be to update the target component list after determining whether the content of a single target component list will change each time. It can also be to batch control the update of multiple target component lists after determining whether the contents of these target component lists will change. No excessive restrictions are made here.

[0216] As an optional embodiment of the present application, in actual application, the above-mentioned embodiments of the present application can be embedded before the component list update step of the default component list update process, so as to control whether the component list is updated. For example, a filter can be embedded before the interface for updating the component list, and the filter is used to implement the above-mentioned embodiments of the present application. When the filter needs to update the component list, the update of the component list is realized normally through the interface for updating the component list.

[0217] The above-mentioned embodiments of the present application have at least the following beneficial effects:

[0218] 1. In an embodiment of the present application, for any resource to be updated associated with the target operation, a targeted analysis can be performed to determine whether the resource content will change. In the case where the resource content will change, the resource to be updated can continue to be updated normally, thereby ensuring the timeliness of the resource to be updated. In the case where the resource content will not change, it can be chosen not to update the resource to be updated, thereby avoiding meaningless updates to the resource to be updated. Therefore, from the perspective of a single resource to be updated, an embodiment of the present application can avoid updating the resource to be updated that has no content update, thereby avoiding the load on the processor caused by this part of meaningless updates, thereby effectively reducing the load on the electronic device processor, while reducing the power consumption caused to the electronic device.

[0219] 2. When there are multiple resources to be updated, the embodiment of the present application can implement update control of multiple resources to be updated associated with the target operation. Continue to perform normal updates for the resources to be updated whose resource content will change, thereby ensuring the timeliness of the resources to be updated. For the resources to be updated whose resource content will not change, you can choose not to update them, thereby avoiding meaningless updates to these resources to be updated. Therefore, from the overall perspective of all resources to be updated, the embodiment of the present application avoids updating a large number of resources to be updated that have no content updates, and realizes targeted updates to local resources. Therefore, the load on the processor caused by this part of meaningless updates can be avoided, and the load caused by the overall resource update can be reduced, thereby effectively reducing the load on the electronic device processor, while reducing the power consumption caused to the electronic device.

[0220] 3. For the installation operations, update operations and uninstall operations that occur frequently in daily life, as well as the actual scenarios where there are many meaningless updates of component lists associated with these target operations, the embodiments of the present application can perform targeted update control of component lists. That is, when these target operations are detected, a targeted analysis can be performed on whether the content of the target component lists of these preset services will change, and only the target component lists in which the content will change will continue to be updated, and the update of the target component lists without content changes will be stopped. Therefore, the embodiments of the present application can effectively reduce the load on the processor caused by the component list update when operating the application, and reduce system power consumption.

[0221] In actual application, take the Android system electronic device as an example to test, combined with Figure 5 The embodiment shown controls the update of the component list. In actual tests, the processor running load of the android.bg thread of the system service (SystemServer) of the embodiment of the present application can be reduced by 40%. That is, when combined with the relevant embodiments of Tables 2 to 4, the processor load in the running state can be reduced by 40%.

[0222] exist Figure 5 Based on the embodiment shown, as a specific embodiment of the present application, reference can be made to Figure 6 , is a flowchart of a resource update control method provided by an embodiment of the present application. In the embodiment of the present application, the target operation includes an installation operation, an update operation, and an uninstallation operation. The preset service is an account and synchronization management service. The target component list includes: an account authentication service component list and an account synchronization service component list. The embodiment of the present application adds a filter before the interface generateServicesMap, which is used to implement Figure 5 The embodiment shown is described in detail as follows.

[0223] When a broadcast corresponding to an application installation operation, an uninstallation operation, or an update operation (which may be referred to as installation broadcast, uninstallation broadcast, and update broadcast in the embodiment of the present application) is received, it can be determined that an operation event (handlePackageEvent) on the application's package has been detected.

[0224] Get the package name of the currently operated application.

[0225] Gets the type of the current broadcast to determine whether the specific target operation is an installation operation, an update operation, or an uninstall operation.

[0226] For the installation operation, determine whether the current package contains components related to the account and synchronization management service. If the components are included, continue to update the account authentication service component list and the account synchronization service component list. If not, stop updating the account authentication service component list and the account synchronization service component list.

[0227] For the uninstallation operation, the cached account authentication service component list and account synchronization service component list are traversed to determine whether the component information in the package is recorded. If there is component information, the account authentication service component list and account synchronization service component list are continued to be updated. If there is no component information, the account authentication service component list and account synchronization service component list are stopped from being updated.

[0228] For the update operation, determine whether the current package contains components related to the account and synchronization management service, and traverse the cached account authentication service component list and account synchronization service component list to determine whether the component information in the package is recorded (i.e., determine whether the two are and / or exist). If any of the conditions are met, continue to update the account authentication service component list and account synchronization service component list. If the current package does not contain components related to the account and synchronization management service, and the account authentication service component list and account synchronization service component list do not record the component information in the package, stop updating the account authentication service component list and account synchronization service component list.

[0229] When continuing to update the component list, you can call the generateServicesMap interface for updating the component list. Then query the account authentication service component and the account synchronization service component in the package. Finally, based on the queried components, traverse and update the account authentication service component list and the account synchronization service component list, thereby updating the cached component list.

[0230] For specific implementation details, principles and effects of the embodiments of this application, please refer to the above Figures 2 to 5 The related embodiments are described in detail here.

[0231] Corresponding to the resource update control method described in the above embodiment, Figure 7 A schematic diagram of the structure of a resource update control device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0232] Reference Figure 7 , the resource update control device comprises:

[0233] The resource determination module 71 is used to determine a number of to-be-updated resources associated with the target operation when a target operation on the application is detected.

[0234] The analysis module 72 is used to analyze whether the content of each resource to be updated will change under the target operation.

[0235] The update stopping module 73 is used for not updating the resources whose contents will not change among the resources to be updated.

[0236] The resource updating module 74 is used to update the resources whose contents will change among the resources to be updated.

[0237] The process of each module in the resource update control device provided in the embodiment of the present application realizing its own function can be specifically referred to the aforementioned Figures 2 to 6 The description of the illustrated embodiment and other related method embodiments will not be repeated here.

[0238] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0239] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

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

[0241] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0242] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0243] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish descriptions, and cannot be understood as indicating or suggesting relative importance. It should also be understood that although the terms "first", "second", etc. are used to describe various elements in some embodiments of the present application in the text, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first table can be named as the second table, and similarly, the second table can be named as the first table without departing from the scope of the various described embodiments. The first table and the second table are both tables, but they are not the same table.

[0244] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0245] The resource update control method provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific types of electronic devices.

[0246] For example, the electronic device may be a station (STATION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set top box (STB), a customer premise equipment (CPE) and / or other devices for communicating on a wireless system and a next-generation communication system, for example, electronic devices in a 5G network or electronic devices in a future evolved Public Land Mobile Network (PLMN) network, etc.

[0247] As an example but not limitation, when the electronic device is a wearable device, the wearable device can also be a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0248] Figure 8 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 8 As shown, the electronic device 8 of this embodiment includes: at least one processor 80 ( Figure 8 Only one is shown in the figure), a memory 81, wherein the memory 81 stores a computer program 82 that can be run on the processor 80. When the processor 80 executes the computer program 82, the steps in the above-mentioned resource update control method embodiments are implemented, such as Figure 2 Alternatively, when the processor 80 executes the computer program 82, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 7The functions of the modules 71 to 74 are shown.

[0249] The electronic device 8 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that Figure 8 It is only an example of the electronic device 8 and does not constitute a limitation of the electronic device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include an input sending device, a network access device, a bus, etc.

[0250] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0251] In some embodiments, the memory 81 may be an internal storage unit of the electronic device 8, such as a hard disk or memory of the electronic device 8. The memory 81 may also be an external storage device of the electronic device 8, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 8. Further, the memory 81 may also include both an internal storage unit of the electronic device 8 and an external storage device. The memory 81 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 81 may also be used to temporarily store data that has been sent or is to be sent.

[0252] In addition, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0253] An embodiment of the present application also provides an electronic device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor, wherein when the processor executes the computer program, the electronic device implements the steps of any of the above-mentioned method embodiments.

[0254] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0255] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0256] An embodiment of the present application further provides a chip system, which includes a processor coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps in the above-mentioned method embodiments.

[0257] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0258] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0259] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0260] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0261] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A resource update control method, characterized in that: The method comprises: When a target operation on the application is detected, a plurality of resources to be updated associated with the target operation are determined, wherein the target operation is an installation operation, an update operation or an uninstallation operation, and the resources to be updated are a target component list; Analyze whether the content of each resource to be updated will change under the target operation; For resources whose contents will not change among the resources to be updated, no resource update is performed; For the resources whose contents will change among the resources to be updated, update the resources; The first component list is any of the target component lists, and the analysis of whether the content of each of the resources to be updated will change under the target operation includes: When the target operation is an installation operation, analyzing whether the program package of the application program contains components required to be recorded in the first component list; When the program package does not include the components required to be recorded in the first component list, it is determined that the content of the first component list will not change.

2. The resource update control method according to claim 1, characterized in that: When a target operation on the application is detected, a plurality of resources to be updated associated with the target operation are determined, including: When the target operation on the application is detected, determining a plurality of preset services associated with the target operation; Determine the target component list under each of the preset services.

3. The resource update control method according to claim 2, characterized in that: The preset services include: any service among accessibility management service, search management service and account and synchronization management service.

4. The resource update control method according to any one of claims 1 to 3, characterized in that: The analyzing whether the content of each resource to be updated will change under the target operation also includes: When the target operation is an uninstall operation, analyzing whether component information of the application is recorded in the first component list; When the component information of the application is not recorded in the first component list, it is determined that the content of the first component list will not change.

5. The resource update control method according to any one of claims 1 to 3, characterized in that: The analyzing whether the content of each resource to be updated will change under the target operation also includes: When the target operation is an update operation, analyzing whether the program package of the application contains the components required to be recorded in the first component list, and analyzing whether the first component list records the component information of the application; When the program package does not include the components required to be recorded in the first component list, and the component information of the application is not recorded in the first component list, it is determined that the content of the first component list will not change.

6. The resource update control method according to any one of claims 1 to 3, characterized in that: The update operation includes: version update operation, content update operation and permission update operation.

7. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the resource update control method according to any one of claims 1 to 6 is implemented.

8. A chip system, characterized in that: The chip system includes a processor, which is coupled to a memory. The processor executes a computer program stored in the memory to implement the resource update control method as described in any one of claims 1 to 6.