Resource downloading method, device, and system
Patent Information
- Application Number
- PCT/CN2026/070410
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-04-03
- Filing Date
- 2026-01-05
- Publication Date
- 2026-08-27
Smart Images

Figure CN2026070410_27082026_PF_FP_ABST
Abstract
Description
Resource download methods, equipment and systems
[0001] This application claims priority to Chinese Patent Application No. 202510192709.4, filed with the State Intellectual Property Office of China on February 20, 2025, entitled “Resource Download Method, Apparatus and System”, and Chinese Patent Application No. 202510422749.3, filed with the State Intellectual Property Office of China on April 3, 2025, entitled “Resource Download Method, Apparatus and System”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of terminal technology, and in particular to resource download methods, devices and systems. Background Technology
[0003] With the rapid development of device hardware and application software technologies, electronic devices can provide users with great convenience in work, life, entertainment, study, travel, and leisure through installed applications (hereinafter referred to as "applications"). Currently, applications often need to download application resources and update applications regularly or irregularly to upgrade and improve their functions, ensuring that applications can provide users with diverse functions securely and smoothly.
[0004] Currently, if application resources are updated before application launch, the application typically needs to download these resources and update the application upon startup, resulting in a significant time delay. For example, game applications typically have resource packages ranging from hundreds of megabytes (MB) to tens of gigabytes (GB). Therefore, the latency associated with downloading resource packages and updating the application can cause game application startup times to reach tens of minutes, severely impacting the user experience. Summary of the Invention
[0005] This application provides a resource download method, device, and system that can solve the problem of slow application startup caused by latency in downloading application resources and updating applications during application startup, thereby improving application startup speed and enhancing user experience.
[0006] To achieve the above objectives, this application adopts the following technical solution:
[0007] In a first aspect, a resource download method is provided, which is applied to an electronic device, wherein the electronic device includes a resource acceleration service. The method includes: detecting that a first condition is met and activating the resource pre-download function of the resource acceleration service; the resource acceleration service obtaining resource download task information from a first application; the resource acceleration service downloading resources according to the resource download task information; and the resource acceleration service notifying the first application of the resource download status.
[0008] The solution provided in the first aspect above allows electronic devices to offer operating system-level resource acceleration services when conditions are met. This provides application resource pre-downloading functionality, eliminating the need for applications to download resources during startup. This effectively avoids slow application startup caused by latency from resource downloads, improving startup speed and user experience. Furthermore, since the resource acceleration service is a system-level capability, it can support similar off-peak downloads and application updates for various applications on the electronic device.
[0009] As an example, the first application mentioned above includes game applications.
[0010] As one possible implementation, satisfying the first condition includes: the application resources of the first application are updated and the first application is idle. Thus, the resource acceleration service can fully utilize the application's idle time when application resources are updated, providing a system-level application resource pre-download function. This eliminates the need for application resource downloads during application startup, effectively avoiding slow application startup caused by latency from application resource downloads, thereby improving application startup speed and user experience.
[0011] As one possible implementation, the above method also includes: the resource acceleration service obtaining resource download permissions for the first application from the application center. These permissions indicate that the first application meets the permission requirements for downloading application resources through the resource acceleration service. This allows for more flexible and detailed control over permissions such as calling the resource acceleration service to download application resources, ensuring the security of the operating system and data.
[0012] As one possible implementation, the resource acceleration service obtains resource download task information from the first application, including: when the main process of the first application has not started, in response to meeting a first condition, the resource package pre-download service starts the resource acceleration process of the first application; the resource package pre-download service obtains resource download task information from the resource acceleration process. In this way, the resource package pre-download service can pre-download application resources before the first application starts, so that the application does not need to download application resources again when it starts. This effectively avoids the problem of slow application startup caused by latency due to application resource downloads during application startup, improving application startup speed and user experience.
[0013] As one possible implementation, the resource acceleration service downloads resources based on resource download task information, including: downloading resources to the temporary directory of the first application; and moving resources from the temporary directory of the first application to the fixed directory of the first application. This ensures the isolation between files and guarantees the security of application data.
[0014] As one possible implementation, the aforementioned resource acceleration service downloads resources based on resource download task information, including: the resource acceleration service downloads resources in the background of the electronic device based on resource download task information. In this way, the resource package pre-download service can perform application resource pre-download in the background of the electronic device before the first application runs, without the user's awareness. On the one hand, this eliminates the need for application resource downloads at startup, effectively avoiding the problem of slow application startup caused by latency due to application resource downloads, thus improving application startup speed. On the other hand, it does not disturb the user, improving the user experience.
[0015] As one possible implementation, the above method also includes: displaying the background download progress of resources through a resource acceleration service. This allows users to easily track the progress of background resource downloads.
[0016] As one possible implementation, the above method further includes: in response to the startup of the main process of the first application, the resource package pre-download service switches the task of downloading resources from the background of the electronic device to the foreground of the electronic device. In this way, while application resources are downloading in the background, the application can be launched quickly when the user needs to use the application, and the continued download of application resources can be supported, ensuring the normal startup of the application.
[0017] As one possible implementation, the above method further includes: after the resource download task is switched from the background of the electronic device to the foreground, the method also includes: a resource package pre-download service continuing the resource download in the foreground of the electronic device. In this way, by continuing the download task, it is possible to ensure that the resource download is completed as quickly as possible, and the application can be launched quickly when the user needs to use the application.
[0018] As one possible implementation, after the resource download task switches from the background to the foreground of the electronic device, the method further includes: a resource package pre-download service displays the foreground download progress of the resources, where the initial state of the foreground download progress is the final state of the background download progress. This allows users to easily track the progress of the foreground resource download.
[0019] In some examples, after the resource package pre-download service switches the task of downloading resources from the background of the electronic device to the foreground of the electronic device, the resource package pre-download service stops displaying the background download progress.
[0020] As one possible implementation, the above method further includes: prompting the user in response to the startup of the main process of the first application; and continuing to download resources in the background of the electronic device in response to the user's first action on the prompt, while the main process of the first application is starting. In this way, the application can be quickly launched when the user needs to use it, even while application resources are downloading in the background, and the user can choose the continuation strategy according to their preferences, achieving flexible application resource download continuation.
[0021] One possible implementation is a resource package pre-download service that downloads the application's initial launch resources during the first non-running period after the application is installed and before its first launch. These initial launch resources enable the application to start on its first launch. This fully utilizes the application's idle time after installation and before its first launch, prioritizing the download of initial launch resources. This improves application startup speed and ensures the application starts correctly on its first launch.
[0022] As one possible implementation, the resource package pre-download service downloads non-initial application resources of the first application during a second non-running period after the first application is installed. This ensures that the application provides users with a richer and more reliable user experience.
[0023] For example, the second non-running time period is before or after the first application is launched.
[0024] Secondly, a resource download method is provided, which is applied to an electronic device. The method may include: detecting whether the application resources of a first application have been updated; and when the application resources have been updated and the first application is idle, downloading the updated application resources in the background and updating the first application through a resource package pre-download service.
[0025] The solution provided in the second aspect above allows electronic devices to fully utilize application idle time when application resources are updated. Through a system-level resource package pre-download service, application resources are downloaded and updates are performed in the background. Therefore, applications do not need to download resources or update during startup, effectively avoiding the slow application startup caused by latency from resource downloads and updates, thus improving startup speed and user experience. Furthermore, since the resource package pre-download service is a system-level capability, it can support similar idle-time downloads and updates for multiple applications on the electronic device.
[0026] As an example, the first application mentioned above includes game applications.
[0027] As one possible implementation, the resource package pre-download service includes resource acceleration services and application resource acceleration processes. In this way, system-level resource acceleration services and application-level application resource acceleration processes can support electronic devices to download application resources and update applications in the background. This effectively avoids the problem of slow application startup caused by latency in downloading and updating application resources during application startup, thereby improving application startup speed and enhancing user experience.
[0028] As one possible implementation, the above method also includes: obtaining an idle-time application resource download strategy, which is customized by the developer of the first application; and determining the idle time of the first application based on the idle-time application resource download strategy. In this way, on the one hand, it can effectively avoid the problem of slow application startup caused by latency due to application resource downloads and application updates during application startup, thus improving application startup speed; on the other hand, it can also support developers to customize the idle-time application resource download succession strategy, flexibly implementing application resource downloads.
[0029] In some examples, the application's idle time may be subject to certain conditions, such as including but not limited to at least one of the following: the electronic device is a preset device type, the electronic device's operating system version meets the version requirements, the electronic device is connected to a mobile network, the electronic device is connected to WiFi, the available storage space of the electronic device is greater than a certain available space threshold (such as 2GB, 3GB, etc.), the battery level of the electronic device is greater than a certain battery threshold (such as 50%, 30%, etc.), the screen of the electronic device is off, the electronic device is charging, and the temperature of the electronic device is lower than a certain temperature threshold.
[0030] As one possible implementation, during the background download of updated application resources via the resource package pre-download service, the above method also includes: upon receiving an operation to launch the first application, continuing resource download in the background through the resource acceleration service and the resource acceleration process of the first application, or continuing resource download in the foreground through an application downloader. This allows for rapid application launch when the user needs to use the application while it is downloading in the background, and supports multiple flexible application resource download continuation methods.
[0031] As one possible implementation, upon receiving an operation to launch the first application, the method further includes: obtaining the application resource download continuation strategy; and determining, based on the application resource download continuation strategy, whether to continue downloading resources in the background via the resource acceleration service and the resource acceleration process of the first application, or to continue downloading resources in the foreground via the application downloader. This allows for quick application launch when the user needs to use the application while it is downloading in the background, and supports developers in customizing the application resource download continuation strategy, enabling flexible application resource download continuation.
[0032] As one possible implementation, the above-mentioned method of determining whether to continue downloading resources in the background through the resource acceleration service and the resource acceleration process of the first application, or to continue downloading resources in the foreground through the application downloader, based on the application resource download continuation strategy, includes: obtaining the background download progress of the resource; continuing to download resources in the background through the resource acceleration service and the resource acceleration process of the first application when the background download progress is greater than a threshold, and continuing to download resources in the foreground through the application downloader when the background download progress is less than or equal to the threshold. In this way, the optimal continuation method can be determined based on the actual situation of resource downloading, achieving an efficient continuation effect.
[0033] As one possible implementation, the above method also includes: upon receiving an operation to launch the first application, launching the updated first application based on the updated application resources. This ensures that application resources can be correctly identified and used by the application engine, guaranteeing the normal operation of the application.
[0034] In some examples, the first application idle time may include a continuous period of application inactivity or multiple discontinuous periods of application inactivity, without limitation.
[0035] As one possible implementation, the above-mentioned method of downloading and updating application resources during application idle time includes: downloading the updated application resources during the first idle time of the first application; and updating the application during the second idle time of the first application. This fully utilizes application idle time for downloading application resources and updating the application, avoiding the problem of slow application startup caused by latency in downloading and updating application resources during application startup, thus improving application startup speed and user experience.
[0036] One possible implementation is that the first idle time and the second idle time are the same or different time periods. This allows for full utilization of a complete idle period or fragmented idle time based on the application's running status, ensuring the efficiency and success rate of application resource downloads and updates during idle times.
[0037] One possible implementation is that the first idle time includes the first non-running period after the application is installed and before its first launch. This fully utilizes the idle time after installation and before the first launch to download application resources and update the application, avoiding slow startup caused by latency during resource downloads and updates, thus improving startup speed and user experience.
[0038] One possible implementation is that the electronic device downloads the initial application resources during its first idle time, and these initial application resources enable the first application to launch upon initial startup. This prioritizes the download of initial application resources, ensuring the application launches correctly on its first boot.
[0039] As one possible implementation, the first idle time also includes a second non-running period after the application's initial launch. This allows for full utilization of multiple fragmented idle periods after application installation, before and after the initial launch, to download application resources and update the application. While ensuring the application can start normally upon initial launch, this avoids slow application startup caused by latency from resource downloads and updates, thus improving startup speed and providing users with a richer and more reliable gaming experience.
[0040] As one possible implementation, the second idle time includes the period after the first application is installed and before its initial launch. This ensures that the application can start normally upon its first launch.
[0041] As one possible implementation, the first idle time and the second idle time are the non-running periods after the application's initial launch. In this way, during use after the application's initial launch, when application resources are updated, the idle time after the initial launch can be fully utilized for downloading application resources and updating the application. This ensures that the application can start normally upon initial launch, while avoiding slow application startup caused by latency from downloading and updating application resources during startup, thus improving application startup speed and providing users with a richer gaming experience.
[0042] As one possible implementation, updating the first application as described above includes performing one or more of the following operations on the downloaded application resources: decompression, format conversion, version verification, or secondary integration. This ensures that the application resources can be correctly identified and used by the application engine, guaranteeing the normal operation of the application.
[0043] As one possible implementation, before downloading updated application resources in the background and updating the first application via the resource package pre-download service, the method further includes: determining that the first application meets the permission requirements for downloading application resources via the resource package pre-download service based on one or more of the following: the automatic update switch is on, the first application is on the list of applications that support automatic updates, and the priority of the first application meets preset conditions. This allows for more flexible and detailed control over the permissions and priorities for downloading application resources by calling the resource acceleration service and the application's resource acceleration process, ensuring device and data security.
[0044] As one possible implementation, the updated application resources include at least one file. The aforementioned resource package pre-download service downloads the updated application resources in the background, including: using a resource acceleration service and the application's resource acceleration process to download at least one file to the first application's temporary directory in the background, and then moving the downloaded file from the temporary directory to the first application's fixed directory. This ensures the isolation between files and guarantees the security of application data.
[0045] Thirdly, a resource download method is provided, which is applied to a resource package pre-download service Kit in an electronic device. The resource package pre-download service Kit is used to provide a resource package pre-download service. The method includes: when the application resources of a first application in the electronic device are updated and the first application is idle, downloading the updated application resources in the background of the electronic device through the resource package pre-download service; and updating the first application.
[0046] The solution provided in the third aspect above, the Resource Pack Pre-download Service Kit, can fully utilize the idle time of the first application on the electronic device when application resources are updated. It provides a system-level resource pack pre-download service, downloading application resources and updating the application in the background of the electronic device. This eliminates the need for application resource downloads and updates at startup, effectively avoiding the slow application startup caused by latency due to application resource downloads and updates, thus improving application startup speed and user experience. Furthermore, since the resource pack pre-download service is a system-level capability, it can support multiple applications on the electronic device to use similar idle-time downloads and application updates.
[0047] As an example, the first application mentioned above includes game applications.
[0048] As one possible implementation, the resource package pre-download service includes resource acceleration services and application resource acceleration processes. This allows for system-level resource acceleration services and application-level application resource acceleration processes to support background downloads and updates of application resources on electronic devices. This effectively avoids the problem of slow application startup caused by latency in downloading and updating application resources during application startup, thus improving application startup speed and user experience.
[0049] As one possible implementation, the first application's idle time is determined by the electronic device based on an idle-time application resource download strategy, which is customized by the developer of the first application. This effectively avoids the slow application startup caused by latency from application resource downloads and updates during application startup, thus improving startup speed. Furthermore, it allows developers to customize the idle-time application resource download succession strategy, enabling flexible application resource downloading.
[0050] As one possible implementation, during the process of downloading updated application resources in the background of the electronic device via the resource package pre-download service, the above method further includes: upon receiving an operation to launch the first application, continuing resource download in the background through the resource acceleration service and the resource acceleration process of the first application, or continuing resource download in the foreground through an application downloader. In this way, the application can be quickly launched when the user needs to use it, while the application resources are downloading in the background of the electronic device, and multiple flexible application resource download continuation methods are supported.
[0051] As one possible implementation, upon receiving an operation to launch the first application, the method further includes: obtaining the application resource download continuation strategy; and determining, based on the application resource download continuation strategy, whether to continue downloading resources in the background via the resource acceleration service and the resource acceleration process of the first application, or to continue downloading resources in the foreground via the application downloader. This allows for rapid application launch when the user needs to use the application while it is downloading in the background on the electronic device, and supports developers in customizing the application resource download continuation strategy, achieving flexible application resource download continuation.
[0052] As one possible implementation, the above-mentioned method of determining whether to continue downloading resources in the background through the resource acceleration service and the resource acceleration process of the first application, or to continue downloading resources in the foreground through the application downloader, based on the application resource download continuation strategy, includes: obtaining the background download progress of the resource; continuing to download resources in the background through the resource acceleration service and the resource acceleration process of the first application when the background download progress is greater than a threshold, and continuing to download resources in the foreground through the application downloader when the background download progress is less than or equal to the threshold. In this way, the optimal continuation method can be determined based on the actual situation of resource downloading, achieving an efficient continuation effect.
[0053] As one possible implementation, the above-mentioned downloading of updated application resources in the background of the electronic device via the resource package pre-download service includes: downloading the updated application resources in the background of the electronic device via the resource package pre-download service during the first idle time of the first application; and updating the application includes: updating the first application during the second idle time of the first application. In this way, the application's idle time can be fully utilized for downloading application resources and updating the application, avoiding the problem of slow application startup caused by latency due to application resource downloads and updates during application startup, thus improving application startup speed and user experience.
[0054] One possible implementation is that the first idle time and the second idle time are the same or different time periods. This allows for full utilization of a complete idle period or fragmented idle time based on the application's running status, ensuring the efficiency and success rate of application resource downloads and updates during idle times.
[0055] As one possible implementation, the first idle time includes the first non-running period after the application is installed and before its first launch. This fully utilizes the idle time between application installation and launch to download application resources and update the application, avoiding slow application startup caused by latency during resource downloads and updates, thus improving startup speed and user experience.
[0056] One possible implementation is that the electronic device downloads the initial application resources for the first application during its first idle time. These initial application resources enable the first application to launch upon initial startup. This prioritizes the download of initial application resources, ensuring the application can launch normally upon first use.
[0057] As one possible implementation, the first idle time also includes a second non-running period after the application's initial launch. This allows for full utilization of multiple fragmented idle periods after application installation, before and after the initial launch, to download application resources and update the application. While ensuring the application launches normally upon initial startup, this avoids slow startup caused by latency from resource downloads and updates, thus improving startup speed and providing users with a richer and more reliable gaming experience.
[0058] As one possible implementation, the second idle time includes the period after the first application is installed and before its initial launch. This ensures that the application can start normally upon its first launch.
[0059] One possible implementation is that the first and second idle periods are the non-running periods after the application's initial launch. This allows for full utilization of the idle periods after the application's initial launch to download and update application resources, ensuring a normal initial launch while avoiding slow startup times caused by resource downloads and updates. This improves launch speed and provides users with a richer gaming experience.
[0060] As one possible implementation, updating the first application as described above includes performing one or more of the following operations on the downloaded application resources: decompression, format conversion, version verification, or secondary integration. This ensures that the application resources can be correctly identified and used by the application engine, guaranteeing the normal operation of the application.
[0061] As one possible implementation, before downloading updated application resources in the background of the electronic device via the resource package pre-download service, the method further includes: determining the permission requirements for the first application resource package pre-download service to download application resources based on one or more of the following: the automatic update switch is turned on, the first application is in the list of applications that support automatic updates, and the priority of the first application meets preset conditions. This allows for more flexible and detailed control over the permissions and priorities for downloading application resources by calling the resource acceleration service and the application's resource acceleration process, ensuring the security of the device and data.
[0062] As one possible implementation, the updated application resources include at least one file. The aforementioned resource package pre-download service downloads the updated application resources in the background of the electronic device, including: using a resource acceleration service and the application's resource acceleration process to download at least one file to the temporary directory of the first application in the background, and then moving the downloaded file from the temporary directory to the fixed directory of the first application. This ensures the isolation between files and guarantees the security of application data.
[0063] Fourthly, an operating system is provided that can provide resource acceleration services, which can implement the methods in any possible implementation of the first aspect.
[0064] Fifthly, an electronic device is provided, comprising: a memory for storing computer program instructions; a communication interface for communicating with other devices; and a processor for executing the computer program instructions to support the electronic device in implementing the methods of any possible implementation of the second or third aspect.
[0065] In a sixth aspect, a computer-readable storage medium is provided that stores computer program instructions that, when executed by a processor, implement the method as described in any possible implementation of the second or third aspect.
[0066] In a seventh aspect, a computer program product comprising instructions is provided, which, when run on a computer, causes the computer to implement the method as in any possible implementation of the second or third aspect.
[0067] Eighthly, a chip system is provided, comprising processing circuitry and a storage medium storing computer program instructions; when executed by the processor, the computer program instructions implement the method as described in any possible implementation of the second or third aspect. The chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description
[0068] Figure 1 is a schematic diagram of the download process of an application resource;
[0069] Figure 2 is a schematic diagram of the download process for another application resource;
[0070] Figure 3 is a schematic diagram of the download process for another type of application resource;
[0071] Figure 4 is a system architecture diagram for implementing resource download according to an embodiment of this application;
[0072] Figure 5 is an architecture diagram of a game resource download system provided in an embodiment of this application;
[0073] Figure 6A is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0074] Figure 6B is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application;
[0075] Figure 7 is a flowchart of a resource download method provided in an embodiment of this application;
[0076] Figure 8 is a comparison diagram of two game startup processes provided in the embodiments of this application;
[0077] Figure 9A is a schematic diagram of two processes for downloading game resources during application idle time provided in the embodiments of this application;
[0078] Figure 9B is a schematic diagram of an interface for creating an application resource pre-download task according to an embodiment of this application;
[0079] Figure 9C is a flowchart of another resource download method provided in an embodiment of this application;
[0080] Figure 10A is a schematic diagram of a process for downloading application resources during idle time in a game application, as provided in an embodiment of this application.
[0081] Figure 10B is a schematic diagram of a prompt interface provided in an embodiment of this application;
[0082] Figure 10C is a schematic diagram of a notification interface provided in an embodiment of this application;
[0083] Figure 10D is a schematic diagram of the interaction process between a resource acceleration service and a game application's resource acceleration process provided in an embodiment of this application;
[0084] Figure 11A is a schematic diagram of another process of downloading application resources during the idle time of a game application provided in an embodiment of this application;
[0085] Figure 11B is a schematic diagram of a prompt interface when a resource download task is resumed according to an embodiment of this application;
[0086] Figure 12A is a schematic diagram of a resource download task continuation process provided in an embodiment of this application;
[0087] Figure 12B is a schematic diagram of the interaction process between a resource acceleration service and a game application provided in an embodiment of this application;
[0088] Figure 12C is a schematic diagram of the interaction process between another resource acceleration service and a game application provided in an embodiment of this application;
[0089] Figure 13 is a schematic diagram of another resource download task continuation process provided in an embodiment of this application;
[0090] Figure 14 is a functional structure block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0091] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0092] In the following, the terms "first," "second," etc., are used only to distinguish different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. Furthermore, in the embodiments of this application, "connection" can be a direct connection or an indirect connection; additionally, it can refer to an electrical connection or a communication connection; for example, the connection of two electrical components A and B can refer to a direct connection between A and B, or an indirect connection between A and B through other electrical components or connection media, or an indirect connection between A and B through other communication devices or communication media, as long as communication between A and B is possible.
[0093] To address the issue of slow application startup, one possible approach is for electronic devices to use an application 2 proxy to download application resources from application 1. This would reduce the latency caused by downloading application resources during application 1 startup and shorten the startup time of application 1.
[0094] For example, as shown in Figure 1, taking application 1 as a game application and application 2 as an app store as an example, the electronic device can download application resources of application 1 through the app store agent. For example, the application resources of application 1 may include, but are not limited to, newly added game application data, such as, but not limited to, one or more of the following: game character models, game scene maps, game equipment, and game sound effects.
[0095] As shown in Figure 1, the application resource download process mainly includes the following 5 stages, S101-S105:
[0096] S101: Application resource download agent review stage.
[0097] As an example, after completing the development or optimization of a new version of a game application, a game content provider (CP) can log in to the app store's portal and submit an application resource download proxy request. For example, the request may include updated application resources. The app store will then conduct a manual review based on the request submitted by the game CP.
[0098] After the application market manually reviews and approves the application resource download proxy request submitted by the game CP, it proceeds to S102.
[0099] In some embodiments, after the app store manually approves the application resource download proxy request submitted by the game CP, the app store can also open up mechanisms such as scheduled download or automatic update to users through the client, and provide subsequent application resource download proxy services to users according to the relevant settings of the app store client.
[0100] S102: Game CP uploads resources stage.
[0101] As an example, game developers can upload application resources to a designated resource server based on the authorization from the app store.
[0102] S103: The resource server is in the resource review stage.
[0103] As an example, a resource server can review application resources uploaded by game developers, including but not limited to virus scanning, anti-Zipbomb security checks, and after the review is passed, notify the application market's portal website so that a resource launch notification can be sent to the application market client.
[0104] S104: Application resource proxy download stage.
[0105] As an example, an app store client can initiate a silent background download task after receiving a notification that a resource is available, downloading the application resources for the game application. For instance, the app store client can download the game application resources to the temporary storage directory of the electronic device's system.
[0106] S105: Game application startup phase.
[0107] As an example, a game application can verify the application resources downloaded by the app store client agent at startup. After the verification is successful, the application resources are copied from the temporary directory to the game application's sandbox directory. The application resources are then decompressed, converted in format, verified for version, and further integrated to ensure that they meet the game application's operating requirements.
[0108] Optionally, the app store client can delete the locally temporarily stored app resources after copying the app resources to the game app's sandbox directory to save storage space.
[0109] While the solution shown in Figure 1 can reduce latency caused by downloading application resources during game application startup, the game application still requires post-processing steps such as resource copying, decompression, format conversion, version verification, and secondary integration. Therefore, the reduction in application startup time is limited. Furthermore, the solution in Figure 1 adds preliminary steps such as logging into the app store's portal, submitting application resource download proxy requests, waiting for manual review, and uploading resources after approval, thus introducing bottlenecks due to procedural waiting. Additionally, in the solution shown in Figure 1, the app store, acting as a proxy, needs to store application resources for different applications in the system directory, which can easily lead to security issues.
[0110] To address the issue of slow application startup, another possible approach is for electronic devices to improve the download speed of application resources and reduce the time required for application startup by scheduling download tasks during application startup.
[0111] As an example, as shown in S201-S204 of Figure 2, the electronic device can obtain information about application resources and perform category matching of application resources based on acceleration rules. When it is determined that the application to which the application resource belongs is a preset target application, the application resource download task is diverted according to the characteristics of the application resource and the preset diversion rules. For example, the application resource download task is diverted to the target acceleration line that matches the characteristics of the application resource, and the application resource is downloaded through the target acceleration line.
[0112] While the solution shown in Figure 2 can reduce the latency caused by downloading application resources during application startup, it still requires downloading application resources while the application is starting. Furthermore, the application still needs to perform post-processing steps such as resource copying, decompression, format conversion, version verification, and secondary integration. Therefore, its effect on reducing application startup time is limited. Additionally, the solution shown in Figure 2 may be affected by inflexible or poorly generalized acceleration or traffic splitting rules, resulting in unsatisfactory traffic splitting effects and an inability to effectively reduce application startup time.
[0113] Alternatively, as another possible implementation, electronic devices can improve the download speed of application resources by accelerating resource downloads during application startup, thereby reducing the time required for application startup.
[0114] As an example, as shown in S301-S303 of Figure 3, the electronic device can obtain the acceleration configuration information corresponding to the application when the application starts; determine the acceleration priority of the application based on the acceleration configuration information to determine whether to accelerate the download of application resources; when it is determined that the application should be accelerated, the download of application resources is accelerated during the application startup process.
[0115] For example, in the example shown in Figure 3, the acceleration configuration information can be pre-configured for various applications. After the application starts, the application management service (AMS) can obtain the application's acceleration configuration information when it detects the application startup thread, parse the configuration information to obtain the application's acceleration priority, and determine whether to add the application to the acceleration group based on the acceleration priority. If added, the application acceleration startup is completed through operations such as cpuctl, cpuset, cpufreq.
[0116] Although the solution shown in Figure 3 can reduce the latency caused by downloading application resources when the application starts, it still requires downloading application resources while starting the application. Furthermore, the application still needs to perform post-processing steps such as resource copying, decompression, format conversion, version verification, and secondary integration. Therefore, the effect on reducing application startup time is limited.
[0117] To effectively address the issue of slow application startup caused by latency in downloading application resources and updating the application during startup, this application provides a resource download method that can effectively utilize application idle time for downloading application resources and updating the application.
[0118] For example, application idle time may include one or more of the following: the time period before the application is first launched after installation, and the non-running time period after the application is first launched. Application idle time may include a continuous time period or multiple non-contiguous time periods, without limitation.
[0119] As an example, the application's idle time may be the system default, or it may be customized by the application content provider, or it may be customized by the user, or it may be determined based on the customization of the application content provider and the user, or it may be determined based on other rules or policies, without limitation.
[0120] As an example, electronic devices can provide system-level off-peak application resource download and application update functions, and open interfaces to application developers (CPs) to allow CPs to customize rules related to off-peak application resource download permissions and policies. Based on the rules customized by the application developers, corresponding application resource downloads and application updates can be performed during off-peak hours.
[0121] Because the resource download method provided in this application downloads application resources and updates the application during application idle time, the application does not need to download application resources and update the application again when it starts up. Therefore, compared with the solutions shown in Figures 1, 2, and 3, it can effectively avoid the problem of slow application startup caused by the latency of downloading application resources and updating the application when it starts up, thereby improving application startup speed and user experience. In addition, compared with the solution shown in Figure 1, the resource download method provided in this application does not require the preliminary processes such as logging into the application market portal website, submitting application resource download proxy requests, waiting for manual review, and uploading resources. It also avoids the security issues caused by storing application resources of different applications in the system directory, as shown in the solution in Figure 1.
[0122] As an example, electronic devices can provide system-level idle application resource downloading and application update functions through a resource pack pre-download service, which can be provided by a resource pack pre-download service kit (graphics accelerate kit). The resource pack pre-download service can support downloading application resources to the electronic device in the background, reducing the time spent waiting for and performing resource downloads after application launch, solving the problem of slow application launch, and providing users with an instant application experience. In this embodiment, background downloading on the electronic device refers to silently downloading application resources when the application is not launched (i.e., the application is not running).
[0123] As an example, please refer to Figure 4, which shows a system architecture diagram for implementing resource downloading according to an embodiment of this application. As shown in Figure 4, the resource downloading system includes an application center 410, an application content provider 420, and an electronic device 430.
[0124] The application center 410 is responsible for enabling and configuring capabilities for application clients, and managing resource download policies. For example, the application center 410 can provide application clients with the ability to identify user behavior habits, and configure and manage resource download policies based on these habits.
[0125] Application content provider 420 manages application resources. Application content provider 420 can support electronic device 430 in downloading application resources through resource acceleration services and application resource acceleration processes. The resource acceleration service, as a system-level service within electronic device 430, provides background application resource acceleration capabilities for various applications. For example, electronic device 430 can provide resource acceleration services through a programmable lightweight acceleration extension framework. The resource acceleration service and application resource acceleration processes can be referred to as a resource package pre-download service. For instance, the resource package pre-download service may include the resource acceleration service and application resource acceleration processes.
[0126] In this embodiment, the application content provider 420 is also used to provide developers with customization of resource download permissions, resource download strategies, etc. The resource download permissions include, but are not limited to, off-peak application resource download permissions, and the resource download strategies include, but are not limited to, off-peak application resource download strategies.
[0127] For example, the application content provider 420 can integrate the HarmonyOS extension framework to develop resource update business logic, in order to manage at least one version of application resources, such as application resource packages, and support developers to flexibly customize resource download permissions, resource download strategies, etc. based on operational data.
[0128] The electronic device 430 has one or more applications installed, and the electronic device 430 can provide application-related functions to the user through the installed applications.
[0129] In this embodiment of the application, the resource acceleration process of the application installed in the electronic device 430 can also work in conjunction with the resource acceleration service to complete one or more post-processing processes such as idle-time download of application resources, version verification, decompression, format conversion, version verification or secondary integration.
[0130] Taking a game application as an example, the application center as the application market game center, and the application content provider as the game application operation platform, please refer to Figure 5 as an example. Figure 5 shows a game resource download system architecture diagram provided by an embodiment of this application.
[0131] As shown in Figure 5, the game resource download system includes an application market game center 510, a game application operation platform 520, and an electronic device 530.
[0132] Among them, the App Market Game Center 510 is responsible for managing resource download strategies for game application clients.
[0133] In some embodiments of this application, the application market game center 510 can also provide user behavior habit recognition capabilities to game application clients, and configure and manage related strategies such as resource downloads based on user behavior habits. For example, the application market game center 510 can analyze user behavior to accurately identify target applications that have a need to download application resources during idle times, enable accelerated services during application idle times, automatically trigger application resource downloads during idle times, improve application startup speed, and avoid unnecessary invalid resource downloads and application updates, thereby avoiding waste of downloaded resources and improving download resource management efficiency.
[0134] The game application operation platform 520 is used to manage game resources, provide developers with customizable game resource download permissions, and game resource download strategies. For example, game resource download permissions include, but are not limited to, off-peak game resource download permissions, and game resource download strategies include, but are not limited to, off-peak game resource download strategies.
[0135] As shown in Figure 5, the game application operation platform 520 may include a resource server, a developer interface, and an operation platform. For example, the game application operation platform 520 may integrate the HarmonyOS system acceleration extension framework to provide the resource server, developer interface, and operation platform.
[0136] The resource server manages at least one version of game resources, such as game packages. The resource server can support electronic devices 530 downloading game resources via resource acceleration services and application resource acceleration processes.
[0137] The developer interface allows developers to customize game resource download permissions and strategies. For example, developers can flexibly customize resource download permissions and strategies based on operational data, flexibly control application resource updates, reduce the content delivery network (CDN) bandwidth costs involved in the 520 game application operation platform, optimize bandwidth resource allocation and utilization, and lower operational costs. For instance, developers can decide to prioritize updating specific game resources in certain regions or conduct large-scale game resource updates during specific time periods based on data such as player network conditions and activity levels in different regions. Simultaneously, developers can also adjust resource update priority strategies in a timely manner based on data feedback from the operations platform.
[0138] The developer interface can also be used to synchronize developer-defined game resource download strategies to the resource acceleration process of game applications in electronic devices 530, so that the resource acceleration process of game applications can work together with the resource acceleration service to complete one or more post-processing processes such as idle-time download of game resources, version verification, decompression, format conversion, version verification or secondary integration.
[0139] The operation platform is used to enable the resource acceleration process of the game application in the electronic device 530 in runtime, so that the resource acceleration process of the game application can work with the resource acceleration service to complete one or more post-processing processes such as idle download of game resources, version verification, decompression, format conversion, version verification or secondary integration.
[0140] As an example, the resource acceleration process can be supported by the game application's Resource Acceleration ExtensionAbility component. The Resource Acceleration ExtensionAbility component is an application component provided based on specific scenarios (such as service cards or input methods) to meet a wider range of use cases. The Resource Acceleration ExtensionAbility component can provide data content for background downloads of game resources and provide callback methods for successful downloads, failures, and completions.
[0141] The electronic device 530 has one or more game applications installed (one is shown in Figure 5), and the electronic device 530 can provide gaming entertainment to users through the installed game applications.
[0142] The electronic device 530 can also provide system-level resource acceleration services for coordinating and managing resource download tasks, providing background application resource acceleration capabilities, and a programmable lightweight acceleration extension framework. For example, when application idle time is detected (such as during the user's sleep at night), the resource acceleration service can initiate resource download tasks and utilize the background resource acceleration framework to rationally allocate network bandwidth and other resources to improve download speed. The resource acceleration service can also support resource acceleration task management, including task management during foreground / background switching, ensuring that resource download tasks do not significantly impact the performance of foreground applications when the user is using other applications on the electronic device.
[0143] In this embodiment, in addition to providing core capabilities such as game entertainment, the game application can also provide game resource acceleration capabilities. For example, the game application can accelerate the application programming interface (API) calls of the resource acceleration service through the game resource acceleration capability, and work with the resource acceleration service to complete the download and post-processing of game resources during idle periods. For instance, the game resource acceleration capability can check whether the local game version is consistent with the latest version during the application's idle period. If they are inconsistent, it triggers a request to the resource acceleration service to download the latest game resource package, and performs one or more post-processing operations such as decompression, format conversion, version verification, or secondary integration after the download is completed, to ensure that the game resources can be correctly recognized and used by the game engine.
[0144] As an example, during off-peak hours when downloading game resources, the resource acceleration service can download the game resources to the sandbox directory of the game application on the electronic device to ensure the security of the application data.
[0145] As an example, electronic devices may include, but are not limited to, smartphones, netbooks, tablets, smart drawing tablets, handwriting tablets, smartwatches, smart bracelets, phone watches, smart glasses, smart cameras, PDAs, smart robots, personal computers (PCs), personal digital assistants (PDAs), portable multimedia players (PMPs), augmented reality (AR) / virtual reality (VR) devices, projection devices, or motion-sensing game consoles in human-computer interaction scenarios, etc., without limitation.
[0146] For example, please refer to Figure 6A, which shows a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application.
[0147] As shown in Figure 6A, the electronic device includes a processor 610, a memory (including an external memory interface 620 and an internal memory 621), a universal serial bus (USB) interface 630, a charging management module 640, a power management module 641, a battery 642, antenna 1, antenna 2, a mobile communication module 650, a wireless communication module 660, an audio module 670, a speaker 670A, a receiver 670B, a microphone 670C, a headphone jack 670D, a sensor module 680, buttons 690, a motor 691, indicator lights 692, a camera 693, and a display screen 694, etc. For example, the sensor module 680 may include, but is not limited to, one or more sensors such as a touch sensor 680A and a pressure sensor 680B.
[0148] The processor 610 includes one or more processing units. For example, the processor 610 may include an application processor (AP), a microcontroller unit (MCU), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, the application processor may include a graphics processor and a digital signal processor, and the microcontroller unit may include a graphics processor.
[0149] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0150] The processor 610 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 610 is a cache memory. This memory can store instructions or data that the processor 610 has just used or that are used repeatedly. If the processor 610 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 610, and thus improves the efficiency of the system.
[0151] In some embodiments of this application, the processor 610 can determine whether the application is in an idle period, detect whether the application resources of the application are updated, download application resources during the application's idle period, and update the application during the application's idle period, etc., according to the application resource download strategy corresponding to the application.
[0152] The wireless communication function of the electronic device can be realized through antenna 1, antenna 2, mobile communication module 650, wireless communication module 660, modem processor and baseband processor, etc.
[0153] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. The wireless communication module 660 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), and intrabody communication (IBC). The wireless communication module 660 can be one or more devices integrating at least one communication processing module. The wireless communication module 660 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 610. The wireless communication module 660 can also receive signals to be transmitted from processor 610, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0154] In some embodiments of this application, antenna 1 of the electronic device is coupled to mobile communication module 650, and antenna 2 is coupled to wireless communication module 660, enabling the electronic device to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, IR technology, and / or IBC technology, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0155] In this embodiment, the electronic device can be coupled to the mobile communication module 650 via antenna 1, and / or to the wireless communication module 660 via antenna 2, to download application resources from the application content provider, obtain information such as resource download policy management from the application content provider, and communicate with the application center.
[0156] Display 694 includes a display panel. Exemplarily, the display panel may be a low-temperature polycrystalline silicon (LTPS) display, a low-temperature polycrystalline oxide (LTPO) display, a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) display, a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0157] In this embodiment of the application, the electronic device may include one or more displays 694.
[0158] In the embodiments of this application, the electronic device can implement display functions through GPU, display screen 694, application processor, microcontroller, etc., such as implementing the display function of application startup interface.
[0159] Electronic devices can achieve shooting functions through ISP, camera 693, video codec, GPU, display 694 and application processor.
[0160] The external memory interface 620 can be used to connect external memory cards, such as Micro SD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor 610 through the external memory interface 620 to perform data storage.
[0161] Internal memory 621 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 610 and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The NVM can also store executable programs and user and application data, and can be pre-loaded into the RAM for direct read and write operations by the processor 610.
[0162] In this embodiment, the external storage card and / or internal memory 621 can be used to store application data, including but not limited to application resources temporarily stored and application resources permanently stored.
[0163] For a description of the charging management module 640, power management module 641, battery 642, audio module 670, speaker 670A, receiver 670B, microphone 670C, motor 691, indicator light 692, etc. shown in Figure 6A, please refer to conventional technology; they will not be elaborated here.
[0164] The structure illustrated in Figure 6A of this application does not constitute a specific limitation on the hardware structure of the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
[0165] The electronic device provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems used in industry, such as operating systems developed based on OpenHarmony, like HarmonyOS; or other operating systems such as Android™, iOS mobile operating systems; it can also be various open-source operating systems or their derivatives, such as Linux OS, and other embedded operating systems; or it can be a future new operating system, such as an AI operating system based on artificial intelligence. An operating system is a set of interconnected system software programs that manage and control the operation of electronic devices, utilize and run hardware and software resources, and provide public services to organize user interaction. In electronic devices, the operating system connects downwards to the physical devices at the hardware layer and provides a runtime environment for application software upwards.
[0166] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer includes a suite of software providing various services to application developers, or frameworks providing services such as databases, multimedia, and graphics, or capabilities such as distributed scheduling and system scaling. For example, the middleware layer may include a framework layer and / or a system service layer. The framework layer provides APIs and programming frameworks for applications in the application layer. The system service layer includes the core capabilities of the system, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer may include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.
[0167] The electronic devices we use in our daily lives come in various types and forms, and are applied in a wide range of scenarios. Therefore, based on the different forms and functions of electronic devices, different application scenarios, and different user needs, the operating systems used in these devices may also differ. The basic functions implemented by the electronic device provided in this application can be implemented using a general-purpose operating system or a dedicated operating system. To more clearly illustrate the implementation of the embodiments of this application under a specific operating system, the architecture of HarmonyOS is shown below. Those skilled in the art can deduce the implementation of the embodiments of this application under other specific operating systems, such as Android™.
[0168] As an example, please refer to Figure 6B, which shows a schematic diagram of the software architecture of an electronic device provided in an embodiment of this application. As shown in Figure 6B, the software architecture of the electronic device can be divided into several layers. In some embodiments, from bottom to top, they are: kernel layer, system service layer, framework layer, and application layer. The layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem granularity in different device deployment scenarios, and each subsystem can also be tailored, added, or combined at the functional granularity.
[0169] As an example, the kernel layer may include the kernel abstract layer (KAL), kernel subsystems, and driver subsystems.
[0170] The kernel abstraction layer provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management. The kernel subsystem supports the selection of appropriate operating system kernels for different resource-constrained devices. The driver subsystem provides unified peripheral access capabilities and a framework for driver development and management, such as providing unified display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, and storage drivers.
[0171] As an example, the system service layer comprises the core set of system capabilities, providing services to applications through the framework layer. This layer includes multiple subsystem sets, such as, but not limited to, one or more of the following: a basic system capability subsystem set, a basic software service subsystem set, an enhanced software service subsystem set, and a hardware service subsystem set.
[0172] The system comprises several subsystems, including: a basic capability subsystem set providing foundational capabilities for the operation, scheduling, and migration of distributed applications across multiple devices; a multi-language runtime environment (MRU) including distributed soft bus, distributed data management, distributed task scheduling, and Ark multi-language runtime; multi-modal input subsystem, graphics subsystem, security subsystem, and artificial intelligence (AI) subsystem; a basic software service subsystem set providing common and general software services including event notification, telephone service, and multimedia subsystems; an enhanced software service subsystem set providing differentiated capability-enhancing software services for different devices including smart screen-specific business subsystems, wearable-specific business subsystems, and IoT-specific business subsystems; and a hardware service subsystem set providing hardware services including location service subsystem, unified identity and access management (IAM) subsystem, wearable-specific hardware service subsystem, biometric recognition, and Internet of Things (IoT)-specific hardware service subsystems.
[0173] As shown in Figure 6B, the enhanced software service subsystem suite includes a resource acceleration subsystem, which provides resource acceleration services. For example, when an application's idle time is detected (such as during a user's sleep at night), the resource acceleration service can initiate a resource download task, utilizing the background resource acceleration framework to rationally allocate network bandwidth and other resources to improve download speed. The resource acceleration service also supports resource acceleration task management, including task management during foreground / background switching, ensuring that resource download tasks do not significantly impact the performance of the foreground application when the user is using other applications on their electronic device.
[0174] The framework layer provides APIs and programming frameworks for applications in the application layer. The framework layer includes the ArkUI framework, the user application framework, and the Ability framework. The ArkUI framework provides a complete infrastructure for UI development of system applications, including UI functionalities such as components, layouts, animations, and interactive events, as well as a real-time interface preview tool. The Ability framework is a lightweight application that schedules and manages the operation and lifecycle of Abilities. Different devices may run different operating systems, and therefore support different APIs. APIs are a series of open capabilities provided to support operating system application development. APIs can be set in the framework layer or independently of the framework layer.
[0175] The application layer includes a series of applications, such as the video, map, music, and game applications shown in Figure 6B. Of course, the applications in the application layer can also include any other native applications (such as memo, contacts, camera, gallery, calendar, etc. integrated into the operating system) or functions, and / or other third-party applications (such as shopping, instant messaging, etc. applications downloaded and installed by the user through an app store), which are not limited in the embodiments of this application.
[0176] Taking gaming applications as an example, electronic devices can provide users with core functions such as gaming entertainment through installed gaming applications.
[0177] In this embodiment of the application, in addition to providing core capabilities such as game entertainment, the game application can also provide game resource acceleration capabilities. For example, the game application can work with the resource acceleration process and resource acceleration service to complete the idle download and post-processing of game resources.
[0178] The structure illustrated in Figure 6B of this application does not constitute a specific limitation on the software structure of the electronic device. In other embodiments of this application, each level of the electronic device may include more or fewer subsystems than illustrated, or combine some subsystems, or split some subsystems, or have different subsystem layouts.
[0179] The resource download method provided in this application will be described in detail below with reference to specific embodiments.
[0180] As an example, please refer to Figure 7, which illustrates a resource download method provided by an embodiment of this application, taking the download of application resources of the first application during idle time as an example. As shown in Figure 7, application resources can be downloaded during idle time via steps S701-S702:
[0181] S701: Electronic device detects whether the application resources of the first application have been updated.
[0182] As one possible implementation, the electronic device can determine when the first application is idle, and then start a system-level resource acceleration service to detect whether the application resources of the first application are updated.
[0183] As one possible implementation, the electronic device can obtain the idle-time application resource download strategy corresponding to the first application. This idle-time application resource download strategy is defined by the developer of the first application. The idle-time application resource download strategy may include time information corresponding to the idle time of the first application. Optionally, the idle-time application resource download strategy may also include a first application resource download continuation strategy.
[0184] As an example, the idle time of the first application may be the system default, or it may be a custom setting defined by the first application content provider, or it may be a user-defined setting, or it may be determined based on the customization of the first application content provider and the user, or it may be determined based on other rules or policies, without limitation.
[0185] For example, taking a game application as the first application, the electronic device system can, after the user authorizes the acquisition of application usage data, analyze the user's usage history of the game application to obtain the user's game application usage habits and determine the game application's off-peak hours. For instance, suppose the electronic device system, by analyzing the user's usage history of the game application, obtains that the user usually does not use the game application between 2 and 5 a.m., and based on this, determines that the game application's off-peak hours include 2 to 5 a.m.
[0186] For example, taking a game application as an example, where the application content provider is a game application operation platform, the platform can receive developers' customizations of resource download strategies based on operational data. This allows the platform to determine the application's off-peak hours, flexibly control application resource updates, and reduce operational costs. Operational data may include the usage history of one or more users of the game application. The off-peak hours may be customized by the developer based on the usage history of one or more users after the user authorizes the acquisition of application usage data. For instance, suppose the developer analyzes the usage history of one or more users and finds that users typically do not use the game application between 2 AM and 5 AM; based on this, the developer could customize the game application's off-peak hours to include 2 AM to 5 AM.
[0187] For example, taking a game application as an example, the electronic device can provide the user with an interactive interface that allows for customizing the time periods for downloading game resources and updating the application, determining the game application's off-peak hours based on the user's customized actions. For instance, if the user sets the time for downloading game resources and updating the application to be between 2 AM and 5 AM, the electronic device can determine that the game application's off-peak hours are between 2 AM and 5 AM. Similarly, if the user sets the interactive interface to allow downloading game resources and updating the application to be performed when connected to Wi-Fi, the electronic device can determine that the game application's off-peak hours are the time periods when the electronic device is connected to Wi-Fi and the game application is not running.
[0188] As an example, the first application's idle time may include the period from when the first application is installed to when it is first launched. Alternatively, the first application's idle time may include the period from when the first application is installed to when it is first launched, and at least one non-running period after the first application is first launched. Or, the first application's idle time may include at least one non-running period after the first application is first launched. The non-running period includes both foreground and background operation.
[0189] As one possible implementation, the electronic device can obtain the current running status of the first application. If the first application is not currently running (including running in the foreground and background), it is determined that the first application is currently in an idle state.
[0190] In some embodiments, taking an electronic device querying the application center for the automatic update switch status via the resource acceleration service as an example, if the automatic update switch is on, the resource acceleration service can initiate the application's resource acceleration process. Alternatively, taking an electronic device querying the application center for the automatic update switch status and a list of applications supporting automatic updates via the resource acceleration service, if the automatic update switch is on and the application is on the list of applications supporting automatic updates, the resource acceleration service can initiate the resource acceleration process for the first application. Or, taking an electronic device querying the application center for the automatic update switch status, a list of applications supporting automatic updates, and a priority policy via the resource acceleration service, if the automatic update switch is on, the first application is on the list of applications supporting automatic updates, and the first application's priority meets preset conditions, the resource acceleration service can initiate the resource acceleration process for the first application. After the resource acceleration process for the first application is initiated, the first application's resource acceleration process can detect whether the application resources of the first application have been updated.
[0191] In some embodiments, the resource acceleration service and the resource acceleration process of the first application may be referred to as a resource package pre-download service. For example, the resource package pre-download service may include the resource acceleration service and the resource acceleration process of the first application.
[0192] As one possible implementation, the resource acceleration process of the first application can detect whether the application resources of the first application have been updated by comparing whether the local first application resource version is consistent with the latest version; if they are inconsistent, it is considered that the application resources of the first application have been updated, and the electronic device executes S702; if they are consistent, it is considered that the application resources of the first application have not been updated, and no processing is performed.
[0193] S702: When application resources are updated and the first application is idle, the electronic device downloads the updated application resources in the background and updates the first application through the resource package pre-download service.
[0194] As one possible implementation, when application resources are updated and the application is in a period of low activity, the electronic device can generate a resource download list based on the application resource update information and download the updated application resources based on the resource download list.
[0195] As one possible implementation, when application resources are updated and the first application is idle, the electronic device can obtain one or more pieces of information such as the automatic update switch status, the list of applications that support automatic updates, and priority policies. When one or more of the following conditions are met, such as the automatic update switch status being on, the first application being on the list of applications that support automatic updates, and the priority of the first application meeting preset conditions, a resource download list is generated based on the application resource update information, and the updated application resources are downloaded based on the resource download list.
[0196] For example, an electronic device can first download the updated application resources to the temporary directory of the first application based on the resource download list. After the download of the updated application resources is completed, the updated application resources are moved from the temporary directory to the fixed directory of the first application (such as the sandbox directory) to ensure the security of application data.
[0197] The updated application resources include at least one file. In some embodiments, the resource package pre-download service may include a resource acceleration service and a resource acceleration process for the first application. The electronic device can use the resource acceleration service and the resource acceleration process for the first application to download at least one file to the temporary directory of the first application in the background, and move the downloaded file from the temporary directory to the fixed directory of the first application.
[0198] Taking an updated application resource that includes multiple files as an example, the electronic device can move the downloaded files from the temporary directory to the fixed directory of the first application when all files have been downloaded, or the electronic device can move each file from the temporary directory to the fixed directory of the first application when the download of each file is completed.
[0199] As one possible implementation, electronic devices can query the application center for one or more pieces of information, such as the automatic update switch status, the list of applications that support automatic updates, and priority policies, through the resource acceleration service. When one or more of the following conditions are met, such as the automatic update switch status being on, the application being on the list of applications that support automatic updates, and the priority of the first application meeting preset conditions, it is determined that the first application meets the permission requirements to download application resources through the resource acceleration service and the resource acceleration process of the first application. A resource download list is generated based on the application resource update information, and the updated application resources are downloaded based on the resource download list.
[0200] As one possible implementation, electronic devices can download updated application resources in the background based on the resource download list through resource acceleration services and the resource acceleration process of the first application.
[0201] As one possible implementation, after the electronic device has completed downloading the updated application resources, it can move the application resources that have been downloaded to the temporary directory to the fixed directory (such as the sandbox directory) of the first application through the resource acceleration process of the first application.
[0202] As one possible implementation, after downloading the updated application resources, the electronic device can also update the first application during the first application's idle time, including but not limited to post-processing the downloaded updated application resources. For example, post-processing may include, but is not limited to, one or more of the following: decompression, format conversion, version verification, or secondary integration, to ensure that the application resources can be correctly identified and used by the application engine.
[0203] In some embodiments of this application, after completing the download of application resources and updating the first application, when receiving the operation to launch the first application, the electronic device can launch the updated first application based on the updated application resources.
[0204] In some embodiments of this application, the electronic device can complete the download of updated application resources and the update of the first application within a continuous application idle time. For example, the electronic device can download updated application resources during the first idle time of the first application and update the first application during the second idle time of the first application, wherein the first idle time and the second idle time are the same time period.
[0205] In some embodiments of this application, the electronic device can complete the download of updated application resources during one consecutive application idle time and complete the application update during another consecutive application idle time.
[0206] For example, an electronic device can download updated application resources during the first idle time and update the application during the second idle time, where the first idle time and the second idle time are different time periods.
[0207] In some embodiments of this application, the electronic device can download updated application resources during multiple discontinuous application idle times and update the application during another continuous application idle time.
[0208] In some embodiments of this application, the electronic device can download updated application resources during multiple discontinuous application idle times and update applications during other multiple discontinuous application idle times.
[0209] For example, an electronic device can download updated application resources during a first idle period, which includes a first non-operating time period and a second non-operating time period. That is, the electronic device can download a portion of application resources during one non-operating time period and another portion of application resources during another non-operating time period.
[0210] As an example, the first idle time includes the first non-running period after the first application is installed and before its first launch. During the first idle time, the electronic device can download the first application's launch application resources, which can support the first application to start upon its first launch. The second idle time includes one or more non-running periods after the first application is installed and before its first launch, or includes one or more non-running periods after the first application is launched.
[0211] Optionally, the first idle time may include not only the first non-running period after the first application is installed and before its first launch, but also a second non-running period after the first application is launched. During the second non-running period, the electronic device can download non-first-launch application resources of the first application, ensuring that the application provides users with a richer and more reliable application experience. The second idle time may include one or more non-running periods after the first application is launched.
[0212] As an example, the first idle time includes one or more non-running time periods after the first application is launched, and the second idle time includes one or more non-running time periods after the first application is launched.
[0213] Based on the method shown in Figure 7, by fully utilizing the first application's idle time and using the system-level resource package pre-download service to download application resources and update applications in the background, the application does not need to download application resources and update applications again upon startup. This effectively avoids the problem of slow application startup caused by latency due to application resource downloads and updates during application startup, thus improving application startup speed and user experience. Furthermore, since the resource package pre-download service is a system-level capability, it can support multiple applications on electronic devices to use similar idle time downloads and application updates.
[0214] As an example, please refer to Figure 8, which shows a comparison of two game launch processes provided in the embodiments of this application, with the first application being a game application as an example.
[0215] As shown in Figure 8(a), if the game resources are downloaded using the conventional resource download method when the game application starts, the game startup process is as follows after the user clicks the game icon to start the game:
[0216] P1: Game engine initialization, such as initializing the core engine for game operation, in order to build a basic environment for subsequent game operation.
[0217] P2: Software Development Kit (SDK) initialization, such as initializing the SDKs for components in a game application that are not related to specific business functions, such as payment and social sharing components.
[0218] P3: Game resource pack download and application updates, such as checking for updates to the game resource pack, and if updates are found, downloading and processing them. This process is time-consuming because it may involve downloading and processing a large number of resource files.
[0219] P4: Shader compilation, such as compiling the shaders required for game graphics rendering to ensure the normal rendering of game visuals.
[0220] P5: Resource verification and configuration file initialization, such as verifying game resources to ensure their integrity and correctness, and initializing configuration files.
[0221] P6: Loading and rendering of the first scene resources, such as loading and rendering the game's first scene resources, and finally presenting the login interface, thus completing the game startup.
[0222] As shown in Figure 8(b), if the resource download method provided in this application is used, when the user clicks the game icon to start the game, since the game resource package has already been downloaded and the application updated during idle time (P3), the startup process becomes:
[0223] P1: Game engine initialization, such as initializing the core engine for game operation, in order to build a basic environment for subsequent game operation.
[0224] P2: Software Development Kit (SDK) initialization, such as initializing the SDKs for components in a game application that are not related to specific business functions, such as payment and social sharing components.
[0225] P4: Shader compilation, such as compiling the shaders required for game graphics rendering to ensure the normal rendering of game visuals.
[0226] P5: Resource verification and configuration file initialization, such as verifying game resources to ensure their integrity and correctness, and initializing configuration files.
[0227] P6: Loading and rendering of the first scene resources, such as loading and rendering the game's first scene resources, and finally presenting the login interface, thus completing the game startup.
[0228] As can be seen from the different startup processes shown in Figure 8(a) and Figure 8(b), the resource download method provided in this application can significantly shorten the startup time of game applications by downloading application resources and updating applications during idle time. For example, the startup time can be reduced to tens of seconds or even less. After the user clicks the game icon, they can enter the login interface faster, reducing the negative experience caused by waiting time and effectively improving the user's game startup experience.
[0229] The method shown in Figure 7 of this application aims to make full use of the idle time of application fragments to download updated application resources and update the application in advance before the application starts. It does not limit whether the application resource download and application update are continuous and uninterrupted, or whether the application resource download and application update are continuous and uninterrupted.
[0230] In some embodiments of this application, the first application idle time may include a continuous application non-running time period or multiple non-contiguous application non-running time periods, without limitation.
[0231] As an example, an electronic device can download updated application resources during a first idle period and then update the application during a second idle period. The first and second idle periods may be the same or different time periods.
[0232] In some embodiments of this application, the first application idle time may be subject to certain conditions, such as including but not limited to at least one of the following: the electronic device is a preset device type, the operating system version of the electronic device meets the version requirements, the electronic device is connected to a mobile network, the electronic device is connected to WiFi, the available storage space of the electronic device is greater than a certain available space threshold (e.g., 2GB, 3GB, etc.), the battery level of the electronic device is greater than a certain battery threshold (e.g., 50%, 30%, etc.), the screen of the electronic device is off, the electronic device is charging, and the temperature of the electronic device is lower than a certain temperature threshold. As an example, please refer to Figure 9A, which illustrates two schematic diagrams of the process of downloading game resources during application idle time provided by embodiments of this application, taking a game application as the first application as an example.
[0233] As an example, an electronic device can download a portion of game resources during a first non-running period within the first idle time, and download another portion of game resources during a second non-running period within the first idle time. The first non-running period is the time during which the first application is not running after installation and before its initial launch, while the second non-running period is the time during which the first application is not running after its initial launch.
[0234] As shown in Figure 9A(a), the electronic device can download a portion of the game resources during the application's idle time (such as the first idle time) after the game application is installed and before it is first launched, such as downloading a portion of the game resources that are of higher importance, and then download another portion of the game resources during the application's idle time (such as one or more second idle times) after the application is first launched, such as downloading a portion of the game resources that are of lower importance.
[0235] For example, as shown in Figure 9A(a), the operating system of the electronic device can initiate a resource acceleration service and a download task during the application's idle time (such as the first idle time) after the game application is installed and before its initial launch. This download process involves downloading a portion of the game resources, such as a portion of the most important initial launch game resources, and performing one or more post-processing steps, including decompression, format conversion, version verification, or secondary integration of these resources. For example, the most important game resources may include, but are not limited to, resources essential for the basic operation of the game application, such as basic game scene maps, basic game character models, basic game equipment, and basic game sound effects. Based on this, once the portion of resources essential for the basic operation of the game application has been downloaded and post-processed, the game application can be launched directly when the user clicks the game icon.
[0236] Furthermore, the operating system of the electronic device can download additional game resources during the application's idle time after the initial launch (such as one or more secondary idle times), or during non-running periods after the application's initial launch. This includes downloading a portion of less important non-initial launch game resources and performing one or more post-processing procedures such as decompression, format conversion, version verification, or secondary integration of these resources. For example, less important game resources may include, but are not limited to, special game scene maps, paid game character models, paid game equipment, and paid game sound effects. Based on this, once the less important game resources are downloaded and post-processed, the game application can provide users with a richer gaming experience.
[0237] Based on the game resource download process example shown in Figure 9A(a), the electronic device can fully utilize the time before the game application is first launched after installation, as well as the non-running time after the application is first launched, to download application resources and update the application during the application's idle time. Therefore, the application does not need to download application resources and update the application again when it starts up, which can effectively avoid the problem of slow application startup caused by the latency of downloading application resources and updating the application when it starts up, thus improving the application startup speed and user experience. In addition, since the resource package pre-download service is a system-level capability, it can support multiple applications on the electronic device to use similar idle time downloads and application updates.
[0238] In some embodiments, after the game application is launched, the electronic device can detect whether there are game resource updates on the resource server of the game application operation platform during the application's idle time (such as during non-running periods). If there are game resource updates, the electronic device can download the updated game resources and perform post-processing.
[0239] As one possible approach, electronic devices can detect whether there are game resource updates by comparing the local game resource version number with the game resource version number on the game application's operating platform.
[0240] For example, as shown in Figure 9A(b), the operating system of an electronic device can start a resource acceleration service during application idle time (such as during non-running periods). During the application's non-running periods, it checks whether there are game resource updates on the resource server of the game application operation platform. If there are game resource updates, it starts a download task to download the updated game resources. After the updated game resources are downloaded, it performs one or more post-processing procedures such as decompression, format conversion, version verification, or secondary integration. Based on this, when the updated game resources are downloaded and post-processed during application idle time, the next time the game application is launched (such as a cold start), it can provide users with a richer and more stable gaming experience without downloading game resources or updating the application.
[0241] Based on the game resource download process example shown in Figure 9A(b), the electronic device can fully utilize the non-running time after the application's initial launch to download application resources and update the application during its idle period. Therefore, the application does not need to download application resources and update the application again upon startup, effectively avoiding the problem of slow application startup caused by latency due to application resource downloads and updates during application startup, thus improving application startup speed and user experience. Furthermore, since the resource package pre-download service is a system-level capability, it can support multiple applications on the electronic device to use similar idle-time downloads and application updates.
[0242] In some embodiments, the application CP can host application resources on the device's CDN or a third-party CDN when application resources are updated. For example, the application CP can create an application resource pre-download task, package and encrypt the application resources, and then host them on the device's CDN or a third-party CDN.
[0243] As an example, an application provider (CP) can request a pre-download of application resources when these resources are updated, and create an application resource pre-download task after the request is approved. For instance, the application resource pre-download request interface can be launched by following these steps: Select the application in the application list → Click Distribution → Click Service → Click Application Resource Background Download Request. For example, when creating an application resource pre-download task, the application CP can configure one or more settings as shown in Figure 9B, such as download type, CDN, package size, and CDN domain whitelist.
[0244] In some embodiments of this application, as shown in FIG9C, FIG9C illustrates another resource download method flowchart provided by an embodiment of this application, taking the download of application resources of the first application during the idle time of the first application as an example. The resource acceleration service is provided by the operating system of the electronic device.
[0245] As shown in Figure 9C, the electronic device can download application resources through S901-S904:
[0246] S901: When the first condition is detected, enable the resource pre-download function of the resource acceleration service.
[0247] As an example, satisfying the first condition may include: the application resources of the first application are updated and the first application is idle. For example, the first application being idle means that the first application is not running (including foreground and background running). Optionally, satisfying the first condition may also include one or more of the following conditions: the electronic device is connected to a mobile network, the electronic device is connected to WiFi, the storage space of the electronic device is greater than a certain available space threshold, the battery level of the electronic device is greater than a certain battery threshold, the screen of the electronic device is off, or the temperature of the electronic device is lower than a certain temperature threshold (e.g., 37°C).
[0248] S902: The resource acceleration service obtains resource download task information from the first application.
[0249] For example, resource download task information is such as a resource download list.
[0250] In some embodiments of this application, the resource acceleration service can also obtain resource download permissions for the first application from the application center. When the permission indicates that the first application meets the permission requirements to download application resources through the resource acceleration service, in response to the fulfillment of the first condition, the resource acceleration process of the first application is started, and resource download task information is obtained from the resource acceleration process. At this time, the main process of the first application has not been started. That is, the main process of the first application is not running in either the foreground or the background.
[0251] S903: Resource acceleration service downloads resources based on resource download task information.
[0252] In some embodiments of this application, when the resource acceleration service downloads resources according to the resource download task information, the resource acceleration service can first download the resources to the temporary directory of the first application, and then move the downloaded resources from the temporary directory of the first application to the fixed directory of the first application. For example, the resource acceleration service downloads resources in the background of the electronic device according to the resource download task information.
[0253] S904: The resource acceleration service notifies the first application of the resource download status.
[0254] For example, the resource acceleration service can notify the first application of the resource download status. For example, the notification method may include, but is not limited to, live notification, pop-up notification, voice notification, etc.
[0255] For further information on S901-S904, please refer to the explanation of Figure 7 above; it will not be repeated here.
[0256] As an example, please refer to Figure 10A. Figure 10A, in conjunction with a specific example, taking a game application as an example, illustrates a process of downloading application resources during application idle time provided by an embodiment of this application. The system architecture shown in Figure 10A has integrated an acceleration extension framework and can implement resource update business logic. As shown in Figure 10A, the application resource download process may include S1001-S1009:
[0257] S1001: The resource scheduling service (RSS) has determined that the game application is in a period of idle time.
[0258] As an example, RSS can determine when a game application is idle, whether it is running in the foreground or in the background.
[0259] As an example, RSS can determine that a game application is idle when it is not running (including foreground and background running) and meets one or more of the following conditions: the electronic device is connected to a mobile network, the electronic device is connected to WiFi, the storage space of the electronic device is greater than a certain available space threshold, the battery of the electronic device is greater than a certain battery threshold, the screen of the electronic device is off, or the temperature of the electronic device is lower than a certain temperature threshold (such as 37°C).
[0260] If it is determined that the game application is in a period of idle time, RSS executes S1002.
[0261] S1002: RSS resource acceleration service.
[0262] Among them, resource acceleration service is a system-level system ability (SA) that can provide background application resource acceleration capabilities for various applications, and provide applications with idle application resource download and application update functions.
[0263] In some embodiments, after the resource acceleration service is launched, the resource pre-download function of the resource acceleration service is enabled. The resource pre-download function enables the electronic device to download resources in the background of the electronic device according to the resource download task information of the application when the first condition is met.
[0264] S1003: The resource acceleration service queries the application center for game resource download permissions.
[0265] As an example, the resource acceleration service can query the application center (such as the game service in the app market) for one or more pieces of information, such as the status of automatic update switch, the list of applications that support automatic updates, and priority policies, to determine whether the game application currently meets the permission requirements to download application resources through the resource acceleration service and the application's resource acceleration process.
[0266] As an example, one or more pieces of information, such as the automatic update switch status, the list of applications that support automatic updates, and priority policies, may be pre-defined and submitted to the application center by the game application developer.
[0267] If the game application meets the permission requirements to download application resources through the resource acceleration service and the application's resource acceleration process, execute S1004.
[0268] For example, if an electronic device queries the application center for the status of the automatic update switch through the resource acceleration service and the application's resource acceleration process, and the automatic update switch is in the on state, the resource acceleration service can execute S1004.
[0269] For example, if an electronic device queries the application center for the automatic update switch status and the list of applications that support automatic updates through the resource acceleration service and the application's resource acceleration process, and the automatic update switch status is on and the application is in the list of applications that support automatic updates, the resource acceleration service can execute S1004.
[0270] For example, if an electronic device queries the application center for the automatic update switch status, the list of applications that support automatic updates, and the priority policy through the resource acceleration service and the application's resource acceleration process, and the automatic update switch status is on, the application is in the list of applications that support automatic updates, and the application's priority meets the preset conditions, the resource acceleration service can execute S1004.
[0271] S1004: The resource acceleration service initiates the resource acceleration process for game applications.
[0272] Among them, the resource acceleration process of the game application, as a process of the game application, can work with the resource acceleration service to complete the download of game resources during off-peak hours according to the game resource download strategy customized by the developer.
[0273] As one possible implementation, the resource acceleration process of the game application can detect whether the application resources have been updated by comparing the local application resource version with the latest version after it is launched; if they are inconsistent, it is assumed that the application resources have been updated and S1005 is executed; if they are consistent, it is assumed that the application resources have not been updated and no action is taken.
[0274] S1005: The resource acceleration process of the game application generates a resource download list.
[0275] As an example, the application resources of a game application may include one or more files, and correspondingly, the resource download list may include information about one or more files, without limitation.
[0276] Taking a game application's application resources as an example, which include multiple files, different files in the application resources of a game application may correspond to different categories of game resources. For example, different categories of game resources such as game character models, game scene maps, game equipment, and game sound effects may be located in different files.
[0277] S1006: The resource acceleration process of the game application triggers the download task of the resource acceleration service.
[0278] As one possible implementation, the resource acceleration process of a game application can call a system Request to trigger a download task for the resource acceleration service, with the system Request carrying a list of resources to be downloaded.
[0279] As an example, the system request also carries the source (starting point) and destination (destination) of the download task. For example, the source (starting point) may be the game's content provider (CP), and the destination (destination) may be the game application's temporary directory.
[0280] As one possible implementation, after the game application's resource acceleration process sends the resource download list to the resource acceleration service, the resource acceleration service can terminate the game application's resource acceleration process to save computing power and resources.
[0281] In some embodiments, as shown in Figure 10B, the electronic device may display a corresponding prompt to the user when a download task is about to begin and / or while the download task is being executed, as shown in Figure 10B: "Background download of application resources is about to begin." Figure 10B is an example; in actual applications, the prompting method may include, but is not limited to, live prompts, pop-up prompts, voice prompts, etc. In some embodiments, as shown in Figure 10B, the electronic device may also display options such as "Cancel Download" and "Start Download" when displaying the prompt to the user, allowing the user to cancel or confirm the download task. In some embodiments, if the user does not cancel or confirm the download task within a certain period of time (e.g., 5 seconds) after displaying the prompt, the resource acceleration service may continue to execute the download task; if the user confirms the download task, the resource acceleration service may immediately begin executing the download task. As an example, as shown in Figure 10B, the electronic device may display the prompt message: "If no action is taken after 5 seconds, start the download task."
[0282] In some embodiments, as shown in Figure 10C, the electronic device can notify the user of the background download progress in real time during the background download task, such as "Downloading game resources in the background" and "Currently 45% complete" as shown in Figure 10C. Figure 10C is just an example. In practical applications, the notification methods for background download progress may include, but are not limited to, live notifications, pop-up notifications, voice notifications, etc., and are not limited thereto.
[0283] S1007: The resource acceleration service downloads the application resources of the game application to the temporary directory of the game application based on the resource download list.
[0284] As one possible implementation, the resource acceleration service can execute download tasks based on the information carried in the system request. For example, based on the Source (starting point) and Dest (target location) carried in the system request, the file under the Source (starting point) path can be downloaded to the Dest (target location) according to the resource download list to ensure the security of application data.
[0285] The application resources of a game application include at least one file. Taking a game application with multiple application resources as an example, the resource acceleration service can download multiple files to the application's temporary directory based on the resource download list.
[0286] S1008: When a file in the application resources of a game application is downloaded, the resource acceleration service moves the downloaded file from the temporary directory to the fixed directory of the game application through the resource acceleration process of the game application.
[0287] As one possible implementation, when the application resources of the game application have finished downloading, the resource acceleration service can restart the resource acceleration process of the game application, and move the downloaded application resources of the game application from the temporary directory to the fixed directory of the game application through the resource acceleration process.
[0288] As one possible implementation, when the resource download list includes multiple files, the resource acceleration service can move these files from the temporary directory to the game application's fixed directory after downloading them. For example, the resource acceleration service can copy multiple files from the temporary directory to the game application's fixed directory and then delete the files stored in the temporary directory after the copy is complete, thus saving storage space.
[0289] As one possible implementation, for game applications whose resources consist of multiple files, the resource acceleration service can operate on a file-by-file basis. After each file is downloaded from its source (starting point) to its destination (destination), the game application's resource acceleration process moves the file from a temporary directory to a fixed directory. The resource acceleration service can repeat this process until multiple files are downloaded to the temporary directory and moved to the fixed directory. This ensures the isolation between files and guarantees the security of application data.
[0290] After completing the download of multiple files to the temporary directory and the movement to the fixed directory, execute S1009.
[0291] S1009: Notification of the resource acceleration process for the game application: The resource acceleration service has completed the movement of application resources.
[0292] This completes the download of game resources during the game application's idle time. In some embodiments, the game application's resource acceleration process can also update the application during idle time, including but not limited to post-processing of the updated application resources. For example, post-processing may include, but is not limited to, one or more of the following: decompression, format conversion, version verification, or secondary integration, to ensure that the game resources can be correctly recognized and used by the game engine.
[0293] As an example, after the RSS resource acceleration service is launched, the resource acceleration service can launch the resource acceleration process of the game application through S1001D-S1010D as shown in Figure 10D and cooperate with the resource acceleration process of the game application to download game resources.
[0294] S1001D: Resource acceleration service enables background resource pre-download function.
[0295] S1002D: The resource acceleration service carries a manifestUrl resource list and requests configuration information from the resource acceleration process of the game application.
[0296] The configuration information includes the configuration information for the resource download task.
[0297] As an example, the resource acceleration service carries a manifestUrl resource manifest, requests configuration information from the game application's resource acceleration process, and is also used to launch the game application's resource acceleration process.
[0298] S1003D: The resource acceleration process for game applications collects configuration information based on the manifestUrl resource list.
[0299] As an example, the resource acceleration process of a game application can implement the `onDownloadContentRequest` method of the process based on the `manifestUrl` resource manifest, receive parameters such as `manifestUrl`, and collect configuration information based on these parameters. For instance, if `manifestUrl` is not empty, the resource acceleration process can collect configuration information from the device manufacturer's CDN; if `manifestUrl` is empty, the resource acceleration process can collect configuration information from a third-party CDN.
[0300] As an example, the configuration information can be a list of resource downloads (also known as a configuration information list).
[0301] S1004D: The resource acceleration process of the game application returns configuration information to the resource acceleration service.
[0302] As an example, the resource acceleration process of a game application returns a list of configuration information to the resource acceleration service. The list of configuration information includes multiple (e.g., 100, 200, etc.) configuration information AssetDownloadConfig[].
[0303] As an example, the resource acceleration process of a game application can return configuration information to the resource acceleration service, which can then be used to trigger the download task of the resource acceleration service.
[0304] S1005D: Resource acceleration service downloads resources from CDN based on configuration information.
[0305] As an example, the resource acceleration service can download resources one by one from the device manufacturer's CDN and / or third-party CDNs based on the configuration information list.
[0306] As an example, the resource acceleration service can execute S1006D each time a download task is completed, and the resource acceleration service can execute S1005D-S1006D in a loop until all resource download tasks are completed.
[0307] As one possible implementation, the resource acceleration service can download application resources to the application's temporary directory based on the configuration information list (i.e., the resource download list), and execute S1006D when each download task is completed, so that the game application's resource acceleration process can move the downloaded files from the temporary directory to the application's fixed directory.
[0308] S1006D: The game resource acceleration service notifies the game application's resource acceleration process of the current download status after each download task is completed.
[0309] S1007D: The resource acceleration process for game applications adds different processing logic based on the task status.
[0310] As an example, the onBackgroundDownloadSucceeded method of a game application's resource acceleration process can proceed to the download path to perform operations (such as moving or decompressing) on the game resource files when a "successful" download status is received.
[0311] As an example, the onBackgroundDownloadSucceeded method of a game application's resource acceleration process can implement its own handling logic based on the reason for failure (DownloadFault) when it receives a "failed" download status.
[0312] S1008D: The resource acceleration service disables the background resource pre-download function after all download tasks are completed.
[0313] S1009D: Resource acceleration service notification indicates that the resource acceleration process of the game application has been shut down.
[0314] S1010D: Resource acceleration process for game applications is turned off.
[0315] As an example, a game application's resource acceleration process can implement the onExtensionWillTerminate method to receive a shutdown notification.
[0316] Figure 10D shows the resource pre-download function enabled by the resource acceleration service as an example. In some embodiments, the resource pre-download function can also be enabled by other modules, units or services. This application does not limit this.
[0317] As another example, please refer to Figure 11A. Figure 11A, with a specific example, taking a game application as an example, illustrates another process of downloading application resources during application idle time provided by an embodiment of this application. The system architecture shown in Figure 11A has integrated an acceleration extension framework and can implement resource update business logic. As shown in Figure 11A, the application resource download process may include S1101-S1108:
[0318] S1101: The bundle manager system (BMS) broadcasts a game application installation completion event when the game application is installed on an electronic device, in order to start the resource acceleration service.
[0319] As an example, an app store can respond to a user's click to install a game app by installing the game app on the electronic device via a Business Management System (BMS). The game app is submitted to the app store by the game developer based on the game app's pre-developed content.
[0320] As one possible implementation, when the game application installation is complete, the BMS can broadcast a game application installation completion event to the resource acceleration service to start the resource acceleration service.
[0321] S1102: The resource acceleration service queries the application center for game resource download permissions.
[0322] For information on S1102, please refer to the description of S1003 above; it will not be repeated here.
[0323] If the game application meets the permission requirements to download application resources through the resource acceleration service and the application's resource acceleration process, execute S1103.
[0324] S1103: Resource acceleration service starts the resource acceleration process of game applications.
[0325] For information on S1103, please refer to the introduction of S1004 above; it will not be repeated here.
[0326] As one possible implementation, the resource acceleration process of the game application can detect whether the application resources have been updated by comparing the local application resource version with the latest version after it is launched; if they are inconsistent, it is assumed that the application resources have been updated and S1104 is executed; if they are consistent, it is assumed that the application resources have not been updated and no action is taken.
[0327] S1104: The resource acceleration process of the game application generates a resource download list.
[0328] For information on S1104, please refer to the introduction of S1005 above; it will not be repeated here.
[0329] In some embodiments, the electronic device may display a corresponding prompt to the user when a download task is about to begin and / or while a download task is being performed. Exemplary methods of prompting may include, but are not limited to, live notifications, pop-up notifications, and voice prompts.
[0330] In some embodiments, the electronic device may also display options such as cancel or pause when showing the prompt to the user, allowing the user to cancel or pause the download task. In some embodiments, if the user does not cancel or pause the download task within a certain period of time after the prompt is shown, the resource acceleration service may continue to execute the download task.
[0331] S1105: The resource acceleration process of the game application triggers the download task of the resource acceleration service.
[0332] For information on S1105, please refer to the introduction of S1006 above; it will not be repeated here.
[0333] S1106: The resource acceleration service downloads the application resources of the game application to the temporary directory of the game application based on the resource download list.
[0334] For information on S1106, please refer to the introduction of S1007 above; it will not be repeated here.
[0335] S1107: When a file in the application resources of a game application is downloaded, the resource acceleration service moves the downloaded file from the temporary directory to the fixed directory of the game application through the resource acceleration process of the game application.
[0336] For information on S1107, please refer to the introduction of S1008 above; it will not be repeated here.
[0337] After completing the download of multiple files to the temporary directory and the movement to the fixed directory, execute S1108.
[0338] S1108: Notification of the resource acceleration process for the game application: The resource acceleration service has completed the movement of application resources.
[0339] For information on S1108, please refer to the introduction of S1009 above; it will not be repeated here.
[0340] This completes the download of game resources during the game application's idle time. In some embodiments, the game application's resource acceleration process can also update the application during idle time, including but not limited to post-processing of the updated application resources. For example, post-processing may include, but is not limited to, one or more of the following: decompression, format conversion, version verification, or secondary integration, to ensure that the game resources can be correctly recognized and used by the game engine.
[0341] In the example of Figure 11A, the resource acceleration service can initiate the resource acceleration process of the game application through S1001D-S1010D as shown in Figure 10D, and cooperate with the resource acceleration process of the game application to download game resources. This process can be referred to the description of S1001D-S1010D above, and will not be repeated here. In some embodiments of this application, when the electronic device completes the download of updated application resources during application idle time, but has not completed the application update, if the electronic device receives an operation to start the application, the electronic device can start the application and switch the application update task from the background to the foreground through the resource acceleration service and the application's resource acceleration process to continue through the application downloader.
[0342] In some embodiments of this application, when an electronic device is downloading updated application resources during the idle time of the first application but has not completed the download, if the electronic device receives an operation to launch the first application, the electronic device can launch the first application, such as launching the main process of the first application. In response to the launch of the main process of the first application, the resource package pre-download service can switch the task of downloading resources from the background of the electronic device to the foreground of the electronic device. For example, the resource download task can be switched from the background to the foreground through the resource acceleration service and the resource acceleration process of the first application and then continued through the application downloader, or it can continue to be carried out in the background of the electronic device, such as continuing to download resources in the background through the resource acceleration service and the resource acceleration process of the first application.
[0343] Alternatively, if an electronic device receives an operation to launch the first application while downloading updated application resources during the first application's idle time but the download is not yet complete, the electronic device can launch the first application, such as its main process. In response to the launch of the first application's main process, the resource package pre-download service can decide whether to switch the resource download task from the background to the foreground of the electronic device, or continue it in the background, based on the application resource download continuation strategy. Developers can set relevant rules in the application resource download continuation strategy based on one or more actual factors such as operational data, device capabilities, and user preferences. For example, the application resource download continuation strategy can directly specify whether to switch the resource download task from the background via the resource acceleration service and the first application's resource acceleration process to the foreground via the application downloader. Alternatively, the application resource download continuation strategy can specify that when the download ratio is greater than a certain threshold, resource downloading continues in the background based on the resource acceleration service and the first application's resource acceleration process; when the download ratio is less than or equal to a certain threshold, it switches to the foreground via the application downloader. This application's embodiments do not limit the specific provisions regarding how the application resource download continuation strategy should be defined.
[0344] In some embodiments of this application, after the resource package pre-download service switches the task of downloading resources from the background of the electronic device to the foreground of the electronic device, the resource package pre-download service may stop displaying the background download progress.
[0345] In some embodiments of this application, after the resource package pre-download service switches the task of downloading resources from the background of the electronic device to the foreground of the electronic device, the resource package pre-download service can display the foreground download progress of the resources, and the initial state of the foreground download progress is the final state of the background download progress.
[0346] For example, please refer to Figure 11B, which shows a schematic diagram of a prompt interface for resource download task continuation provided in this application embodiment, taking a game application as an example. As shown in Figure 11B, when the resource package pre-download service is downloading game resources in the background of the electronic device, the resource package pre-download service displays the background download progress shown on page 11-1 (page 11-1 uses 45% background download progress as an example). When the main process of the first application starts, the game application starts and displays the startup interface shown on page 11-2. Simultaneously, the resource package pre-download service switches the resource download task from the background of the electronic device to the foreground of the electronic device and displays the foreground download progress shown on page 11-3. The initial state of the foreground download progress is 45%, which is the final state of the background download progress.
[0347] In some embodiments of this application, after the resource package pre-download service displays the initial state of the foreground download progress, the resource package pre-download service may also stop displaying the foreground download progress.
[0348] In some embodiments of this application, in response to the startup of the main process of the first application, the resource package pre-download service can also prompt the user, allowing the user to choose whether to switch the resource download task from the background of the electronic device to the foreground, or to continue downloading the resource in the background. For example, in response to the user's first action upon receiving the prompt, the resource package pre-download service can continue downloading the resource in the background of the electronic device during the startup of the main process of the first application. Alternatively, in response to the user's second action upon receiving the prompt, the resource package pre-download service can switch the resource download task from the background of the electronic device to the foreground during the startup of the main process of the first application.
[0349] As an example, please refer to Figure 12A, which illustrates a schematic diagram of a resource download task continuation process, using the application resource download process shown in Figure 10A as an example.
[0350] As shown in Figure 12A, after executing S1001-S1006 as shown in Figure 10A, during the execution of S1007-S1008, the application resource download process may also include S1201-S1207, or include S1201-S1203 and S1208:
[0351] S1201: In response to the operation of launching the game application, the game application obtains the background download progress of game resources from the resource acceleration service.
[0352] As one possible implementation, the game application can obtain the list of completed resource downloads from the resource acceleration service and, in conjunction with performing transmission integrity verification on files in a fixed directory of the game application, obtain the background download progress of game resources from the resource acceleration service. For example, transmission integrity verification can be based on, but is not limited to, algorithms such as the MD5 message digest algorithm.
[0353] S1202: The game application determines whether the game resources have been downloaded completely.
[0354] If the game resources have not been downloaded completely, proceed to step S1203.
[0355] S1203: The strategy for game applications to continue downloading application resources, and determines whether to continue downloading game resources through resource acceleration services and the application's resource acceleration process.
[0356] As an example, the application resource download continuation strategy can directly specify whether to switch the resource download task from the background through the resource acceleration service and the application's resource acceleration process to the foreground through the application downloader.
[0357] As an example, the application resource download continuation strategy can stipulate that when the download ratio is greater than a certain threshold, resource downloads continue in the background through resource acceleration services and the application's resource acceleration process; when the download ratio is less than or equal to a certain threshold, the download is switched to the foreground and continued through the application downloader. This application embodiment does not limit the specifics of how the application resource download continuation strategy should be defined.
[0358] If the game application decides to continue downloading game resources through the resource acceleration service and the application's resource acceleration process, the game application will execute S1204-S1207:
[0359] S1204: The game should send a list of incomplete resource downloads to the resource acceleration service.
[0360] S1205: The resource acceleration service downloads the application resources of the game application to the temporary directory of the game application based on the list of incomplete resource downloads.
[0361] For information on S1205, please refer to the introduction of S1007 above; it will not be repeated here.
[0362] S1206: When the application resources of the game application are downloaded, the resource acceleration service moves the downloaded application resources of the game application from the temporary directory to the fixed directory of the game application through the resource acceleration process of the game application.
[0363] For information on S1206, please refer to the introduction of S1008 above; it will not be repeated here.
[0364] S1207: Notification of the resource acceleration process for the game application: The resource acceleration service has completed the movement of application resources.
[0365] For information on S1207, please refer to the introduction of S1009 above; it will not be repeated here.
[0366] If the game application decides to continue downloading resources in the foreground via the application downloader, the game application terminates the resource acceleration service and the game application's resource acceleration process, and executes S1208:
[0367] S1208: The game application launches the game application downloader to download incomplete game resources.
[0368] This completes the download of game resources for the game application. After downloading, the application can be updated, including but not limited to post-processing of the updated application resources. For example, post-processing may include, but is not limited to, one or more of the following: decompression, format conversion, version verification, or secondary integration, to ensure that the game resources can be correctly recognized and used by the game engine.
[0369] As an example, after receiving the operation to launch the game application, if the game application decides to continue downloading game resources through the resource acceleration service and the application's resource acceleration process, the game application can continue downloading game resources through the resource acceleration service as shown in Figure 12B, S1201B-S1208B.
[0370] S1201B: Game applications obtain manifestUrl resource lists from resource acceleration services.
[0371] As an example, a game application can call the fetchManifestUrl method to retrieve the manifestUrl resource list from the resource acceleration service.
[0372] S1202B: Game applications collect configuration information based on the manifestUrl resource list.
[0373] As an example, game applications can use a resource acceleration process to collect configuration information based on the manifestUrl resource manifest. For instance, if manifestUrl is not empty, the resource acceleration process can collect configuration information from the device manufacturer's CDN; if manifestUrl is empty, the resource acceleration process can collect configuration information from a third-party CDN.
[0374] S1203B: Game application subscription resource download task progress / status event to resource acceleration service.
[0375] As an example, a game application can call the `on('progress')` method to get the progress of a resource download task. For instance, a game application can call the `on('pause')` method to determine if the download task has been paused; another example is that a game application can call the `on('complete')` method to determine if the resource has been successfully downloaded; yet another example is that a game application can call the `on('fail')` method to determine if the download task has failed.
[0376] S1204B: Game applications add resource download tasks to the resource acceleration service.
[0377] As an example, a game application can call the addAssetDownloadTask method to add a resource download task from the manifestUrl list.
[0378] S1205B: Resource acceleration service for downloading resources.
[0379] As an example, the resource acceleration service can download resources from a CDN based on configuration information. For instance, the resource acceleration service can download resources one by one from the device manufacturer's CDN and / or third-party CDNs based on a list of newly added manifestUrls.
[0380] As an example, the resource acceleration service can execute S1206B each time a download task is completed, and the resource acceleration service can execute S1205B-S1206B in a loop until all resource download tasks are completed.
[0381] As one possible implementation, the resource acceleration service can download application resources to the application's temporary directory based on the newly added manifestUrl list, and execute S1206B upon completion of each download task so that the game application can move the downloaded files from the temporary directory to the application's fixed directory.
[0382] S1206B: The game resource acceleration service notifies the game application of the download status of a single resource task.
[0383] As an example, a game resource acceleration service can notify the game application of the download status of each completed download task.
[0384] In some embodiments, the game application may notify the user of the download progress / download status based on the download task progress / download status provided by the game resource acceleration service. For example, the notification methods for download progress may include, but are not limited to, live notifications, pop-up notifications, and voice notifications.
[0385] S1207B: The resource acceleration process for game applications adds different processing logic based on the task status.
[0386] As an example, a game application can perform operations (such as moving or decompressing) on the download path when it receives a DownloadCompletedInfo returned by the on('progress') method indicating that the resource download was successful.
[0387] As an example, a game application can implement its own processing logic based on the reason for the failure (DownloadFault) when it receives the DownloadFailedInfo returned by the on('fail') method, indicating that the download task has failed.
[0388] As an example, a game application can call the resumeAssetDownloadTask method to resume the paused download task if the game receives an AssetDownloadTask returned by the on('pause') method indicating that the download task has been paused, carrying the taskId.
[0389] S1208B: Game application unsubscribes from resource download task progress / status event.
[0390] As an example, a game application can call the off('progress') method to cancel the resource download progress retrieval task.
[0391] As an example, a game application can call the off('pause') method to cancel the download task pause event.
[0392] As an example, a game application can call the off('complete') method to cancel the successful resource download event.
[0393] As an example, a game application can call the off('fail') method to cancel the resource download failure event.
[0394] As an example, during the collaborative downloading of game resources by the resource acceleration service and the game application's resource acceleration process, upon receiving an operation to launch the game application, if the game application decides to continue downloading resources in the foreground via the application downloader, the game application can continue downloading game resources via the resource acceleration service through steps S1201C-S1207C as shown in Figure 12C. For details on the collaborative downloading process of game resources by the resource acceleration service and the game application's resource acceleration process, please refer to steps S1001D-S1010D in Figure 10D.
[0395] S1201C: Resource acceleration service notification to shut down the resource acceleration process of the game application.
[0396] As an example, a game application's resource acceleration process can implement the onExtensionWillTerminate method to receive a shutdown notification.
[0397] S1202C: Resource acceleration service disables resource pre-download function.
[0398] S1203C: Game application subscription resource download task progress / status event to resource acceleration service.
[0399] As an example, a game application can call the `on('progress')` method to get the progress of a resource download task. For instance, a game application can call the `on('pause')` method to determine if the download task has been paused; another example is that a game application can call the `on('complete')` method to determine if the resource has been successfully downloaded; yet another example is that a game application can call the `on('fail')` method to determine if the download task has failed.
[0400] S1204C: Resource acceleration service for downloading resources.
[0401] As an example, resource acceleration services can download resources from a CDN based on configuration information via an application downloader. For instance, the application downloader can download resources one by one from the device manufacturer's CDN and / or third-party CDNs based on a list of newly added manifestUrls.
[0402] As an example, the resource acceleration service can execute S1205C upon completion of each download task, and the resource acceleration service can cyclically execute S1204C-S1205C until all resource download tasks are completed.
[0403] S1205C: The game resource acceleration service notifies game applications of the download status of individual resource tasks.
[0404] As an example, a game resource acceleration service can notify the game application of the download status of each completed download task.
[0405] In some embodiments, the game application may notify the user of the download progress / download status based on the download task progress / download status provided by the game resource acceleration service. For example, the notification methods for download progress may include, but are not limited to, live notifications, pop-up notifications, and voice notifications.
[0406] S1206C: The resource acceleration process for game applications adds different processing logic based on the task status.
[0407] As an example, a game application can perform operations (such as moving or decompressing) on the download path when it receives a DownloadCompletedInfo returned by the on('progress') method indicating that the resource download was successful.
[0408] As an example, a game application can implement its own processing logic based on the reason for the failure (DownloadFault) when it receives the DownloadFailedInfo returned by the on('fail') method, indicating that the download task has failed.
[0409] As an example, a game application can call the resumeAssetDownloadTask method to resume the paused download task if the game receives an AssetDownloadTask returned by the on('pause') method indicating that the download task has been paused, carrying the taskId.
[0410] S1207C: Game application unsubscribes from resource download task progress / status event.
[0411] As an example, a game application can call the off('progress') method to cancel the resource download progress retrieval task.
[0412] As an example, a game application can call the off('pause') method to cancel the download task pause event.
[0413] As an example, a game application can call the off('complete') method to cancel the resource download success event.
[0414] As an example, a game application can call the off('fail') method to cancel the resource download failure event.
[0415] Similar to Figure 12A, please refer to Figure 13 as an example. Figure 13 shows another schematic diagram of the resource download task continuation process, taking the application resource download process shown in Figure 11A as an example.
[0416] As shown in Figure 13, after executing S1101-S1105 shown in Figure 11A, during the execution of S1106-S1107, the application resource download process may also include S1201-S1207, or S1201-S1203 and S1208. For the introduction of S1201-S1208 shown in Figure 13, please refer to the introduction of S1201-S1208 shown in Figure 12A above, which will not be repeated here.
[0417] In the example of Figure 13, after receiving the operation to start the game application, if the game application decides to continue downloading game resources through the resource acceleration service and the application's resource acceleration process, the game application can continue to download game resources in the background through S1201B-S1208B as shown in Figure 12B and subscribe to the resource download task progress / status event of the resource acceleration service. This part of the process can be referred to the introduction of S1201B-S1208B above, and will not be repeated here.
[0418] After receiving the command to launch the game application, if the game application decides to continue downloading resources in the foreground through the application downloader, the game application can continue downloading game resources in the foreground through the resource acceleration service as shown in Figure 12C (S1201C-S1207C) and subscribe to the resource download task progress / status events of the resource acceleration service. This process can be referred to the introduction of S1201C-S1207C above, and will not be repeated here.
[0419] As can be seen from the application resource download methods shown in Figures 12A and 13, the solution provided in this application embodiment for downloading application resources and updating applications during application idle time can, on the one hand, effectively avoid the problem of slow application startup caused by the delay in downloading application resources and updating applications when the application starts, thereby improving the application startup speed; on the other hand, it can also quickly start the application when the user needs to use the application while the application resources are being downloaded in the background, and supports developers to customize the application resource download continuation strategy, thereby achieving flexible application resource download continuation.
[0420] It should be understood that the various solutions in the embodiments of this application can be used in a reasonable combination, and the explanations or descriptions of the various terms appearing in the embodiments can be referenced or explained to each other in the various embodiments, without limitation.
[0421] It should also be understood that, in the various embodiments of this application, the order of the above-mentioned processes does not imply 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 this application.
[0422] It is understood that electronic devices, etc., in order to achieve the functions of any of the above embodiments, include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware-driven or software-driven manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0423] This application embodiment can divide electronic devices into functional modules. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0424] As an example, please refer to FIG14, which shows a functional structure block diagram of an electronic device provided in an embodiment of this application. As shown in FIG14, the electronic device may include a processing unit 1410, a communication unit 1420, a storage unit 1430, and an interaction unit 1440.
[0425] In some embodiments, the processing unit 1410 is configured to support an electronic device in performing the following processes: detecting that a first condition is met and enabling the resource pre-download function of the resource acceleration service; obtaining resource download task information from a first application; downloading resources according to the resource download task information; and / or other processes related to the implementation of this application.
[0426] In some embodiments, the processing unit 1410 is configured to support the electronic device in performing the following processes: detecting whether the application resources of the application have been updated; when the application resources have been updated and the application is idle, launching the resource acceleration service and the application's resource acceleration process, and calling the communication unit 1420 to silently download the updated application resources in the background; updating the application based on the downloaded updated application resources, and / or other processes related to the implementation of this application.
[0427] For example, the processing unit 1410 can download the updated application resource files to the application's temporary directory in the background through the resource acceleration service and the application's resource acceleration process, and move the downloaded files from the temporary directory to the application's fixed directory.
[0428] For example, updating the application by the processing unit 1410 includes performing one or more of the following operations on the downloaded application resources: decompression, format conversion, version verification, or secondary integration.
[0429] In some examples, processing unit 1410 can download updated application resources during the first idle time and update the application during the second idle time by using resource acceleration services and application resource acceleration processes. The first and second idle times may be the same or different time periods.
[0430] For example, the first idle time may include a first non-running period after the application is installed and before its first launch. During this first idle time, the processing unit 1410 can download the application's initial launch resources through the resource acceleration service and the application's resource acceleration process. These initial launch resources can support the application's initial launch. Optionally, the first idle time may also include a second non-running period after the application's first launch. During this second non-running period, the processing unit 1410 can download the application's non-initial launch resources through the resource acceleration service and the application's resource acceleration process. Optionally, the second idle time may include the period after the application is installed and before its first launch.
[0431] For example, the first idle time and the second idle time are the non-running periods after the application is first launched. For instance, the first idle time includes one or more non-running periods after the application is first launched, and the second idle time includes one or more non-running periods after the application is first launched.
[0432] In some examples, the processing unit 1410 is also configured to support the electronic device in launching an updated application based on the updated application resources when it receives an operation to launch an application.
[0433] In some examples, the processing unit 1410 is also used to support electronic devices in calling the communication unit 1420 to obtain idle application resource download strategies through resource acceleration services and application resource acceleration processes, and to determine application idle time based on application resource download strategies.
[0434] In some examples, processing unit 1410 is also configured to support the electronic device in continuing resource downloads in the background via resource acceleration services and the application's resource acceleration process, or in the foreground via an application downloader, when it receives an operation to launch an application. For example, processing unit 1410 can determine, based on the acquired application resource download continuation strategy, whether to continue resource downloads in the background via resource acceleration services and the application's resource acceleration process, or in the foreground via an application downloader.
[0435] In some examples, the processing unit 1410 is also configured to support the electronic device in determining that an application meets the permission requirements for downloading application resources through the resource acceleration service and the application's resource acceleration process based on one or more of the following: the automatic update switch is in the on state, the application is in the list of applications that support automatic updates, the application's priority meets preset conditions, and when it is determined that the application meets the permission requirements for downloading application resources through the resource acceleration service and the application's resource acceleration process, the processing unit 1410 initiates the application's resource acceleration process.
[0436] The communication unit 1420 is used to support communication between the electronic device and other devices, such as downloading application resources, obtaining idle application resource download strategies, and / or other information related to the implementation of this application.
[0437] Storage unit 1430 is used to support electronic devices in storing data, such as storing application resources in a temporary directory, storing application resources in a fixed directory, and / or other data related to the implementation of this application.
[0438] The interaction unit 1440 is used to support the interaction between the electronic device and the user, such as receiving the user's operation to launch an application, displaying an interface to the user, and / or other operations or interfaces related to the implementation of this application.
[0439] It should also be understood that various modules in electronic devices, etc., can be implemented in software and / or hardware, without specific limitations. In other words, electronic devices, etc., are presented in the form of functional modules. Here, "module" can refer to application-specific integrated circuits (ASICs), circuits, processors and memories executing one or more software or firmware programs, integrated logic circuits, and / or other devices that can provide the above-mentioned functions. This application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to implement the resource download method described in the above embodiments of this application. In an optional manner, when data transmission is implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are implemented. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disk (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0440] The steps of the methods or algorithms described in the embodiments of this application can be implemented in hardware or by a processor or computer executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, compact disc read-only memory (CD-ROM), or any other form of storage medium well known in the art. For example, the software instructions can be computer program instructions, which can be stored in a computer-readable storage medium. One exemplary embodiment involves a storage medium coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the ASIC can reside in an electronic device. Of course, processors and storage media can also exist as discrete components.
[0441] The steps of the methods or algorithms described in the embodiments of this application can be implemented in hardware or by a chip system. For example, a chip system includes processing circuitry and a storage medium storing computer program instructions; when the computer program instructions are executed by a processor, they implement the resource download method described in the above embodiments of this application. The chip system can be composed of chips or can include chips and other discrete devices.
[0442] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
Claims
1. A resource download method, applied to an electronic device, the electronic device including a resource acceleration service, characterized in that, The method includes: If the first condition is met, the resource pre-download function of the resource acceleration service is enabled. The resource acceleration service obtains resource download task information from the first application; The resource acceleration service downloads resources based on the resource download task information; The resource acceleration service notifies the first application of the resource download status.
2. The method according to claim 1, characterized in that, The first condition being met includes: when the application resources of the first application are updated and the first application is idle.
3. The method according to claim 1 or 2, characterized in that, The method further includes: The resource acceleration service obtains the resource download permission of the first application from the application center. The permission indicates that the first application meets the permission requirements for downloading application resources through the resource acceleration service.
4. The method according to any one of claims 1-3, characterized in that, The resource acceleration service obtains resource download task information from the first application, including: When the main process of the first application has not started, in response to the fulfillment of the first condition, the resource package pre-download service starts the resource acceleration process of the first application; The resource package pre-download service obtains the resource download task information from the resource acceleration process.
5. The method according to any one of claims 1-4, characterized in that, The resource acceleration service downloads resources based on the resource download task information, including: The resource acceleration service downloads the resource to the temporary directory of the first application according to the resource download task information; The resource acceleration service moves the resource from the temporary directory of the first application to the fixed directory of the first application.
6. The method according to any one of claims 1-5, characterized in that, The resource acceleration service downloads resources based on the resource download task information, including: The resource acceleration service downloads the resource in the background of the electronic device according to the resource download task information.
7. The method according to claim 6, characterized in that, The method further includes: The resource acceleration service displays the background download progress of the resource.
8. The method according to claim 6 or 7, characterized in that, The method further includes: In response to the startup of the main process of the first application, the resource package pre-download service switches the task of downloading the resource from the background of the electronic device to the foreground of the electronic device.
9. The method according to claim 8, characterized in that, After the task of downloading the resource is switched from the background of the electronic device to the foreground of the electronic device, the method further includes: The resource package pre-download service continues the download of the resources on the foreground of the electronic device.
10. The method according to claim 9, characterized in that, After the task of downloading the resource is switched from the background of the electronic device to the foreground of the electronic device, the method further includes: The resource package pre-download service displays the foreground download progress of the resource, and the initial state of the foreground download progress is the final state of the background download progress.
11. The method according to claim 10, characterized in that, After the resource package pre-download service switches the task of downloading the resource from the background of the electronic device to the foreground of the electronic device, the resource package pre-download service stops displaying the background download progress.
12. The method according to claim 6 or 7, characterized in that, The method further includes: In response to the startup of the main process of the first application, a prompt is made to the user; In response to the user's first action to the prompt, the resource continues to be downloaded in the background of the electronic device during the startup of the main process of the first application.
13. The method according to any one of claims 1-12, characterized in that, The resource package pre-download service downloads the first application's initial launch application resources during the first non-running period after the first application is installed and before its first launch. These initial launch application resources enable the first application to start upon its first launch.
14. The method according to claim 13, characterized in that, The resource package pre-download service downloads non-initial application resources of the first application during a second non-running time period after the first application is installed.
15. The method according to claim 13 or 14, characterized in that, The second non-running time period is before or after the first application is launched.
16. The method according to any one of claims 1-15, characterized in that, The first application includes game applications.
17. A resource download method, applied to an electronic device, characterized in that, The method includes: Check if the application resources of the first application have been updated; When the application resources are updated and the first application is idle, the updated application resources are downloaded in the background through the resource package pre-download service, and the first application is updated.
18. The method according to claim 17, characterized in that, The resource package pre-download service includes a resource acceleration service and a resource acceleration process for the application.
19. The method according to claim 17 or 18, characterized in that, The method further includes: Obtain the idle time application resource download strategy, wherein the idle time application resource download strategy is customized by the developer of the first application; The first application's idle time is determined according to the idle time application resource download strategy.
20. The method according to claim 18 or 19, characterized in that, The method further includes the following steps during the process of downloading the updated application resources in the background via the resource package pre-download service: Upon receiving the operation to launch the first application, the resource download continues in the background through the resource acceleration service and the resource acceleration process of the first application, or the resource download continues in the foreground through the application downloader.
21. The method according to claim 20, characterized in that, Upon receiving an operation to launch the first application, the method further includes: Obtain application resource download continuation strategy; According to the application resource download continuation strategy, it is determined whether to continue downloading resources in the background through the resource acceleration service and the resource acceleration process of the first application, or to continue downloading resources in the foreground through the application downloader.
22. The method according to claim 21, characterized in that, The step of determining, according to the application resource download continuation strategy, to continue resource downloading in the background through the resource acceleration service and the resource acceleration process of the first application, or to continue resource downloading in the foreground through the application downloader, includes: Get the background download progress of the resource; When the background download progress is greater than the threshold, the resource download continues in the background through the resource acceleration service and the resource acceleration process of the first application. When the background download progress is less than or equal to the threshold, the resource download continues in the foreground through the application downloader.
23. The method according to any one of claims 17-19, characterized in that, The method further includes: Upon receiving an operation to launch the first application, the updated first application is launched based on the updated application resources.
24. The method according to any one of claims 17-23, characterized in that, The step of downloading the updated application resources and updating the first application during application idle time includes: Download the updated application resources during the first idle time of the first application; The first application is updated during its second idle time.
25. The method according to claim 24, characterized in that, The first idle time and the second idle time may be the same time period or different time periods.
26. The method according to claim 24 or 25, characterized in that, The first idle time includes the first non-running period after the application is installed and before it is first launched.
27. The method according to claim 26, characterized in that, The electronic device downloads the initial application resources of the application during the first idle time, and the initial application resources can support the first application to start during the first time.
28. The method according to claim 26 or 27, characterized in that, The first idle time also includes a second non-running time period after the application is first launched.
29. The method according to any one of claims 24-28, characterized in that, The second idle time includes the period from when the application is installed to when it is first launched.
30. The method according to claim 24 or 25, characterized in that, The first idle time and the second idle time are the non-running time periods after the application is first launched.
31. The method according to any one of claims 17-30, characterized in that, The update of the first application includes: Perform one or more of the following operations on the downloaded application resources: decompression, format conversion, version verification, or secondary integration.
32. The method according to any one of claims 17-31, characterized in that, Before updating the first application by downloading the updated application resources in the background via the resource package pre-download service, the method further includes: The first application is determined to meet the permission requirements for downloading application resources through the resource package pre-download service based on one or more of the following: the automatic update switch is turned on, the first application is in the list of applications that support automatic updates, and the priority of the first application meets preset conditions.
33. The method according to any one of claims 18-32, characterized in that, The updated application resources include at least one file, and the downloading of the updated application resources in the background via the resource package pre-download service includes: Through the resource acceleration service and the application's resource acceleration process, at least one file is downloaded to the temporary directory of the first application in the background, and the downloaded file is moved from the temporary directory to the fixed directory of the first application.
34. The method according to any one of claims 17-33, characterized in that, The first application includes game applications.
35. An electronic device, characterized in that, The electronic device includes: Memory is used to store computer program instructions; A communication interface used for communicating with other devices; A processor for executing the computer program instructions to support the electronic device in implementing the method as described in any one of claims 1-16 or 17-34.
36. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processing circuit, implement the method as described in any one of claims 1-16 or 17-34.
37. A computer program product containing instructions, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-16 or 17-34.