WO2021115112A1 - 安装包的下载方法、分发方法、终端设备、服务器及*** - Google Patents
安装包的下载方法、分发方法、终端设备、服务器及*** Download PDFInfo
- Publication number
- WO2021115112A1 WO2021115112A1 PCT/CN2020/131058 CN2020131058W WO2021115112A1 WO 2021115112 A1 WO2021115112 A1 WO 2021115112A1 CN 2020131058 W CN2020131058 W CN 2020131058W WO 2021115112 A1 WO2021115112 A1 WO 2021115112A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- installation package
- download request
- terminal device
- complete
- complete installation
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/64—Retargetable
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
Definitions
- This application relates to the field of communication technology, and in particular to a downloading method, a distribution method, a terminal device, a server, and a system of an installation package.
- the library files and resource files of multiple platforms will be packaged in an installation package.
- the installation package the entire All the installation packages are downloaded, which will occupy the user's download time, installation time, and storage space.
- the installation package is divided according to functions.
- An application installation package can contain multiple feature subpackages, and some feature subpackages can be installed without downloading during application installation. Users can follow-up Choose to download and install according to your needs.
- this application provides an installation package download method, distribution method, terminal device, server, system, and computer-readable storage medium, which can prevent users from downloading multiple times, and can satisfy users’ concerns based on the operating status of the user’s equipment. Download time and storage requirements.
- this application provides a method for downloading an installation package.
- the method can be executed by a terminal device.
- the method includes: the terminal device sends a download request for downloading the installation package of the target application, the download request includes dynamic information, wherein the Dynamic information is state information that is read from the terminal device when the download request is generated and reflects the current operating capability of the terminal device.
- the status information of the operating capability is dynamic, and may dynamically change over time, and may include the status of the storage module of the terminal device, the status of the communication module, and the status of the processor.
- the terminal device receives the installation package determined based on the download request, wherein the target application has a complete installation package, and the installation package determined based on the download request is a subset of the complete installation package, that is to say ,
- the size of the installation package determined based on the download request may be equal to the size of the complete installation package or less than the size of the complete installation package.
- the installation package when downloading the installation package, the installation package is obtained based on the dynamic information and static information of the terminal device, which can satisfy the user's needs for the installation package to the greatest extent through one download, and improve the user's installation experience and follow-up Use a coherent experience.
- the download request further includes static information reflecting the static device information of the terminal device.
- the static information may include: device type, system version, device CPU platform One or more of, resolution, and codec capabilities.
- the type of equipment that includes the terminal equipment such as a mobile phone or a desktop computer, etc.
- select a complete installation package suitable for the equipment according to the type of equipment for example, whether the CPU platform is 32-bit or 64-bit Yes, according to the processing capacity of the CPU platform, select a complete installation package suitable for the device.
- the dynamic information includes the network status of the terminal device, that is, the download request includes the network status of the terminal device when the download request is sent, such as network speed , Network type (for example, 4G, wifi, 5G), etc., an installation package obtained based on the network status information of the terminal device, where the installation package can be obtained by cutting the complete installation package, or it can be uncut
- the complete installation package to meet the user’s requirements for download time and/or data consumption can be divided into multiple functional blocks according to the different functions implemented by each.
- the complete installation package needs to be cut, that is, each functional block in the complete installation package is cut, and the remaining set of functional blocks in the complete installation package is retained.
- the installation package corresponding to the network status is described, and the installation package can meet the user's requirements for download time or/and traffic consumption.
- the dynamic information includes the storage state of the terminal device, that is, the size of the current storage space of the terminal device. That is to say, the download request includes the storage state of the terminal device when the download request is sent, and the terminal device obtains an installation package based on its storage state, where the installation package can be a complete installation package, or it can be tailored to the complete installation package. Cut the obtained installation package so that the installation package meets the storage space of the user's terminal device.
- the complete installation package can be divided into multiple functional blocks according to the different functions implemented by each.
- determining the installation package if the size of the installation package determined based on the storage state is smaller than the size of the complete installation package, it is required Cut the complete installation package, that is, cut each functional block in the complete installation package, and retain the remaining set of functional blocks in the complete installation package, where the set of functional blocks is the same as the set of functional blocks in the complete installation package.
- the installation package corresponding to the download request can satisfy the storage space of the user's terminal device.
- the dynamic information includes a network state and a storage state of the terminal device.
- the network status such as network speed, network type (for example, 4G, wifi, 5G), etc., storage status, storage space size, and installation package obtained based on the network status and storage status of the terminal device.
- the installation package can be obtained by cutting the complete installation package, or it can be a complete installation package that has not been trimmed, so that the installation package can meet the user's requirements for download time and/or traffic consumption, and Meet the storage capacity of the user's terminal equipment, and maximize the user experience.
- the complete installation package can be divided into multiple functional blocks according to the different functions implemented by each.
- the complete installation package if the size of the installation package determined based on the network state and storage state of the terminal device is smaller than the complete installation package Size, the complete installation package needs to be cut.
- the complete installation package can be cut for the first time based on the network status of the dynamic information.
- the remaining functional blocks in the complete installation package are cut a second time, and the set of remaining functional blocks in the complete installation package after two cuts is retained.
- the collection of blocks is the installation package required by the user.
- the installation package can satisfy the user's download time and/or traffic consumption, and at the same time satisfy the storage space of the terminal device.
- the complete installation package may be cut for the first time based on the storage status of the dynamic information, and after the complete installation package is cut for the first time, based on the network status in the dynamic information, the The remaining functional blocks in the complete installation package are cut for the second time, and the set of remaining functional blocks in the complete installation package after two cuts is retained.
- the set of functional blocks is the installation package required by the user.
- the installation package can meet the user's requirements for download time and/or traffic consumption on the basis of meeting the storage space of the terminal device.
- the installation package obtained by retaining the functional block corresponding to the download request is obtained in the following manner :
- the multiple functional blocks in the complete installation package have a predetermined priority arrangement, wherein the predetermined priority ranking can be sorted by the user's use priority before cutting, and each functional block in the installation package can achieve its Function-based priority downloading.
- the function blocks with low priority in the complete installation package will be cut off until the size of the reserved function blocks matches the size of the installation package, that is, the total size of the reserved function blocks is the largest It is close to and does not exceed the size of the installation package, wherein the size of the installation package is determined based on the download request.
- the installation package obtained in this way can enable the installation package to include functional blocks with a high usage rate, avoid the second download of the functional blocks with a high usage rate, and improve the continuity experience of user operations.
- the installation package obtained by retaining the functional block corresponding to the download request includes:
- the installation package is obtained from the priority table filtering rules of the function block, and the priority table of the function block describes the priority of the function block being called when the target application is used, wherein the calling priority may reflect the target The business logic of the application, so that the installation package contains as much as possible the functional blocks related to the business logic.
- the priority table screening rule of the function block includes: prioritizing the function block in the complete installation package according to the called priority when the target application is used.
- the levels are sorted layer by layer.
- the function blocks with the same calling sequence are in the same layer.
- the functions of the function blocks in the same calling sequence are in a parallel relationship, that is, the functions between the function blocks do not affect each other;
- the layer where the block is located is the main sorting basis, the size of the function block is the secondary sorting basis, and the function blocks are sorted according to the calling order of the layers from first to last, and the size of the function blocks from small to large.
- the priority is to select the function block of the matching size as the installation package, that is, the function blocks are accumulated in the order of the sorting of the function blocks, until the sum of the sizes of the function blocks added together is the closest and does not exceed the size of the installation package, wherein, the size of the installation package is determined based on the download request; the accumulated function blocks are added to the installation package as reserved function blocks, and the function blocks that have not been accumulated are cut out.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the consistent experience of user operations.
- the priority table screening rule of the function block includes: the function block in the complete installation package is divided into multiple function blocks according to different tasks to be implemented. Set, where each set of function blocks includes one or more function blocks that are called when realizing a predetermined task and arranged in a predetermined calling order, and the matching size is selected according to the calling order when realizing the predetermined task
- the functional block is used as an installation package, that is, according to the size of the installation package based on the requirements determined by the download request, the set of functional blocks with the closest size and not exceeding the size of the installation package is selected from the set of various functional blocks, Add to the installation package.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the consistent experience of user operations.
- the method further includes: extracting files from the received installation package, writing them into the installation directory of the terminal, and completing the installation of the application by calling the The decompression program in the terminal device decompresses the files in the installation package from the installation package, and writes the decompressed files in the installation directory of the terminal device, where the installation directory is preset , Or, selected by the user through the interface of the terminal device.
- the installation package can meet the user's needs for the target application at one time as much as possible, and improve the consistent experience of user operations.
- the present application provides a method for distributing an installation package.
- the method can be executed by a server.
- the method includes: receiving a download request for downloading an installation package of a target application.
- Dynamic information is state information that is read from the terminal device when the download request is generated and reflects the current operating capability of the terminal device.
- the status information of the operating capability is dynamic, and may dynamically change over time, and may include the status of the storage module of the terminal device, the status of the communication module, and the status of the processor.
- the target application has a complete installation package
- the installation package determined based on the download request is a subset of the complete installation package, that is, based on the
- the size of the installation package determined by the download request can be equal to the size of the complete installation package or less than the size of the complete package.
- the installation package is obtained based on the dynamic information of the terminal device, and the user can obtain the installation package through a one-time download.
- the installation package can meet the user's needs for the installation package to the greatest extent, and improve the user's installation experience and follow-up Use a coherent experience.
- the download request further includes static information
- the static information reflects static device information of the terminal device.
- the static information may include: device type, system One or more of version, device CPU platform, resolution, and codec capability.
- the dynamic information may include the network status of the terminal device, that is, the download request includes the network status of the terminal device when the download request is sent, for example, the network status of the terminal device when the download request is sent.
- Speed for example, 4G, wifi, 5G
- an installation package obtained based on the network status information of the terminal device where the installation package can be obtained by cutting the complete installation package, or it can be uncut. Cut the complete installation package so that the installation package meets the user’s requirements for download time and/or traffic consumption.
- the complete installation package can be divided into multiple functional blocks according to the different functions implemented by each.
- downloading the installation package if the size of the installation package determined based on the network status is smaller than the size of the complete installation package, you need to check
- the complete installation package is cut, that is, each functional block in the complete installation package is cut, and the remaining set of functional blocks in the complete installation package is retained, where the set of functional blocks is related to the network
- the installation package corresponding to the status the installation package can meet the user's requirements for download time or/and traffic consumption.
- the dynamic information includes the storage state of the terminal device, that is, the current storage space size of the terminal device.
- the download request includes the storage state of the terminal device when the download request is sent, and the server obtains the installation package based on the storage state of the terminal device. The installation package obtained by the package cutting, so that the installation package meets the storage space of the user's terminal device.
- the complete installation package can be divided into multiple functional blocks according to the different functions implemented by each.
- the server When determining the installation package, if the size of the installation package determined based on the storage state is smaller than the size of the complete installation package, the server The complete installation package needs to be cut, that is, each functional block in the complete installation package is cut, and the remaining set of functional blocks in the complete installation package is retained.
- the installation package corresponding to the download request can satisfy the storage space of the user's terminal device.
- the dynamic information includes a network state and a storage state of the terminal device.
- the network status such as network speed, network type (for example, 4G, wifi, 5G), etc., storage status, storage space size, and installation packages obtained based on the network status and storage status of the terminal device.
- the installation package may be obtained by cutting the complete installation package, or it may be a complete installation package that has not been trimmed, so that the installation package can meet the user's requirements for download time and/or traffic consumption, and It can meet the storage capacity of the user's terminal device and maximize the user experience.
- the complete installation package can be divided into multiple functional blocks according to the different functions implemented by each.
- the complete installation The package is cut for the first time.
- the remaining functional blocks in the complete installation package are cut a second time, and retained
- the set of remaining functional blocks in the complete installation package after two cuts, the set of functional blocks is the installation package required by the user.
- the installation package can satisfy the user's download time and/or traffic consumption, and at the same time satisfy the storage space of the terminal device.
- the complete installation package may be cut for the first time based on the storage state of the dynamic information of the terminal device, and after the complete installation package is cut for the first time, based on the network in the dynamic information State, the remaining function blocks in the complete installation package are cut a second time, and the set of remaining function blocks in the complete installation package after two cuts is retained, and the set of function blocks is what the user needs Installation package.
- the installation package can meet the user's requirements for download time and/or traffic consumption on the basis of meeting the storage space of the terminal device.
- the attribute table attached to the complete installation package is parsed, and the attributes of each functional block recorded in the attribute table of the complete installation package are used to determine whether the installation package is based on the respective The realized function is different from the various functional blocks that are divided into.
- the installation package obtained by retaining the functional block corresponding to the download request is obtained in the following manner :
- the multiple functional blocks in the complete installation package have a predetermined priority arrangement, wherein the predetermined priority ranking can be sorted by the user's use priority before cutting, and each functional block in the installation package can achieve its Function-based priority downloading.
- the function blocks with low priority in the complete installation package will be cut off until the size of the reserved function blocks matches the size of the installation package, that is, the total size of the reserved function blocks is the largest It is close to and does not exceed the size of the installation package, wherein the size of the installation package is determined based on the download request.
- the installation package can include functional blocks with a high usage rate, avoid the second download of the functional blocks with a high usage rate, and improve the consistent experience of user operations.
- the step of retaining the functional block corresponding to the download request includes: according to the functional block
- the installation package is obtained from the priority table screening rules of the function block, and the priority table of the function block describes the priority of the function block when the target application is used.
- the calling priority can reflect the business of the target application. Logic, so that the installation package contains functional blocks related to business logic as much as possible.
- the priority table screening rule of the function block includes: prioritizing the function block in the complete installation package according to the called priority when the target application is used.
- the levels are sorted layer by layer.
- the function blocks with the same calling sequence are in the same layer.
- the functions of the function blocks in the same calling sequence are in a parallel relationship, that is, the functions between the function blocks do not affect each other;
- the layer where the block is located is the main sorting basis, the size of the function block is the secondary sorting basis, and the function blocks are sorted according to the calling order of the layers from first to last, and the size of the function blocks from small to large.
- the priority is to select the function block of the matching size as the installation package, that is, the function block is accumulated in the order of the sorting of the function block, until the sum of the size of the function block of each layer is the closest and does not exceed the installation
- the size of the package wherein the size of the installation package is determined based on the download request; the accumulated functional blocks are added to the installation package as reserved functional blocks, and the functional blocks that have not been accumulated are trimmed Cut off.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the consistent experience of user operations.
- the priority table screening rule of the function block includes: the function block in the complete installation package is divided into multiple function blocks according to different tasks implemented Set, where each set of function blocks includes one or more function blocks that are called when realizing a predetermined task and arranged in a predetermined calling order, and the matching size is selected according to the calling order when realizing the predetermined task
- the functional block is used as an installation package, that is, according to the size of the installation package based on the requirements determined by the download request, the set of functional blocks with the closest size and not exceeding the size of the installation package is selected from the set of various functional blocks, Add to the installation package.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the consistent experience of user operations.
- the present application provides a method for downloading an installation package.
- the method is applied to a terminal device and an application server.
- the terminal device implements the method of the above-mentioned embodiment of the first aspect
- the application server implements the above-mentioned first aspect. Two aspects of the method described in the embodiment.
- this application discloses a terminal device, which includes a sending module and a receiving module.
- the sending module is configured to send a download request for downloading the installation package of the target application, the download request includes dynamic information, wherein the dynamic information is read from the terminal device when the download request is generated, State information reflecting the current operating capability of the terminal device.
- the status information of the operating capability is dynamic, and may dynamically change over time, and may include the status of the storage module of the terminal device, the status of the communication module, and the status of the processor.
- the receiving module is configured to receive an installation package determined based on the download request, wherein the target application has a complete installation package, and the installation package determined based on the download request is a subset of the complete installation package of the target application. That is to say, the size of the installation package determined based on the download request may be equal to or smaller than the size of the complete installation package.
- the installation package determined based on the download request is smaller than the complete installation package, it is required Cut the complete installation package to achieve an installation package that satisfies the download request.
- the installation package when downloading the installation package, the installation package is obtained based on the dynamic information of the terminal device, which can satisfy the user's demand for the installation package to the greatest extent through one download, and improve the user's installation experience and subsequent use continuity Experience.
- the static information is static device information reflecting the terminal device.
- the static information may include: device type, system version, device CPU platform, resolution, and editing. One or more of the decoding capabilities.
- the dynamic information includes the network status of the terminal device, that is, the download request includes the network status of the terminal device when the download request is sent, for example, the network speed , Network type (for example, 4G, wifi, 5G), etc., an installation package obtained based on the network status information of the terminal device, where the installation package can be obtained by cutting the complete installation package, or it can be uncut
- the complete installation package to meet the user’s requirements for download time and/or data consumption can be divided into multiple functional blocks according to the different functions implemented by each.
- the complete installation package needs to be cut, that is, each functional block in the complete installation package is cut, and the remaining set of functional blocks in the complete installation package is retained.
- the installation package corresponding to the network status is described, and the installation package can meet the user's requirements for download time or/and traffic consumption.
- the dynamic information includes the storage state of the terminal device, that is, the size of the current storage space of the terminal device. That is to say, the download request includes the storage state of the terminal device when the download request is sent, and the terminal device obtains an installation package based on its storage state, where the installation package can be a complete installation package, or it can be tailored to the complete installation package. Cut the obtained installation package so that the installation package meets the storage space of the user's terminal device.
- the complete installation package can be divided into multiple functional blocks according to the different functions implemented by each.
- determining the installation package if the size of the installation package determined based on the storage state is smaller than the size of the complete installation package, it is required Cut the complete installation package, that is, cut each functional block in the complete installation package, and retain the remaining set of functional blocks in the complete installation package, where the set of functional blocks is the same as the set of functional blocks in the complete installation package.
- the installation package corresponding to the download request can satisfy the storage space of the user's terminal device.
- the dynamic information includes a network state and a storage state of the terminal device.
- the network status such as network speed, network type (for example, 4G, wifi, 5G), etc., storage status, storage space size, and installation packages obtained based on the network status and storage status of the terminal device.
- the installation package can be obtained by cutting the complete installation package, or it can be a complete installation package that has not been trimmed, so that the installation package can meet the user's requirements for download time and/or traffic consumption, and Meet the storage capacity of the user's terminal equipment, and maximize the user experience.
- the complete installation package can be divided into multiple functional blocks according to the different functions implemented by each.
- the complete installation package if the size of the installation package determined based on the network state and storage state of the terminal device is smaller than the complete installation package Size, the complete installation package needs to be cut.
- the complete installation package can be cut for the first time based on the network status of the dynamic information.
- the remaining functional blocks in the complete installation package are cut a second time, and the set of remaining functional blocks in the complete installation package after two cuts is retained.
- the collection of blocks is the installation package required by the user.
- the installation package can satisfy the user's download time and/or traffic consumption, and at the same time satisfy the storage space of the terminal device.
- the complete installation package may be cut for the first time based on the storage status of the dynamic information, and after the complete installation package is cut for the first time, based on the network status in the dynamic information, the The remaining functional blocks in the complete installation package are cut for the second time, and the set of remaining functional blocks in the complete installation package after two cuts is retained.
- the set of functional blocks is the installation package required by the user.
- the installation package can meet the user's requirements for download time and/or traffic consumption on the basis of meeting the storage space of the terminal device.
- the attribute table attached to the complete installation package is parsed, and the attributes of each functional block recorded in the attribute table of the complete installation package are used to determine whether the installation package is based on the respective The realized function is different from the various functional blocks that are divided into.
- the installation package obtained by retaining the functional block corresponding to the download request is obtained in the following manner :
- the multiple functional blocks in the complete installation package have a predetermined priority arrangement, wherein the predetermined priority ranking can be sorted by the user's use priority before cutting, and each functional block in the installation package can achieve its Function-based priority downloading.
- the function blocks with low priority in the complete installation package will be cut off until the size of the reserved function blocks matches the size of the installation package, that is, the total size of the reserved function blocks is the largest It is close to and does not exceed the size of the installation package, wherein the size of the installation package is determined based on the download request.
- the installation package obtained in this way can enable the installation package to include functional blocks with a high usage rate, avoid the second download of the functional blocks with a high usage rate, and improve the continuity experience of user operations.
- the installation package obtained by retaining the functional block corresponding to the download request includes:
- the installation package is obtained from the priority table filtering rules of the function block, and the priority table of the function block describes the priority of the function block being called when the target application is used, wherein the calling priority may reflect the target The business logic of the application, so that the installation package contains as much as possible the functional blocks related to the business logic.
- the priority table screening rule of the function block includes: prioritizing the function block in the complete installation package according to the called priority when the target application is used.
- the levels are sorted layer by layer.
- the function blocks with the same calling sequence are in the same layer.
- the functions of the function blocks in the same calling sequence are in a parallel relationship, that is, the functions between the function blocks do not affect each other;
- the layer where the block is located is the main sorting basis, the size of the function block is the secondary sorting basis, and the function blocks are sorted according to the calling order of the layers from first to last, and the size of the function blocks from small to large.
- the priority is to select the function block of the matching size as the installation package, that is, the function blocks are accumulated in the order of the sorting of the function blocks until the sum of the sum of the function blocks is the closest and does not exceed the size of the installation package, wherein, the size of the installation package is determined based on the download request; the accumulated function blocks are added to the installation package as reserved function blocks, and the function blocks that have not been accumulated are cut out.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the consistent experience of user operations.
- the priority table screening rule of the function block includes: the function block in the complete installation package is divided into multiple function blocks according to different tasks implemented Set, where each set of function blocks includes one or more function blocks that are called when realizing a predetermined task and arranged in a predetermined calling order, and the matching size is selected according to the calling order when realizing the predetermined task
- the functional block is used as an installation package, that is, according to the size of the installation package based on the requirements determined by the download request, the set of functional blocks with the closest size and not exceeding the size of the installation package is selected from the set of various functional blocks, Add to the installation package.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the consistent experience of user operations.
- the present application provides a server for downloading installation packages of applications, including a request receiving module and an application providing module.
- the request receiving module is configured to receive a download request for downloading an installation package of an installation package of a download target application, the download request includes dynamic information, wherein the dynamic information is obtained from the terminal device when the download request is generated.
- the status information that reflects the current operating capability of the terminal device read in.
- the status information of the operating capability is dynamic, and may dynamically change over time, and may include the status of the storage module of the terminal device, the status of the communication module, and the status of the processor.
- the application providing module is configured to provide an installation package determined based on the download request, wherein the target application has a complete installation package, and the installation package determined based on the download request is a subset of the complete installation package. That is to say, the size of the installation package determined based on the download request may be equal to or smaller than the size of the complete installation package.
- the installation package determined based on the download request is smaller than the complete installation package, it is required Cut the complete installation package to achieve an installation package that satisfies the download request.
- the installation package is obtained based on the dynamic information of the terminal device, and the user can obtain the installation package through a one-time download.
- the installation package can meet the user's needs for the installation package to the greatest extent, and improve the user's installation experience and follow-up Use a coherent experience.
- the download request includes static information
- the static information is static device information reflecting the terminal device.
- the static information may include: device type, system version, One or more of the device's CPU platform, resolution, and codec capability.
- the dynamic information may include the network status of the terminal device, that is, the download request includes the network status of the terminal device when the download request is sent, for example, the network status of the terminal device when the download request is sent.
- Speed, network type for example, 4G, wifi, 5G
- the complete installation package can be divided into multiple functional blocks according to the different functions implemented by each.
- the complete installation package When downloading the installation package, if based on the network status When the size of the determined installation package is smaller than the size of the complete installation package, the complete installation package needs to be cut, that is, each functional block in the complete installation package is cut, and the remaining functions in the complete installation package are retained
- the dynamic information includes the storage state of the terminal device, that is, the current storage space size of the terminal device.
- the complete installation package can be divided into multiple functional blocks according to the different functions implemented by each.
- the server When determining the installation package, if the size of the installation package determined based on the storage state is smaller than the size of the complete installation package, the server The complete installation package needs to be cut, that is, each functional block in the complete installation package is cut, and the remaining set of functional blocks in the complete installation package is retained.
- the installation package corresponding to the download request can satisfy the storage space of the user's terminal device.
- the dynamic information includes a network state and a storage state of the terminal device.
- the network status such as network speed, network type (for example, 4G, wifi, 5G), etc., storage status, storage space size
- the complete installation package can be divided into multiple functions according to the different functions implemented by each Block, when determining the installation package, if the complete installation package is cut for the first time based on the network status of the dynamic information of the terminal device, after the complete installation package is cut for the first time, Based on the storage status in the dynamic information, the remaining functional blocks in the complete installation package are cut a second time, and the set of remaining functional blocks in the complete installation package after two cuts is retained.
- This function The collection of blocks is the installation package required by the user.
- the installation package can satisfy the user's download time and/or traffic consumption, and at the same time satisfy the storage space of the terminal device.
- the complete installation package may be cut for the first time based on the storage state of the dynamic information of the terminal device, and after the complete installation package is cut for the first time, based on the network in the dynamic information State, the remaining function blocks in the complete installation package are cut a second time, and the set of remaining function blocks in the complete installation package after two cuts is retained, and the set of function blocks is what the user needs Installation package.
- the installation package can meet the user's requirements for download time and/or traffic consumption on the basis of meeting the storage space of the terminal device.
- the installation package obtained by retaining the functional block corresponding to the download request is obtained in the following manner :
- the multiple functional blocks in the complete installation package have a predetermined priority arrangement, wherein the predetermined priority ranking can be sorted by the user's use priority before cutting, and each functional block in the installation package can achieve its Function-based priority downloading.
- the function blocks with low priority in the complete installation package will be cut off until the size of the reserved function blocks matches the size of the installation package, that is, the total size of the reserved function blocks is the largest It is close to and does not exceed the size of the installation package, wherein the size of the installation package is determined based on the download request.
- the installation package can include functional blocks with a high usage rate, avoid the second download of the functional blocks with a high usage rate, and improve the consistent experience of user operations.
- the step of retaining the functional block corresponding to the download request includes: according to the functional block
- the installation package is obtained from the priority table screening rules of the function block, and the priority table of the function block describes the priority of the function block when the target application is used.
- the calling priority can reflect the business of the target application. Logic, so that the installation package contains functional blocks related to business logic as much as possible.
- the priority table screening rule of the function block includes: prioritizing the function block in the complete installation package according to the called priority when the target application is used.
- the levels are sorted layer by layer.
- the function blocks with the same calling sequence are in the same layer.
- the functions of the function blocks in the same calling sequence are in a parallel relationship, that is, the functions between the function blocks do not affect each other;
- the layer where the block is located is the main sorting basis, the size of the function block is the secondary sorting basis, and the function blocks are sorted according to the calling order of the layers from first to last, and the size of the function blocks from small to large.
- the priority is to select the function block of the matching size as the installation package, that is, the function block is accumulated in the order of the sort of the function block, until the sum of the size of the function block of each layer is the closest and does not exceed the installation
- the size of the package wherein the size of the installation package is determined based on the download request; the accumulated functional blocks are added to the installation package as reserved functional blocks, and the functional blocks that have not been accumulated are trimmed Cut off.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the consistent experience of user operations.
- the priority table screening rule of the function block includes: the function block in the complete installation package is divided into multiple function blocks according to different tasks to be implemented. Set, where each set of function blocks includes one or more function blocks that are called when realizing a predetermined task and arranged in a predetermined calling order, and the matching size is selected according to the calling order when realizing the predetermined task
- the functional block is used as an installation package, that is, according to the size of the installation package based on the requirements determined by the download request, the set of functional blocks with the closest size and not exceeding the size of the installation package is selected from the set of various functional blocks, Add to the installation package.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the consistent experience of user operations.
- the present application provides an installation package distribution system, including: the terminal device of the above-mentioned fourth aspect; and the server of the above-mentioned fifth aspect that provides application installation package download.
- the present application provides an electronic device that includes a processor and a memory, the memory stores instructions, and the processor is configured to read the instructions stored in the memory to execute the first embodiment above. Aspect or the method of the second aspect.
- the present application provides a computer-readable storage medium with instructions stored on the computer-readable storage medium.
- the instructions When executed on a computer, the computer executes the first aspect or the second aspect of the above-mentioned embodiment. The method described.
- Fig. 1 is a scene diagram of the distribution of an installation package provided according to an embodiment of the present application
- Fig. 2 is a schematic structural diagram of an electronic device provided according to an embodiment of the present application.
- Fig. 3 is a software structure block diagram of an electronic device provided according to an embodiment of the present application.
- Figure 4 is a schematic structural diagram of a complete installation package according to an embodiment of the present application.
- Fig. 5 is a flowchart of a method for downloading an installation package according to an embodiment of the present application
- Fig. 6 is a flowchart of a method for obtaining an installation package according to an embodiment of the present application
- FIG. 7 is a flowchart of a priority table screening rule according to an embodiment of the present application.
- Fig. 8 is a structural diagram of a priority table according to an embodiment of the present application.
- Fig. 9 is a flowchart of a priority table screening rule according to another embodiment of the present application.
- Fig. 10 is a flowchart of a method for distributing an installation package according to an embodiment of the present application.
- FIG. 11 is a schematic structural diagram of a terminal device according to some embodiments of the present application.
- Figure 12 is a schematic structural diagram of a server according to some embodiments of the present application.
- FIG. 13 is a schematic structural diagram of an installation package distribution system of an installation package according to some embodiments of the present application.
- Figure 14 is a block diagram of a device according to some embodiments of the present application.
- FIG. 15 is a block diagram of a system on chip (SoC) according to some embodiments of the present application.
- SoC system on chip
- module can refer to or include an application specific integrated circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) that executes one or more software or firmware programs. ) And/or memory, combinational logic circuit, and/or other appropriate hardware components that provide the described functions, or may be part of these hardware components.
- ASIC application specific integrated circuit
- processor shared, dedicated, or group
- memory combinational logic circuit, and/or other appropriate hardware components that provide the described functions, or may be part of these hardware components.
- the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and/or any combination thereof.
- the processor may be a single-core processor, a multi-core processor, etc., and/or any combination thereof.
- a scene diagram of the distribution of an installation package is disclosed.
- Fig. 1 is a scene diagram of installation package distribution according to an embodiment of the present application.
- this scenario includes a developer computer 103, a server 101, and a terminal device 102.
- the terminal device is one of electronic devices.
- the terminal device 102 can be, but not limited to, a mobile phone, a watch, or a smart phone.
- server 101 can be a server that provides downloads of application installation packages, such as application market servers. Developers split the complete installation packages according to their respective functions.
- the terminal device 102 initiates a download request of the installation package to the server 101, and the server 101 receives According to the download request, an installation package corresponding to the download request is obtained based on the download request, and the terminal device 102 receives the installation package.
- the installation package may be a complete installation package containing all the functional blocks that has not been cut by the server 101 to adapt to the download request, or the server 101 may correspondingly tailor the functional blocks in the complete installation package based on the download request of the terminal device.
- the set of functional blocks adapted to the download request obtained after the cut can also be based on a preset situation, for example, various installation packages with different sizes are provided for different network speeds, network types, and storage capabilities. For example, it can be divided into a quick download version, a simplified version installation package, a full version installation package, and so on. It is understandable that the options for such different installation packages can be "stacked". On the basis of realizing the most basic functions, according to the package basis, by stacking different types of functional films, a variety of different sizes are provided. Options for the installation package.
- FIG. 2 shows a schematic structural diagram of the electronic device 100 of the present application.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2.
- Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
- SIM Subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
- the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange different components.
- the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
- instructions are stored in the internal memory 121, and the processor 110 reads the instructions stored in the internal memory 121 to execute the installation package download method in the present application.
- the processor 110 reads the instructions stored in the internal memory 121 to execute the installation package download method in the present application.
- the installation package download method please refer to the following embodiments How to download the installation package.
- the processor 110 may include one or more processing units.
- the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
- AP application processor
- modem processor modem processor
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller video codec
- digital signal processor digital signal processor
- DSP digital signal processor
- NPU neural-network processing unit
- the different processing units may be independent devices or integrated in one or more processors.
- the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
- a memory may also be provided in the processor 110 to store instructions and data.
- the memory in the processor 110 is a cache memory.
- the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
- the processor 110 may include one or more interfaces.
- the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- PCM pulse code modulation
- UART universal asynchronous transceiver receiver/transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB Universal Serial Bus
- the I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL).
- the processor 110 may include multiple sets of I2C buses.
- the processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively through different I2C bus interfaces.
- the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the electronic device 100.
- the I2S interface can be used for audio communication.
- the processor 110 may include multiple sets of I2S buses.
- the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
- the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
- the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
- the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
- the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
- the UART interface is a universal serial data bus used for asynchronous communication.
- the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
- the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
- the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
- the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
- the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
- the MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on.
- the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100.
- the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
- the GPIO interface can be configured through software.
- the GPIO interface can be configured as a control signal or as a data signal.
- the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
- the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
- the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
- the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect other electronic devices, such as AR devices.
- the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
- the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
- the charging management module 140 is used to receive charging input from the charger.
- the charger can be a wireless charger or a wired charger.
- the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
- the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
- the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
- the power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
- the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
- the power management module 141 may also be provided in the processor 110.
- the power management module 141 and the charging management module 140 may also be provided in the same device.
- the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
- the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
- Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
- the antenna can be used in combination with a tuning switch.
- the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
- the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
- the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
- the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1.
- at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
- at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
- the modem processor may include a modulator and a demodulator.
- the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
- the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
- the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
- the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
- the modem processor may be an independent device.
- the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
- the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
- WLAN wireless local area networks
- BT wireless fidelity
- GNSS global navigation satellite system
- FM frequency modulation
- NFC near field communication technology
- infrared technology infrared, IR
- the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
- the wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna 2.
- the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through 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), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
- the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite-based augmentation systems
- the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
- the GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
- the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos, and the like.
- the display screen 194 includes a display panel.
- the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
- LCD liquid crystal display
- OLED organic light-emitting diode
- active-matrix organic light-emitting diode active-matrix organic light-emitting diode
- AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
- the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
- the electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
- the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
- ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
- the ISP may be provided in the camera 193.
- the camera 193 is used to capture still images or videos.
- the object generates an optical image through the lens and is projected to the photosensitive element.
- the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
- ISP outputs digital image signals to DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
- the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
- Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
- Video codecs are used to compress or decompress digital video.
- the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
- MPEG moving picture experts group
- MPEG2 MPEG2, MPEG3, MPEG4, and so on.
- NPU is a neural-network (NN) computing processor.
- NN neural-network
- applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
- the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
- the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
- the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
- the internal memory 121 may include a storage program area and a storage data area.
- the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like.
- the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
- the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
- the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
- the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
- the audio module 170 can also be used to encode and decode audio signals.
- the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
- the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
- the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
- the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
- the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
- the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
- the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
- the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
- the earphone interface 170D is used to connect wired earphones.
- the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
- OMTP open mobile terminal platform
- CTIA cellular telecommunications industry association of the USA, CTIA
- the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
- the pressure sensor 180A may be provided on the display screen 194.
- the capacitive pressure sensor may include at least two parallel plates with conductive materials.
- the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
- the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
- the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
- touch operations that act on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
- the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
- the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
- the gyro sensor 180B can be used for image stabilization.
- the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement to achieve anti-shake.
- the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
- the air pressure sensor 180C is used to measure air pressure.
- the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
- the magnetic sensor 180D includes a Hall sensor.
- the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster.
- the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
- features such as automatic unlocking of the flip cover are set.
- the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers, etc.
- the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
- the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
- the light emitting diode may be an infrared light emitting diode.
- the electronic device 100 emits infrared light to the outside through the light emitting diode.
- the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
- the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
- the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
- the ambient light sensor 180L is used to sense the brightness of the ambient light.
- the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
- the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
- the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
- the fingerprint sensor 180H is used to collect fingerprints.
- the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
- the temperature sensor 180J is used to detect temperature.
- the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
- the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
- the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
- Touch sensor 180K also called “touch device”.
- the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
- the touch sensor 180K is used to detect touch operations acting on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- the visual output related to the touch operation can be provided through the display screen 194.
- the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
- the bone conduction sensor 180M can acquire vibration signals.
- the bone conduction sensor 180M can acquire the vibration signal of the human voice vibrating bone mass.
- the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
- the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
- the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
- the application processor can analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
- the button 190 includes a power button, a volume button, and so on.
- the button 190 may be a mechanical button. It can also be a touch button.
- the electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
- the motor 191 can generate vibration prompts.
- the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
- touch operations applied to different applications can correspond to different vibration feedback effects.
- Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
- Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
- the touch vibration feedback effect can also support customization.
- the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
- the SIM card interface 195 is used to connect to the SIM card.
- the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
- the electronic device 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
- the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
- the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
- the SIM card interface 195 can also be compatible with different types of SIM cards.
- the SIM card interface 195 may also be compatible with external memory cards.
- the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
- the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
- the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
- the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
- the embodiment of the present application takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 by way of example.
- FIG. 3 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
- the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
- the application layer can include a series of application packages.
- the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
- the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
- the application framework layer includes some predefined functions.
- the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and so on.
- the window manager is used to manage window programs.
- the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, take a screenshot, etc.
- the content provider is used to store and retrieve data and make these data accessible to applications.
- the data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
- the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
- the view system can be used to build applications.
- the display interface can be composed of one or more views.
- a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
- the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
- the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
- the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction.
- the notification manager is used to notify download completion, message reminders, etc.
- the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
- Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
- the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
- the application layer and application framework layer run in a virtual machine.
- the virtual machine executes the java files of the application layer and the application framework layer as binary files.
- the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
- the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
- the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
- the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
- the 2D graphics engine is a drawing engine for 2D drawing.
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
- the corresponding hardware interrupt is sent to the kernel layer.
- the kernel layer processes touch operations into original input events (including touch coordinates, time stamps of touch operations, etc.).
- the original input events are stored in the kernel layer.
- the application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
- the camera 193 captures still images or videos.
- Fig. 4 is a schematic structural diagram of a complete installation package according to an embodiment of the present application.
- the structure of the complete installation package includes multiple functional blocks, and each functional block can continue to be divided into multiple sub-functional blocks. Developers divide the complete installation package into multiple functional blocks according to the different functions they implement. Among them, the functional block can also be understood as a capability piece, and the complete installation package can be understood as a full application package. The following is a pair of full application packages and capability pieces.
- the structure of the complete installation package is described. As shown in Figure 4, the full application package is divided into general capability piece 1, capability piece 2, and capability piece 3 according to their respective functions, and capability piece 4, capability piece 5, and capability piece 6, which are suitable for different terminal equipment installations.
- the capability piece reflecting the static information of the device
- the static information of the device included in the capability piece includes static device information used to describe the terminal device, such as description files, executable files, general resources, and central processing units (Central Processing Unit, CPU) platform-related files (such as Arm32, etc.), resolution-related files (such as high, medium, and low resolution, etc.), language-related files (such as Chinese, etc.), and codec-related files (such as H. 255 etc.).
- the complete installation package can be determined according to the static information of the device. For example, when the terminal device is a mobile phone and the resolution of the mobile phone is high resolution, a complete installation package with high resolution suitable for mobile phone download can be determined.
- the server can obtain an installation package based on the download request.
- the installation package contains as many capability chips as possible, and the terminal device can obtain the installation package through one download. Avoid the user's second download, and improve the continuity of user experience.
- FIG. 5 is a flowchart of a method for downloading an installation package according to an embodiment of the present application.
- the method can be executed by the electronic device 100 in FIG.
- the download method includes the following steps:
- Step S301 The terminal device sends a download request for downloading the installation package of the target application, and the download request includes dynamic information.
- Dynamic information is state information that is read from the terminal device when the download request is generated and reflects the current operating capability of the terminal device.
- terminal devices can be, but not limited to, Internet devices such as mobile phones, watches, smart speakers, tablet computers, PC computers, televisions, and vehicle control equipment.
- the status information of the operating capability includes the status of the storage module of the terminal device, the status of the communication module, and the status of the processor. More specifically, it includes storage status, network status, CPU load status, and so on.
- state information is dynamic, and may change dynamically over time, such as storage state, CPU load state, or may change dynamically with the location of the terminal, such as network state.
- Step S302 The terminal device receives the installation package determined based on the download request.
- the target application has a complete installation package
- the installation package determined based on the download request is a subset of the complete installation package, where the subset includes the complete installation package itself.
- the size of the installation package determined based on the download request can be equal to or smaller than the size of the complete installation package.
- the complete installation package of the target application can be determined by the static device information of the terminal device to determine the complete installation package suitable for the terminal device.
- the static device information can include the device type, system version, device CPU platform, resolution, and One or more of the codec capabilities.
- the type of equipment that includes the terminal equipment such as mobile phones or desktop computers, etc.
- select a complete installation package suitable for the equipment for example, the computer’s CPU platform is 32-bit or For 64-bit, a complete installation package suitable for the computer is selected according to the processing capacity of the computer's CPU platform. It can also be a combination of several kinds of information to determine the complete installation package, which is not limited here.
- the installation package when downloading the installation package, the installation package is obtained based on the dynamic information of the terminal device, which can satisfy the user's demand for the installation package to the greatest extent through one download, and improve the user's installation experience and subsequent use continuity Experience.
- the dynamic information includes network status, where the network status may include network speed and network type (eg, 4G, wifi, 5G) and so on.
- the terminal device receives the installation package determined based on the network status. For example, when the terminal device sends a download request to download the installation package of the target application, the network status included in the download request is 4G. At this time, considering the user's traffic consumption, if the complete installation package is downloaded, the user may be consumed. More traffic.
- the functional blocks in the complete installation package can be tailored to meet the user's requirements for traffic consumption.
- the user’s internet speed is slow, the user’s download time needs to be considered at this time.
- the user usually downloads the application for an average of about 5 seconds, and it may take 5 minutes to download the complete installation package based on the user’s current internet speed.
- some functional blocks in the complete installation package can be cut out based on the user’s usual download time to meet the customer’s download time requirements.
- this application can also tailor the complete installation package according to the network speed and network type at the same time to meet the user's requirements for download time and traffic consumption at the same time.
- the dynamic information includes a storage state
- the terminal device receives the installation package determined based on the storage state. For example, when the storage state of the terminal device is only 2G of storage space, downloading the complete installation package needs to occupy 3G of storage space. At this time, the functional blocks in the complete installation package need to be cut to make the remaining in the complete installation package.
- the size of the set of functional blocks is less than or equal to 2G, and the set of remaining functional blocks after cutting is taken as an installation package determined based on the storage state, and the installation package can meet the size of the storage space of the terminal device.
- the dynamic information includes a network state and a storage state
- the terminal device receives an installation package determined based on the network state and the storage state.
- the network status includes network speed, network type (for example, 4G, wifi, 5G), etc.
- the storage status is storage space. According to the sequence of the two statuses of the dynamic information, two cutting methods can be included.
- the functional blocks in the complete installation package are first cut based on the network status of the dynamic information. After the complete installation package is cut for the first time, based on the dynamic information. Store the state, cut the remaining function blocks in the complete installation package for the second time, and keep the set of remaining function blocks in the complete installation package after two cuts.
- the set of function blocks is the installation required by the user package.
- the installation package can satisfy the user's download time and/or traffic consumption, and at the same time satisfy the storage space of the terminal device.
- the complete installation package can be cut for the first time based on the storage status of the dynamic information. After the complete installation package is cut for the first time, based on the network status in the dynamic information, the complete installation package can be cut for the first time. The remaining functional blocks in the installation package are cut for the second time, and the set of remaining functional blocks in the complete installation package after two cuts is retained.
- the set of functional blocks is the installation package required by the user.
- the installation package can meet the user's requirements for download time and/or traffic consumption on the basis of meeting the storage space of the terminal device.
- the priority order of the storage status and the network status is based on the premise of satisfying the download request.
- the specific priority of the storage status or the network status is not limited here.
- FIG. 6 is according to an embodiment of the present application.
- the flow chart of the method for obtaining the installation package is shown in Figure 6. The method specifically includes the following steps:
- the predetermined priority sorting can be sorted by the user's usage priority before cutting, and the usage priority can be counted according to the number of downloads in the big data platform, and the functional module with the most downloads is regarded as the functional block with the highest usage priority.
- a predetermined priority arrangement is obtained. For example, when a user downloads an entertainment application (Application, APP), the complete installation package of the entertainment APP includes: movies, music, reading, painting and other functional blocks. According to statistics from the data platform, in this entertainment APP, movies are downloaded 90 times, music is 80 times, reading is 60 times, and painting is 5 times. Movies are downloaded first according to the size of the installation package, followed by music. Prioritization of frequency of use.
- the function blocks with low priority in the complete installation package will be cut off until the total size of the reserved function blocks is closest to and does not exceed the size of the installation package.
- the size of the installation package is determined based on the download request. For example, cut out the paintings with lower frequency of use (download times), and obtain a collection of functional blocks with higher frequency of use, which is close to and does not exceed the size of the installation package.
- the installation package includes the functional blocks with a high usage rate, which can avoid the second download of the functional blocks with a high usage rate, and improve the continuity experience of user operations.
- the installation package determined based on the download request needs to be cut to obtain the functional blocks in the complete installation package, it can be specifically obtained by the following method, namely filtering according to the priority table of the functional blocks
- the rule gets the installation package.
- the priority table of the function block describes the priority of the function block to be called when the target application is used, and the call priority can reflect the business logic of the target application.
- the business logic is based on the realization of the function of the function block.
- the installation package obtained through the priority table filtering rules contains as many functional blocks related to business logic as possible.
- FIG. 7 is a flowchart of a priority table screening rule of an embodiment of this application. As shown in FIG. 7, the priority table screening rule specifically includes the following steps:
- step S501 the function blocks in the complete installation package are sorted layer by layer according to the priority of being called when the target application is used.
- the function blocks with the same calling sequence are in the same layer, and the functions between the function blocks (capacity slices) in the same calling sequence are independent, that is, the functions between the function blocks in the same layer are mutually exclusive. Does not affect.
- Fig. 8 is a structural diagram of the priority table of an embodiment of the application. As shown in Fig. 8, it includes the main entry page, that is, capability slice 0, which is located at level 0.
- the main entry page includes: capability slice 1 to capability slice 7.
- Capability sheet 3 includes capability sheet 7 sub-function blocks, capability sheet 4, capability sheet 5, and capability sheet 7 are in layer 3, capability sheet 4 includes capability sheet 6 sub-kinetic energy block, and capability sheet 6 is in layer 4.
- the APP main entrance page is (layer 0).
- the main entrance includes two functional blocks of TV and movie, which are located on layer 1.
- Step S502 taking the layer of the function block as the main sorting basis, and taking the size of the function block as the sub-sorting basis, according to the calling order of the layers, from first to last, and the size of the function block is from small to large.
- the blocks are sorted, and the function blocks are accumulated in the order before and after the function blocks are sorted.
- the size of the installation package is determined based on the download request.
- the function blocks in each layer are sorted according to the calling order of the layers, that is, layer 0 first, layer 1, then layer 2, and then layer 3, and the function blocks in each layer are accumulated in the order.
- the ability slice 4, ability slice 5, and ability slice 6 in the level 2 layer are arranged in ascending order, and then accumulated until the sum of the size of the function blocks added together is the closest And does not exceed the size of the installation package.
- step S503 the accumulated function blocks are taken as reserved function blocks and added to the installation package, and the function blocks that have not been accumulated are cut out.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the consistent experience of user operations.
- FIG. 9 is a flowchart of a priority table screening rule according to another embodiment of the present application. As shown in FIG. 9, the priority table screening rule specifically includes the following steps:
- step S701 the functional blocks in the complete installation package are divided into sets of multiple functional blocks according to different tasks to be implemented.
- the set of each function block includes one or more function blocks that are called when implementing a predetermined task and are arranged in a predetermined calling order.
- the realization of the predetermined task means the necessary functional blocks to complete a task. For example, to watch a movie, you must first have the main entry page, then the movie function block, and then the required movie. To realize the task of watching a movie, you must have the main entry page (function block) and the movie (function block).
- the set of functional blocks divided into multiple functional blocks according to different tasks implemented can include the following sets of functional blocks.
- the first set is: Capability Slice 0 (Main Entry Page) + Capability Slice 1 + Capability Piece 4;
- the second set is: ability piece (main entry page) + ability piece 1+ ability piece 5+ ability piece 6;
- the third set is: ability piece (main entry page) + ability piece 2;
- the fourth The set is: ability piece (main entry page) + ability piece 3+ ability piece 7.
- Step S702 According to the required installation package size determined based on the download request, a set of function blocks with the closest size and not exceeding the size of the installation package is selected from the set of various function blocks and added to the installation package. For example, as shown in Figure 8, when the size of the installation package determined based on the download request is 10M, the sum of the function block sizes of the first set is 9M, the sum of the function block sizes of the second set is 5M, and the third The sum of the function block sizes of the set is 8M, and the sum of the function block sizes of the fourth kind of set is 6M, then the set of function blocks in the first kind of set is selected as the determined installation package.
- the set of functional blocks that implement a certain task when the set of functional blocks that implement a certain task is much smaller than the required installation package, it may also be a set of functional blocks that implement several tasks.
- the installation package obtained through this screening method contains the functional blocks related to the business logic of the target application to the greatest extent, avoids the secondary download and installation of the functional blocks related to the business logic, and improves the user's operation Coherent experience.
- the installation package determined based on the download request needs to be cut to obtain the functional blocks in the complete installation package, specifically, it can also be obtained by other methods, for example, the functional blocks can be obtained according to their names. Or size sorting, or random screening of function blocks.
- the tailored installation package has no redundant installation files, which satisfies the user's installation experience while downloading as many functional blocks as possible at one time to improve the user's continuity after the application is installed. Operating experience.
- the method further includes extracting files from the received installation package, writing them into the installation directory of the terminal, and completing the installation of the target application.
- the installation can be performed by calling the decompression program in the terminal device. Decompress the files in the installation package in the package, and write the decompressed files in the installation directory of the terminal device, where the installation directory is preset or selected by the user through the interface of the terminal device.
- the installation package can meet the user's needs for the target application at one time as much as possible, and improve the consistent experience of user operations.
- FIG. 10 is a flowchart of a method for distributing an installation package according to an embodiment of the present application.
- the method can be executed by the server in FIG. 1.
- a specific embodiment is used to introduce the method for distributing an installation package. As shown in Figure 10, the method specifically includes the following steps:
- Step S801 Receive a download request for downloading the installation package of the target application, where the download request includes dynamic information of the terminal device.
- the dynamic information is state information that is read from the terminal device when the download request is generated and reflects the current operating capability of the terminal device.
- the terminal devices can be, but not limited to, mobile phones, watches, smart speakers, tablet computers, PC-side computers, TVs, car control devices and other Internet devices.
- the server can be used to provide installation packages, such as application market servers.
- the status information of the operating capability includes the status of the storage module of the terminal device, the status of the communication module, and the status of the processor. More specifically, it includes storage status, network status, CPU load status, and so on.
- Such state information is dynamic, and may change dynamically over time, such as storage state, CPU load state, or may change dynamically with the location of the terminal, such as network state.
- Step S802 Provide an installation package determined based on the download request, where the target application has a complete installation package, and the installation package determined based on the download request is a subset of the complete installation package.
- the subset includes the complete installation package itself.
- the size of the installation package determined based on the download request can be equal to or smaller than the size of the complete installation package.
- the complete installation package of the target application can be determined by the static device information of the terminal device to determine the complete installation package suitable for the terminal device.
- the static device information can include the device type, system version, device CPU platform, resolution, and One or more of the codec capabilities.
- the type of equipment that includes the terminal equipment such as mobile phones or desktop computers, etc.
- select a complete installation package suitable for the equipment for example, the computer’s CPU platform is 32-bit or For 64-bit, a complete installation package suitable for the computer is selected according to the processing capacity of the computer's CPU platform. It can also be a combination of several kinds of information to determine the complete installation package, which is not limited here.
- the installation package is obtained based on the dynamic information of the terminal device, and the user can obtain the installation package through a one-time download.
- the installation package can meet the user's needs for the installation package to the greatest extent, and improve the user's installation experience and follow-up Use a coherent experience.
- the method for downloading the installation package is specifically introduced below, which is applied to terminal devices and application market servers.
- the terminal device implements the installation package download method of the foregoing embodiment
- the application server implements the installation package distribution method of the foregoing embodiment. Since the method for downloading the installation package and the method for distributing the installation package have been described in detail in the foregoing embodiment, they will not be repeated here.
- FIG. 11 is a schematic structural diagram of a terminal device 900 according to some embodiments of the present application.
- the terminal device 900 can execute the method for downloading the installation package in the foregoing embodiments.
- the terminal device includes:
- the sending module 901 sends a download request for downloading the installation package of the target application.
- the download request includes dynamic information, where the dynamic information is state information that is read from the terminal device when the download request is generated and reflects the current operating capability of the terminal device.
- the status information of the operating capability includes the status of the storage module of the terminal device, the status of the communication module, and the status of the processor. More specifically, it includes storage status, network status, CPU load status, and so on.
- state information is dynamic, and may change dynamically over time, such as storage state, CPU load state, or may change dynamically with the location of the terminal, such as network state.
- the receiving module 902 receives the installation package determined based on the download request, where the target application has a complete installation package, and the installation package determined based on the download request is a subset of the complete installation package. Among them, the subset includes the complete installation package itself. In other words, the size of the installation package determined based on the download request can be equal to or smaller than the size of the complete installation package. When the installation package determined based on the download request is smaller than the complete installation package, the complete installation package Cut to achieve an installation package that satisfies the download request.
- the receiving module in this application receives the installation package determined based on the download request.
- the specific installation package determination process has been described in detail in the above embodiment. For details, please refer to the relevant description in the installation package download method of the above embodiment. This will not be repeated here.
- the terminal device 900 when the terminal device 900 downloads the installation package, it obtains the installation package based on the dynamic information of the terminal device, which can satisfy the user's requirements for the installation package to the greatest extent through one download, and improve the user's installation experience and follow-up Use a coherent experience.
- a server 1000 for downloading an installation package of an application is disclosed.
- Fig. 12 is a schematic structural diagram of a server according to some embodiments of the present application.
- the server can execute the method for distributing the installation package in the foregoing embodiments.
- the server 1000 includes:
- the request receiving module 1001 is configured to receive a download request for downloading the installation package of the target application, and the download request includes dynamic information of the terminal device.
- the dynamic information is state information that is read from the terminal device when the download request is generated and reflects the current operating capability of the terminal device.
- the terminal devices can be, but not limited to, mobile phones, watches, smart speakers, tablet computers, PC-side computers, TVs, car control devices and other Internet devices.
- the server can be used to provide installation packages, such as application market servers.
- the status information of the operating capability includes the status of the storage module of the terminal device, the status of the communication module, and the status of the processor. More specifically, it includes storage status, network status, CPU load status, and so on.
- Such status information is dynamic, and may change dynamically over time, such as storage status, CPU load status, and may also change dynamically with the location of the terminal, such as network status.
- the application providing module 1002 is configured to provide an installation package determined based on a download request, where the target application has a complete installation package, and the installation package determined based on the download request is a subset of the complete installation package. Among them, the subset includes the complete installation package itself. In other words, the size of the installation package determined based on the download request can be equal to or smaller than the size of the complete installation package. When the installation package determined based on the download request is smaller than the complete installation package, the complete installation package Cut to achieve an installation package that satisfies the download request.
- the receiving module application providing module in this application provides the installation package determined based on the download request.
- the specific installation package determination process has been described in detail in the above embodiment. For details, please refer to the relevant description in the installation package distribution method of the above embodiment The description will not be repeated here.
- the server 1000 obtains the installation package based on the dynamic information and static information of the terminal device, and the user can obtain the installation package through a one-time download.
- the installation package can meet the user's demand for the installation package to the greatest extent and improve the user The installation experience and subsequent use continuity experience.
- FIG. 13 is a schematic structural diagram of an installation package distribution system according to some embodiments of the present application.
- the system includes the terminal device of the above-mentioned embodiment and the server that provides downloading of the application installation package.
- the structure and function of the terminal device and the server that provides the download of the application installation package have been described in detail in the above-mentioned embodiment. , I won’t repeat it here.
- the device 1200 may include one or more processors 1201 coupled to the controller hub 1203.
- the controller hub 1203 communicates with the processor 1201 via a multi-drop bus such as a front side bus (FSB), a point-to-point interface such as a fast path interconnect (QPI), or a similar connection 1206.
- the processor 1201 executes instructions that control general types of data processing operations.
- the controller hub 1203 includes, but is not limited to, a graphics memory controller hub (GMCH) (not shown) and an input/output hub (IOH) (which may be on a separate chip) (not shown) Out), where GMCH includes memory and graphics controller and is coupled with IOH.
- GMCH graphics memory controller hub
- IOH input/output hub
- the device 1200 may also include a coprocessor 1202 and a memory 1204 coupled to the controller hub 1203.
- a coprocessor 1202 and a memory 1204 coupled to the controller hub 1203.
- the memory 1204 and the coprocessor 1202 are directly coupled to the processor 1201 and the controller hub 1203.
- the controller hub 1203 and IOH are in a single chip.
- the memory 1204 may be, for example, dynamic random access memory (DRAM), phase change memory (PCM), or a combination of the two.
- the coprocessor 1202 is a dedicated processor, such as, for example, a high-throughput MIC processor, a network or communication processor, a compression engine, a graphics processor, a GPGPU, or an embedded processor, etc.
- the optional properties of the coprocessor 1202 are shown in dashed lines in FIG. 14.
- the memory 1204 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions.
- the memory 1204 may include any suitable non-volatile memory such as flash memory and/or any suitable non-volatile storage device, such as one or more hard disk drives (HDD(s)), one or more optical disks (CD ) Drives, and/or one or more digital versatile disc (DVD) drives.
- HDD hard disk drives
- CD optical disks
- DVD digital versatile disc
- the memory 1204 may include a part of storage resources on the device of the system 1200, or it may be accessed by the device, but not necessarily a part of the device. For example, it can be accessed through the network via the network interface 1206.
- the device 1200 may further include a network interface (NIC) 1206.
- the network interface 1206 may include a transceiver, which is used to provide a radio interface for the device 1200 to communicate with any other suitable devices (such as a front-end module, an antenna, etc.).
- the network interface 1206 may be integrated with other components of the device 1200.
- the network interface 1206 can realize the function of the communication unit in the above-mentioned embodiment.
- the device 1200 may further include an input/output (I/O) device 1205.
- the I/O 1205 may include: a user interface, which is designed to enable users to interact with the device 1200; the design of the peripheral component interface enables peripheral components to also interact with the device 1200; and/or a sensor is designed to determine the environment related to the device 1200 Conditions and/or location information.
- Figure 14 is only exemplary. That is, although FIG. 12 shows that the device 1200 includes multiple devices such as the processor 1201, the controller hub 1203, and the memory 1204, in actual applications, the devices using the methods of the present application may only include each of the devices 1200. A part of the devices, for example, may only include the processor 1201 and the NIC 1206. The properties of optional devices in Fig. 12 are shown by dashed lines.
- the memory 1204 which is a computer-readable storage medium, stores instructions, which when executed on a computer, cause the system 1200 to execute the installation package download method or the installation package distribution method according to the above-mentioned embodiments
- the system 1200 stores instructions, which when executed on a computer, cause the system 1200 to execute the installation package download method or the installation package distribution method according to the above-mentioned embodiments
- the method in the above-mentioned embodiment which will not be repeated here.
- the SoC130 includes: an interconnection unit 1350, which is coupled to a processor 1310; a system agent unit 1380; a bus controller unit 1390; an integrated memory controller unit 1340; a group or one or more coprocessors 1320 , which may include integrated graphics logic, image processor, audio processor and video processor; static random access memory (SRAM) unit 1330; direct memory access (DMA) unit 1360.
- the coprocessor 1320 includes a dedicated processor, such as, for example, a network or communication processor, a compression engine, a GPGPU, a high-throughput MIC processor, or an embedded processor, etc.
- the static random access memory (SRAM) unit 1330 may include one or more computer-readable media for storing data and/or instructions.
- the computer-readable storage medium may store instructions, specifically, temporary and permanent copies of the instructions.
- the instruction may include: when executed by at least one unit in the processor, causing Soc1300 to execute the method for downloading the installation package or the method for distributing the installation package according to the above-mentioned embodiment. For details, please refer to the method of the above-mentioned embodiment, which will not be repeated here. .
- the various embodiments of the mechanism disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods.
- the embodiments of the present application can be implemented as a computer program or program code executed on a programmable system including at least one processor and a storage system (including volatile and non-volatile memory and/or storage elements) , At least one input device and at least one output device.
- Program codes can be applied to input instructions to perform the functions described in this application and generate output information.
- the output information can be applied to one or more output devices in a known manner.
- a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
- DSP digital signal processor
- ASIC application specific integrated circuit
- the program code can be implemented in a high-level programming language or an object-oriented programming language to communicate with the processing system.
- assembly language or machine language can also be used to implement the program code.
- the mechanism described in this application is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.
- the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof.
- the disclosed embodiments can also be implemented as instructions carried by or stored on one or more transient or non-transitory machine-readable (eg, computer-readable) storage media, which can be executed by one or more processors Read and execute.
- the instructions can be distributed through a network or through other computer-readable media.
- a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (for example, a computer), including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magnetic Optical disk, read only memory (ROM), random access memory (RAM), erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), magnetic or optical card, flash memory, or A tangible machine-readable memory used to transmit information (for example, carrier waves, infrared signals, digital signals, etc.) using the Internet with electric, optical, acoustic, or other forms of propagating signals. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (for example, a computer).
- each unit/module mentioned in each device embodiment of this application is a logical unit/module.
- a logical unit/module can be a physical unit/module or a physical unit/ A part of the module can also be realized by a combination of multiple physical units/modules.
- the physical realization of these logical units/modules is not the most important.
- the combination of the functions implemented by these logical units/modules is the solution to this application.
- the above-mentioned device embodiments of this application do not introduce units/modules that are not closely related to solving the technical problems proposed by this application. This does not mean that the above-mentioned device embodiments do not exist. Other units/modules.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
一种安装包的下载方法、分发方法、终端设备(102、900)、服务器(101、1000)及***(1100、1200、1300),其中,安装包的下载方法包括:终端设备(102、900)发送下载目标应用的安装包的下载请求,所述下载请求中包括动态信息(301),其中,所述动态信息是在所述下载请求生成时从所述终端设备(102、900)中读取的、反映所述终端设备(102、900)当前运行能力的状态信息;所述终端设备(102、900)接收基于所述下载请求所确定的安装包(302),其中所述目标应用具有完整安装包,基于所述下载请求所确定的安装包是所述完整安装包的子集。
Description
本申请要求于2019年12月11日提交中国专利局、申请号为201911267641.2、申请名称为“安装包的下载方法、分发方法、终端设备、服务器及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,尤其涉及安装包的下载方法、分发方法、终端设备、服务器及***。
随着科技的发展,互联网设备的移动应用越来越大,同时,在兼容多设备时还会将多平台的库文件,资源文件等打包在一个安装包内,用户在下载安装包时,整个安装包全部下载,将会占据用户的下载时间、安装时间以及存储空间等。
由此,应用分包技术应运而生,将安装包按照功能拆分,一个应用安装包可以含多个特性分包,且部分特性分包在应用安装时可以不进行下载安装,用户可以根据后续的需求进行选择下载安装。
发明内容
有鉴于此,本申请提供一种安装包的下载方法、分发方法、终端设备、服务器、***及计算机可读存储介质,能够避免用户多次下载,且能够根据用户的设备的运行状态满足用户对下载时间和存储量的要求。
以下从多个方面介绍本申请,以下多个方面的实施方式和有益效果可互相参考。
第一方面,本申请提供一种安装包的下载方法,该方法可由终端设备执行,包括:终端设备发送下载目标应用的安装包的下载请求,所述下载请求中包括动态信息,其中,所述动态信息是在所述下载请求生成时从所述终端设备中读取的、反映所述终端设备当前运行能力的状态信息。其中,运行能力的状态信息是动态的,可能会随时间的推移而动态变化,可以包括终端设备的存储模块的状态、通信模块的状态、及处理器的状态等。所述终端设备接收基于所述下载请求所确定的安装包,其中,所述目标应用具有完整安装包,基于所述下载请求所确定的安装包是所述完整安装包的子集,也就是说,基于所述下载请求所确定的安装包的大小可以等于完整安装包大小,也可以小于完整安装包的大小,当基于所述下载请求所确定的安装包小于完整安装包时,需要对完整安装包进行裁切,以实现满足下载请求的安装包。
根据本申请的实施例方式,在下载安装包时,基于终端设备的动态信息和静态信息得到安装包,可以通过一次下载来最大限度的满足用户对安装包的需求,提高用户的安装体验和后续使用连贯性体验。
在上述第一方面的一种可能的实现中,所述下载请求中进一步包括静态信息是反映所述终端设备的静态设备信息,进一步地,静态信息可以包括:设备类型、***版本、设备CPU平台、分 辨率和编解码能力中的一个或多个。例如,在下载请求中,包括终端设备的设备的类型,如、手机或是桌上电脑等,根据设备的类型选取适应该设备的完整安装包,又如,CPU平台是32位或是64位的,根据该CPU平台的处理能力选取适应该设备的完整安装包。
在上述第一方面的一种可能的实现中,所述动态信息包括所述终端设备的网络状态,也就是说,下载请求中包括终端设备的在发送下载请求时的网络状态,如,网速、网络类型(例如,4G、wifi、5G)等,基于终端设备的网络状态信息获得的安装包,其中,该安装包可以是通过对完整安装包进行裁切得到,也可以是未经过裁切的完整安装包,以该安装包满足用户对下载时间和/或流量消耗的要求。具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于所述网络状态所确定的安装包大小小于完整安装包大小时,则需要对完整安装包进行裁切,即对所述完整安装包中的各功能块进行裁切,并保留所述完整安装包中的剩余的功能块的集合,其中,功能块的集合为与所述网络状态相对应的安装包,该安装包能够满足用户对下载时间或/和流量的消耗的要求。
在上述第一方面的一种可能的实现中,所述动态信息包括所述终端设备的存储状态,即终端设备当前的存储空间的大小。也就是说,下载请求中包括终端设备的在发送下载请求时的存储状态,终端设备基于其存储状态获得一个安装包,其中,该安装包可以是完整安装包,也可以通过对完整安装包裁切得到的安装包,以使该安装包满足用户的终端设备的存储空间。
具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于所述存储状态所确定的安装包大小小于完整安装包大小时,需要对完整安装包进行裁切,即对所述完整安装包中的各功能块进行裁切,并保留所述完整安装包中的剩余的功能块的集合,其中,功能块的集合为与所述下载请求相对应的安装包,该安装包能够满足用户的终端设备的存储空间。
在上述第一方面的一种可能的实现中,所述动态信息包括所述终端设备的网络状态和存储状态。其中,网络状态,如,网速、网络类型(例如,4G、wifi、5G)等,存储状态,存储空间大小,基于终端设备的网络状态和存储状态获得的安装包。其中该安装包可以是通过对完整安装包进行裁切得到,也可以是未经过裁切的完整安装包,以使得该安装包即能够满足用户对下载时间和/或流量消耗的要求,又可以满足用户的终端设备的存储容量,最大限度的提高用户的体验。
具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于终端设备的网络状态和存储状态所确定的安装包大小小于完整安装包大小,则需要对完整安装包进行裁切,此时,可以基于所述动态信息的网络状态,对所述完整安装包进行第一次裁切,在完整安装包经过第一次裁切后,基于所述动态信息中的存储状态,对所述完整安装包中的剩余的功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足用户的下载时间和/或流量的消耗的基础上,同时满足终端设备的存储空间。
或者,可以基于所述动态信息的存储状态,对所述完整安装包进行第一次裁切,在完整安装包经过第一次裁切后,基于所述动态信息中的网络状态,对所述完整安装包中的剩余的功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足终端设备的存储空间的基础上,同时满足用户的对下载时间和/或流量消耗的要求。
在上述第一方面的一种可能的实现中,对所述完整安装包中的各功能块进行裁切后,保留与 所述下载请求相对应的功能块而得到的安装包,通过以下方式获得:所述完整安装包中的多个功能块具有预定的优先级排列,其中,预定的优先级排序可以通过用户的使用优先级在裁切前进行排序,并且安装包中各功能块能够实现其功能为基础进行优先下载,所述完整安装包中的优先级低的功能块将被裁掉,直到被保留的功能块的大小匹配所述安装包大小,即被保留的功能块的大小总和最接近且不超过所述安装包的大小,其中,所述安装包的大小基于所述下载请求而确定。通过该方式获得的安装包,能够使安装包内包含使用率较高的功能块,能够避免使用率高的功能块的第二次下载,提升用户操作的连贯性体验。
在上述第一方面的一种可能的实现中,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块而得到的安装包,包括:按照所述功能块的优先度表筛选规则得到所述安装包,所述功能块的优先度表描述所述功能块在所述目标应用被使用时的被调用优先程度,其中,调用优先程度可以体现目标应用的业务逻辑,以使安装包尽可能包含业务逻辑相关的功能块。
在上述第一方面的一种可能的实现中,所述功能块的优先度表筛选规则,包括:将所述完整安装包中的所述功能块按照所述目标应用被使用时的被调用优先程度逐层排序,具有同一调用顺序的功能块处于同一层中,其中同一调用顺序内的功能块之间的功能是并列关系,也就是说,各功能块之间的功能互不影响;以功能块所处的层作为主排序依据,以功能块的大小作为次排序依据,按照层的被调用顺序从先到后,并且功能块的大小从小到大的方式,对功能块进行排序,并根据优先级来选取匹配大小的功能块作为安装包,即按照功能块的排序的前后顺序进行功能块的累加,直到当累加在一起的功能块的大小总和最接近且不超过所述安装包大小,其中,所述安装包大小基于所述下载请求而确定;将累加的所述功能块作为保留的功能块,被加入到所述安装包内,未进行累加的所述功能块被裁切掉。通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
在上述第一方面的一种可能的实现中,所述功能块的优先度表筛选规则,包括:所述完整安装包中的所述功能块按照实现的任务不同被分为多个功能块的集合,其中每一功能块的集合中包括在实现预定的任务时所被调用的且依预定调用顺序排列的一个或多个功能块,并根据实现预定的任务时被调用的顺序选取匹配大小的功能块作为安装包,即按照基于所述下载请求所确定的需求的所述安装包大小,从各个功能块的集合中选择出大小最接近且不超过所述安装包大小的功能块的集合,加入到所述安装包内。通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
在上述第一方面的一种可能的实现中,该方法还包括:从接收到的安装包中提取文件,写入所述终端的安装目录中,完成所述应用的安装,可以通过调用所述终端设备中的解压程序,从所述安装包中解压所述安装包中的文件,并在所述终端设备的安装目录中写入所解压出的文件,其中,所述安装目录为预先设定,或,用户通过终端设备的界面所选定的。该安装包能够尽可能一次性满足用户对目标应用的需求,提升用户操作的连贯性体验。
第二方面,本申请提供一种安装包的分发方法,该方法可由服务器执行,包括:接收下载目标应用的安装包的下载请求,所述下载请求中包括终端设备的动态信息,其中,所述动态信息是在所述下载请求生成时从所述终端设备中读取的、反映所述终端设备当前运行能力的状态信息。 其中,运行能力的状态信息是动态的,可能会随时间的推移而动态变化,可以包括终端设备的存储模块的状态、通信模块的状态、及处理器的状态等。
提供基于所述下载请求所确定的安装包,其中,所述目标应用具有完整安装包,基于所述下载请求所确定的安装包是所述完整安装包的子集,也就是说,基于所述下载请求所确定的安装包的大小可以等于完整安装包大小,也可以小于完整包装包的大小,当基于所述下载请求所确定的安装包小于完整安装包时,需要对完整安装包进行裁切,以实现满足下载请求的安装包。
根据本申请的实施例方式,基于终端设备的动态信息得到安装包,用户可以通过一次下载得到该安装包,该安装包能够最大限度的满足用户对安装包的需求,提高用户的安装体验和后续使用连贯性体验。
在上述第二方面的一种可能的实现中,所述下载请求中进一步包括静态信息,所述静态信息是反映所述终端设备的静态设备信息,进一步地,静态信息可以包括:设备类型、***版本、设备CPU平台、分辨率和编解码能力中的一个或多个。
在上述第二方面的一种可能的实现中,所述动态信息可以包括所述终端设备的网络状态,也就是说,下载请求中包括终端设备的在发送下载请求时的网络状态,如,网速、网络类型(例如,4G、wifi、5G)等,基于终端设备的网络状态信息获得的安装包,其中,该安装包可以是通过对完整安装包进行裁切得到,也可以是未经过裁切的完整安装包,以使该安装包满足用户对下载时间和/或流量消耗的要求。
具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在下载安装包时,若基于所述网络状态所确定的安装包大小小于完整安装包大小时,则需要对完整安装包进行裁切,即对所述完整安装包中的各功能块进行裁切,并保留所述完整安装包中的剩余的功能块的集合,其中,功能块的集合为与所述网络状态相对应的安装包,该安装包能够满足用户对下载时间或/和流量的消耗的要求。
在上述第二方面的一种可能的实现中,所述动态信息包括所述终端设备的存储状态,即终端设备当前的存储空间大小。也就是说,下载请求中包括终端设备的在发送下载请求时的存储状态,服务器基于终端设备的存储状态得到安装包,其中,该安装包可以是完整安装包,也可以是服务器通过对完整安装包裁切得到的安装包,以使该安装包满足用户的终端设备的存储空间。
具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于所述存储状态所确定的安装包大小小于完整安装包大小时,服务器需要对完整安装包进行裁切,即对所述完整安装包中的各功能块进行裁切,并保留所述完整安装包中的剩余的功能块的集合,其中,功能块的集合为与所述下载请求相对应的安装包,该安装包能够满足用户的终端设备的存储空间。
在上述第二方面的一种可能的实现中,所述动态信息包括所述终端设备的网络状态和存储状态。其中,网络状态,如,网速、网络类型(例如,4G、wifi、5G)等,存储状态,存储空间大小,基于终端设备的网络状态和存储状态获得的安装包。其中,该安装包可以是通过对完整安装包进行裁切得到,也可以是未经过裁切的完整安装包,以使得该安装包即能够满足用户对下载时间和/或流量消耗的要求,又可以满足用户的终端设备的存储容量,最大限度的提高用户的体验。
具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于所述终端设备的所述动态信息的网络状态,对所述完整安装包进行第一次裁切,在完整安装包经过第一次裁切后,基于所述动态信息中的存储状态,对所述完整安装包中的剩余的 功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足用户的下载时间和/或流量的消耗的基础上,同时满足终端设备的存储空间。
或者,可以基于所述终端设备的所述动态信息的存储状态,对所述完整安装包进行第一次裁切,在完整安装包经过第一次裁切后,基于所述动态信息中的网络状态,对所述完整安装包中的剩余的功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足终端设备的存储空间的基础上,同时满足用户的对下载时间和/或流量消耗的要求。
在上述第二方面的一种可能的实现中,解析所述完整安装包中附带的属性表,根据完整安装包的属性表中记载的各功能块的属性以确定所述安装包中基于按照各自实现的功能不同被分成的各个功能块。
在上述第二方面的一种可能的实现中,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块而得到的安装包,通过以下方式获得:所述完整安装包中的多个功能块具有预定的优先级排列,其中,预定的优先级排序可以通过用户的使用优先级在裁切前进行排序,并且安装包中各功能块能够实现其功能为基础进行优先下载,所述完整安装包中的优先级低的功能块将被裁掉,直到被保留的功能块的大小匹配所述安装包大小,即被保留的功能块的大小总和最接近且不超过所述安装包的大小,其中,所述安装包的大小基于所述下载请求而确定。通过该裁切方式,能够使安装包内包含使用率较高的功能块,能够避免使用率高的功能块的第二次下载,提升用户操作的连贯性体验。
在上述第二方面的一种可能的实现中,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块的步骤,包括:按照所述功能块的优先度表筛选规则得到所述安装包,所述功能块的优先度表描述所述功能块在所述目标应用被使用时的被调用优先程度,其中,调用优先程度可以体现目标应用的业务逻辑,以使安装包尽可能包含业务逻辑相关的功能块。
在上述第二方面的一种可能的实现中,所述功能块的优先度表筛选规则,包括:将所述完整安装包中的所述功能块按照所述目标应用被使用时的被调用优先程度逐层排序,具有同一调用顺序的功能块处于同一层中,其中同一调用顺序内的功能块之间的功能是并列关系,也就是说,各功能块之间的功能互不影响;以功能块所处的层作为主排序依据,以功能块的大小作为次排序依据,按照层的被调用顺序从先到后,并且功能块的大小从小到大的方式,对功能块进行排序,并根据优先级来选取匹配大小的功能块作为安装包,即按照功能块的排序的前后顺序进行功能块的累加,直到当累加在一起的各层的功能块的大小总和最接近且不超过所述安装包大小,其中,所述安装包大小基于所述下载请求而确定;将累加的所述功能块作为保留的功能块,被加入到所述安装包内,未进行累加的所述功能块被裁切掉。通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
在上述第二方面的一种可能的实现中,所述功能块的优先度表筛选规则,包括:所述完整安装包中的所述功能块按照实现的任务不同被分为多个功能块的集合,其中每一功能块的集合中包括在实现预定的任务时所被调用的且依预定调用顺序排列的一个或多个功能块,并根据实现预定的任务时被调用的顺序选取匹配大小的功能块作为安装包,即按照基于所述下载请求所确定的需求的所述安装包大小,从各个功能块的集合中选择出大小最接近且不超过所述安装包大小的功能 块的集合,加入到所述安装包内。通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
第三方面,本申请提供一种安装包的下载方法,所述方法应用于终端设备和应用服务器,所述终端设备实施上述第一方面实施例的所述的方法,所述应用服务器实施上述第二方面实施例的所述的方法。
第四方面,本申请公开了一种终端设备,包括发送模块和接收模块。其中,发送模块用于发送下载目标应用的安装包的下载请求,所述下载请求中包括动态信息,其中,所述动态信息是在所述下载请求生成时从所述终端设备中读取的、反映所述终端设备当前运行能力的状态信息。其中,运行能力的状态信息是动态的,可能会随时间的推移而动态变化,可以包括终端设备的存储模块的状态、通信模块的状态、及处理器的状态等。接收模块用于接收基于所述下载请求所确定的安装包,其中所述目标应用具有完整安装包,基于所述下载请求所确定的安装包是所述目标应用的完整安装包的子集。也就是说,基于所述下载请求所确定的安装包的大小可以等于完整安装包大小,也可以小于完整安装包的大小,当基于所述下载请求所确定的安装包小于完整安装包时,需要对完整安装包进行裁切,以实现满足下载请求的安装包。
根据本申请的实施例方式,在下载安装包时,基于终端设备的动态信息得到安装包,可以通过一次下载来最大限度的满足用户对安装包的需求,提高用户的安装体验和后续使用连贯性体验。
在上述第四方面的一种可能的实现中,所述静态信息是反映所述终端设备的静态设备信息,进一步地,静态信息可以包括:设备类型、***版本、设备CPU平台、分辨率和编解码能力中的一个或多个。
在上述第四方面的一种可能的实现中,所述动态信息包括所述终端设备的网络状态,也就是说,下载请求中包括终端设备的在发送下载请求时的网络状态,如,网速、网络类型(例如,4G、wifi、5G)等,基于终端设备的网络状态信息获得的安装包,其中,该安装包可以是通过对完整安装包进行裁切得到,也可以是未经过裁切的完整安装包,以该安装包满足用户对下载时间和/或流量消耗的要求。具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于所述网络状态所确定的安装包大小小于完整安装包大小时,则需要对完整安装包进行裁切,即对所述完整安装包中的各功能块进行裁切,并保留所述完整安装包中的剩余的功能块的集合,其中,功能块的集合为与所述网络状态相对应的安装包,该安装包能够满足用户对下载时间或/和流量的消耗的要求。
在上述第四方面的一种可能的实现中,所述动态信息包括所述终端设备的存储状态,即终端设备当前的存储空间的大小。也就是说,下载请求中包括终端设备的在发送下载请求时的存储状态,终端设备基于其存储状态获得一个安装包,其中,该安装包可以是完整安装包,也可以通过对完整安装包裁切得到的安装包,以使该安装包满足用户的终端设备的存储空间。
具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于所述存储状态所确定的安装包大小小于完整安装包大小时,需要对完整安装包进行裁切,即对所述完整安装包中的各功能块进行裁切,并保留所述完整安装包中的剩余的功能块的集合,其中,功能块的集合为与所述下载请求相对应的安装包,该安装包能够满足用户的终端设备的存储空间。
在上述第四方面的一种可能的实现中,所述动态信息包括所述终端设备的网络状态和存储状 态。其中,网络状态,如,网速、网络类型(例如,4G、wifi、5G)等,存储状态,存储空间大小,基于终端设备的网络状态和存储状态获得的安装包。其中该安装包可以是通过对完整安装包进行裁切得到,也可以是未经过裁切的完整安装包,以使得该安装包即能够满足用户对下载时间和/或流量消耗的要求,又可以满足用户的终端设备的存储容量,最大限度的提高用户的体验。
具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于终端设备的网络状态和存储状态所确定的安装包大小小于完整安装包大小,则需要对完整安装包进行裁切,此时,可以基于所述动态信息的网络状态,对所述完整安装包进行第一次裁切,在完整安装包经过第一次裁切后,基于所述动态信息中的存储状态,对所述完整安装包中的剩余的功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足用户的下载时间和/或流量的消耗的基础上,同时满足终端设备的存储空间。
或者,可以基于所述动态信息的存储状态,对所述完整安装包进行第一次裁切,在完整安装包经过第一次裁切后,基于所述动态信息中的网络状态,对所述完整安装包中的剩余的功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足终端设备的存储空间的基础上,同时满足用户的对下载时间和/或流量消耗的要求。
在上述第四方面的一种可能的实现中,解析所述完整安装包中附带的属性表,根据完整安装包的属性表中记载的各功能块的属性以确定所述安装包中基于按照各自实现的功能不同被分成的各个功能块。
在上述第四方面的一种可能的实现中,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块而得到的安装包,通过以下方式获得:所述完整安装包中的多个功能块具有预定的优先级排列,其中,预定的优先级排序可以通过用户的使用优先级在裁切前进行排序,并且安装包中各功能块能够实现其功能为基础进行优先下载,所述完整安装包中的优先级低的功能块将被裁掉,直到被保留的功能块的大小匹配所述安装包大小,即被保留的功能块的大小总和最接近且不超过所述安装包的大小,其中,所述安装包的大小基于所述下载请求而确定。通过该方式获得的安装包,能够使安装包内包含使用率较高的功能块,能够避免使用率高的功能块的第二次下载,提升用户操作的连贯性体验。
在上述第四方面的一种可能的实现中,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块而得到的安装包,包括:按照所述功能块的优先度表筛选规则得到所述安装包,所述功能块的优先度表描述所述功能块在所述目标应用被使用时的被调用优先程度,其中,调用优先程度可以体现目标应用的业务逻辑,以使安装包尽可能包含业务逻辑相关的功能块。
在上述第四方面的一种可能的实现中,所述功能块的优先度表筛选规则,包括:将所述完整安装包中的所述功能块按照所述目标应用被使用时的被调用优先程度逐层排序,具有同一调用顺序的功能块处于同一层中,其中同一调用顺序内的功能块之间的功能是并列关系,也就是说,各功能块之间的功能互不影响;以功能块所处的层作为主排序依据,以功能块的大小作为次排序依据,按照层的被调用顺序从先到后,并且功能块的大小从小到大的方式,对功能块进行排序,并根据优先级来选取匹配大小的功能块作为安装包,即按照功能块的排序的前后顺序进行功能块的累加,直到当累加在一起的功能块的大小总和最接近且不超过所述安装包大小,其中,所述安装 包大小基于所述下载请求而确定;将累加的所述功能块作为保留的功能块,被加入到所述安装包内,未进行累加的所述功能块被裁切掉。通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
在上述第四方面的一种可能的实现中,所述功能块的优先度表筛选规则,包括:所述完整安装包中的所述功能块按照实现的任务不同被分为多个功能块的集合,其中每一功能块的集合中包括在实现预定的任务时所被调用的且依预定调用顺序排列的一个或多个功能块,并根据实现预定的任务时被调用的顺序选取匹配大小的功能块作为安装包,即按照基于所述下载请求所确定的需求的所述安装包大小,从各个功能块的集合中选择出大小最接近且不超过所述安装包大小的功能块的集合,加入到所述安装包内。通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
第五方面,本申请提供一种提供应用的安装包下载的服务器,包括请求接收模块和应用提供模块。具体地,请求接收模块用于接收下载目标应用的安装包下载安装包的下载请求,所述下载请求中包括动态信息,其中,所述动态信息是在所述下载请求生成时从所述终端设备中读取的反映所述终端设备当前运行能力的状态信息。其中,运行能力的状态信息是动态的,可能会随时间的推移而动态变化,可以包括终端设备的存储模块的状态、通信模块的状态、及处理器的状态等。应用提供模块用于提供基于所述下载请求所确定的安装包,其中,所述目标应用具有完整安装包,基于所述下载请求所确定的安装包是所述完整安装包的子集。也就是说,基于所述下载请求所确定的安装包的大小可以等于完整安装包大小,也可以小于完整包装包的大小,当基于所述下载请求所确定的安装包小于完整安装包时,需要对完整安装包进行裁切,以实现满足下载请求的安装包。
根据本申请的实施例方式,基于终端设备的动态信息得到安装包,用户可以通过一次下载得到该安装包,该安装包能够最大限度的满足用户对安装包的需求,提高用户的安装体验和后续使用连贯性体验。
在上述第五方面的一种可能的实现中,所述下载请求包括静态信息,所述静态信息是反映所述终端设备的静态设备信息,进一步地,静态信息可以包括:设备类型、***版本、设备CPU平台、分辨率和编解码能力中的一个或多个。
在上述第五方面的一种可能的实现中,所述动态信息可以包括所述终端设备的网络状态,也就是说,下载请求中包括终端设备的在发送下载请求时的网络状态,如,网速、网络类型(例如,4G、wifi、5G)等,具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在下载安装包时,若基于所述网络状态所确定的安装包大小小于完整安装包大小时,则需要对完整安装包进行裁切,即对所述完整安装包中的各功能块进行裁切,并保留所述完整安装包中的剩余的功能块的集合,其中,功能块的集合为与所述网络状态相对应的安装包,该安装包能够满足用户对下载时间或/和流量的消耗的要求。
在上述第五方面的一种可能的实现中,所述动态信息包括所述终端设备的存储状态,即终端设备当前的存储空间大小。具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于所述存储状态所确定的安装包大小小于完整安装包大小时,服务器需要对完整安装包进行裁切,即对所述完整安装包中的各功能块进行裁切,并保留所述完 整安装包中的剩余的功能块的集合,其中,功能块的集合为与所述下载请求相对应的安装包,该安装包能够满足用户的终端设备的存储空间。
在上述第五方面的一种可能的实现中,所述动态信息包括所述终端设备的网络状态和存储状态。其中,网络状态,如,网速、网络类型(例如,4G、wifi、5G)等,存储状态,存储空间大小,具体地,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,在确定所述安装包时,若基于所述终端设备的所述动态信息的网络状态,对所述完整安装包进行第一次裁切,在完整安装包经过第一次裁切后,基于所述动态信息中的存储状态,对所述完整安装包中的剩余的功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足用户的下载时间和/或流量的消耗的基础上,同时满足终端设备的存储空间。
或者,可以基于所述终端设备的所述动态信息的存储状态,对所述完整安装包进行第一次裁切,在完整安装包经过第一次裁切后,基于所述动态信息中的网络状态,对所述完整安装包中的剩余的功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足终端设备的存储空间的基础上,同时满足用户的对下载时间和/或流量消耗的要求。
在上述第五方面的一种可能的实现中,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块而得到的安装包,通过以下方式获得:所述完整安装包中的多个功能块具有预定的优先级排列,其中,预定的优先级排序可以通过用户的使用优先级在裁切前进行排序,并且安装包中各功能块能够实现其功能为基础进行优先下载,所述完整安装包中的优先级低的功能块将被裁掉,直到被保留的功能块的大小匹配所述安装包大小,即被保留的功能块的大小总和最接近且不超过所述安装包的大小,其中,所述安装包的大小基于所述下载请求而确定。通过该裁切方式,能够使安装包内包含使用率较高的功能块,能够避免使用率高的功能块的第二次下载,提升用户操作的连贯性体验。
在上述第五方面的一种可能的实现中,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块的步骤,包括:按照所述功能块的优先度表筛选规则得到所述安装包,所述功能块的优先度表描述所述功能块在所述目标应用被使用时的被调用优先程度,其中,调用优先程度可以体现目标应用的业务逻辑,以使安装包尽可能包含业务逻辑相关的功能块。
在上述第五方面的一种可能的实现中,所述功能块的优先度表筛选规则,包括:将所述完整安装包中的所述功能块按照所述目标应用被使用时的被调用优先程度逐层排序,具有同一调用顺序的功能块处于同一层中,其中同一调用顺序内的功能块之间的功能是并列关系,也就是说,各功能块之间的功能互不影响;以功能块所处的层作为主排序依据,以功能块的大小作为次排序依据,按照层的被调用顺序从先到后,并且功能块的大小从小到大的方式,对功能块进行排序,并根据优先级来选取匹配大小的功能块作为安装包,即按照功能块的排序的前后顺序进行功能块的累加,直到当累加在一起的各层的功能块的大小总和最接近且不超过所述安装包大小,其中,所述安装包大小基于所述下载请求而确定;将累加的所述功能块作为保留的功能块,被加入到所述安装包内,未进行累加的所述功能块被裁切掉。通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
在上述第五方面的一种可能的实现中,所述功能块的优先度表筛选规则,包括:所述完整安 装包中的所述功能块按照实现的任务不同被分为多个功能块的集合,其中每一功能块的集合中包括在实现预定的任务时所被调用的且依预定调用顺序排列的一个或多个功能块,并根据实现预定的任务时被调用的顺序选取匹配大小的功能块作为安装包,即按照基于所述下载请求所确定的需求的所述安装包大小,从各个功能块的集合中选择出大小最接近且不超过所述安装包大小的功能块的集合,加入到所述安装包内。通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
第六方面,本申请提供一种安装包分发***,包括:上述第四方面的所述的终端设备;以及上述第五方面的所述的提供应用的安装包下载的服务器。
第七方面,本申请提供一种电子设备,包括处理器和存储器,所述存储器中存储有指令,所述处理器用于读取所述存储器中存储的所述指令,以执行上述实施例第一方面或第二方面所述的方法。
第八方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,该指令在计算机上执行时使所述计算机执行上述实施例第一方面或第二方面所述的方法。
图1是根据本申请一个实施例提供的安装包的分发的场景图;
图2是根据本申请一个实施例提供的电子设备的结构示意图;
图3是根据本申请一个实施例提供的电子设备的软件结构框图;
图4是根据本申请一个实施例的完整安装包的结构示意图;
图5是根据本申请一个实施例的安装包的下载方法的流程图;
图6是根据本申请一个实施例的安装包的获得方法的流程图;
图7是根据本申请一个实施例的优先度表筛选规则的流程图;
图8是根据本申请一个实施例的优先度表的结构图;
图9是根据本申请另一个实施例的优先度表筛选规则的流程图;
图10是根据本申请一个实施例的安装包的分发方法的流程图;
图11是根据本申请一些实施例的终端设备的结构示意图;
图12是根据本申请一些实施例的服务器的结构示意图;
图13是根据本申请一些实施例的安装包的安装包的分发***的结构示意图;
图14是根据本申请一些实施例的一种设备的框图;
图15是根据本申请一些实施例的一种片上***(SoC)的框图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
可以理解的是,如本文所使用的,术语“模块”可以指代或者包括专用集成电路(ASIC)、电子电路、执行一个或多个软件或固件程序的处理器(共享、专用、或群组)和/或存储器、组合逻辑 电路、和/或提供所描述的功能的其他适当硬件组件,或者可以作为这些硬件组件的一部分。
可以理解的是,在本申请各实施例中,处理器可以是微处理器、数字信号处理器、微控制器等,和/或其任何组合。根据另一个方面,所述处理器可以是单核处理器,多核处理器等,和/或其任何组合。下面将结合附图对本申请的实施例作进一步地详细描述。
根据本申请的一些实施例,公开了一种安装包的分发的场景图。图1是根据本申请一个实施例的安装包分发的场景图。如图1所示,该场景中包括开发者电脑103、服务器101以及终端设备102,终端设备是电子设备中的一种,具体地,终端设备102可以但非限制性的为手机、手表、智能音箱、平板电脑、PC端电脑、电视、车载控制设备等互联网设备,服务器101可以为提供应用的安装包下载的服务器,例如应用市场服务器,开发者将完整安装包按照各自实现的功能不同拆分成多个功能块,并将该完整安装包通过开发者电脑103上传至服务器101中,用户在终端设备102侧安装应用时,通过终端设备102向服务器101发起安装包的下载请求,服务器101接收该下载请求,并基于该下载请求得到一个对应该下载请求的安装包,并由终端设备102接收该安装包。其中,该安装包可以是未经过服务器101裁切的适应该下载请求的包含所有功能块的完整安装包,也可以是服务器101基于终端设备的下载请求对完整安装包中的功能块进行对应地裁切后而得到的适应该下载请求的功能块的集合,也可以是基于预设情形,例如针对不同的网络速度、网络类型、存储能力提供的各种具有不同大小的安装包的选项,举例来说,可以被分为快速版下载版、精简版安装包、完整版安装包等。可以理解的是,这样的不同的安装包的选项可以是以“堆叠”的方式,在实现最基本的功能的基础按照包的基础上,通过堆叠不同类型的功能片,提供的多种不同大小的安装包的选项。
下面结合附图对本申请实施例的实施方式进行详细的描述。
请参考图2,图2示出了本申请的电子设备100的结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
根据本申请的一些实施例,内部存储器121内存储有指令,处理器110读取内部存储器121中存储的所述指令,以执行本申请中的安装包的下载方法,具体可参照下面实施例的安装包的下载方法。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit, NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等***器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与***设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM), 近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯***(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技术等。所述GNSS可以包括全球卫星定位***(global positioning system,GPS),全球导航卫星***(global navigation satellite system,GLONASS),北斗卫星导航***(beidou navigation satellite system,BDS),准天顶卫星***(quasi-zenith satellite system,QZSS)和/或星基增强***(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码 器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例 中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。 可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过***SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时***多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
电子设备100的软件***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android***为例,示例性说明电子设备100的软件结构。
图3是本申请实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android***分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和***库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图3所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视 频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
下面结合具体的实施例对完整安装包的结构进行描述。
图4是根据本申请一个实施例的完整安装包的结构示意图,该完整安装包的结构中包括多个功能块,每个功能块下可以继续分出多个子功能块。开发者按照各自实现的功能不同将完整安装包拆分为多个功能块,其中,功能块也可以理解为能力片,完整安装包可以理解为全量应用包,下面以全量应用包和能力片对完整安装包的结构进行描述。如图4所示,全量应用包按照各自的功能被分为通用能力片1,能力片2,能力片3,分别适于不同的终端设备安装的能力片4、能力片5和能力片6、以及反映设备的静态信息的能力片等,其中,该能力片中包括设备的静态信息 包括用于描述关于终端设备的静态设备信息,如描述文件、可执行文件、通用资源、中央处理器(Central Processing Unit,CPU)平台相关文件(如Arm32等)、分辨率相关文件(如,高、中、低分辨率等),语言相关文件(如,中文等)、编解码相关文件(如,H.255等)。该完整安装包可以根据设备的静态信息来确定,如终端设备为手机,且该手机的分辨率为高分辨率时,可以确定一个适用手机下载的且具有高分辨率的完整安装包。
其中,在终端设备向服务器发送一次下载请求后,服务器基于该下载请求可以得到一个安装包,该安装包内包含了尽可能多的能力片,终端设备可以通过一次下载获得该安装包,尽可能避免用户第二次下载,提高用户操作的连贯性体验。
基于上面的描述,下面具体介绍终端设备102的主要工作流程。
根据本申请的一些实施例,图5是根据本申请一个实施例的安装包的下载方法的流程图,该方法可由图2中的电子设备100执行,下面以具体的实施例来介绍安装包的下载方法,具体包括以下步骤:
步骤S301,终端设备发送下载目标应用的安装包的下载请求,下载请求中包括动态信息。
动态信息是在下载请求生成时从终端设备中读取的、反映终端设备当前运行能力的状态信息。其中,终端设备可以但非限制性的为手机、手表、智能音箱、平板电脑、PC端电脑、电视、车载控制设备等互联网设备。运行能力的状态信息包括终端设备的存储模块的状态、通信模块的状态、及处理器的状态等。更具体地而言,包括存储状态、网络状态、CPU负荷状态等。这样的状态信息是动态的,可能会随时间的推移而动态变化,例如存储状态、CPU负荷状态,也可能随终端所处位置变化而动态变化,例如网络状态。
步骤S302,终端设备接收基于下载请求所确定的安装包。
具体地,目标应用具有完整安装包,基于下载请求所确定的安装包是完整安装包的子集,其中,子集包括完整安装包本身。也就是说,基于下载请求所确定的安装包的大小可以等于完整安装包大小,也可以小于完整安装包的大小,当基于下载请求所确定的安装包小于完整安装包时,需要对完整安装包进行裁切,以实现满足下载请求的安装包。
需要说明的是,目标应用的完整安装包可以通过终端设备的静态设备信息而确定适应该终端设备的完整安装包,其中,静态设备信息可以包括设备类型、***版本、设备CPU平台、分辨率和编解码能力中的一个或多个。例如,在下载请求中,包括终端设备的设备的类型,如、手机或是桌上电脑等,根据设备的类型选取适应该设备的完整安装包,又如,电脑的CPU平台是32位或是64位的,根据该电脑的CPU平台的处理能力选取适应该电脑的完整安装包。也可以是几种信息的结合确定完整安装包,在此并不作为限定。
根据本申请的实施例方式,在下载安装包时,基于终端设备的动态信息得到安装包,可以通过一次下载来最大限度的满足用户对安装包的需求,提高用户的安装体验和后续使用连贯性体验。根据本申请的一个实施例,动态信息包括网络状态,其中网络状态可以包括网速以及网络类型(如,4G、wifi、5G)等。终端设备接收基于网络状态确定的安装包。例如,当终端设备发送下载目标应用的安装包的下载请求时,下载请求中包括的网络状态为4G,此时考虑到用户的流量的消耗的问题,若下载完整安装包,可能会消耗掉用户较多的流量,此时,作为一种实现方式,可以通过对完整安装包中的功能块进行裁切,以满足用户对流量消耗的要求。当用户的网速较慢时,此时需要考虑用户的下载时间,例如用户通常下载应用的时间平均在5秒左右,而结合用户当前的网速下载完整安装包可能需要5分钟的时间,此时,可以基于用户通常的下载时间将完整安装包中 的部分功能块裁切掉,以满足客户对下载时间的要求。当然本申请还可以同时根据网速和网络类型对完整的安装包进行裁切,以同时满足用户对下载时间和流量消耗的要求。
根据本申请的一个实施例,动态信息包括存储状态,终端设备接收基于存储状态所确定的安装包。例如,当终端设备的存储状态为仅有2G的存储空间,下载完整安装包需要占据3G的存储空间,此时,需要对完整安装包内的功能块进行裁切,使完整安装包内剩余的功能块的集合的大小小于或等于2G,并将裁切后的剩余的功能块的集合作为基于存储状态确定的安装包,该安装包可以满足终端设备的存储空间的大小。
根据本申请的另一个实施例,动态信息包括网络状态和存储状态,终端设备接收基于网络状态和存储状态所确定的安装包。其中网络状态包括网速、网络类型(如,4G、wifi、5G)等,存储状态为存储空间,根据动态信息的两种状态的先后顺序可以包括两种裁切的方式。
例如,当优选考虑用户的网络状态时,首先基于动态信息的网络状态对完整安装包内的功能块进行第一次裁切,在完整安装包经过第一次裁切后,基于动态信息中的存储状态,对完整安装包中的剩余的功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足用户的下载时间和/或流量的消耗的基础上,同时满足终端设备的存储空间。
当优先考虑用户的存储状态时,可以基于动态信息的存储状态,对完整安装包进行第一次裁切,在完整安装包经过第一次裁切后,基于动态信息中的网络状态,对完整安装包中的剩余的功能块进行第二次裁切,保留经过两次裁切后的完整安装包内剩余的功能块的集合,该功能块的集合即为用户需求的安装包。该安装包可以在满足终端设备的存储空间的基础上,同时满足用户的对下载时间和/或流量消耗的要求。
可以理解的是,对于存储状态和网络状态的优先顺序均是为满足下载请求为前提,在下载时,具体是存储状态优先还是网络状态优先在此并不作为限定。
根据本申请的一个优选实施例,基于下载请求所确定的安装包需要对完整安装包中的功能块进行裁切得到时,具体地可以通过以下方法获得,图6是根据本申请一个实施例的安装包的获得方法的流程图,如图6所示,该方法具体包括以下步骤:
S401,完整安装包中的多个功能块具有预定的优先级排列。
其中,预定的优先级排序可以通过用户的使用优先级在裁切前进行排序,使用优先级可以根据大数据平台中下载次数进行统计,将下载次数最多的功能模块作为使用优先级最高的功能块,以此进行排序,得到预定的优先级排列,例如,当用户下载娱乐应用程序(Application,APP)时,该娱乐APP的完整安装包包括:电影、音乐、读书、绘画等功能块,根据大数据平台统计,该娱乐APP中,电影被下载次数为90次,音乐为80次,读书为60次,绘画为5次,根据安装包的大小优先下载电影,其次音乐,以此排列,得到基于使用频率的优先级排序。
S402,完整安装包中的优先级低的功能块将被裁掉,直到被保留的功能块的大小总和最接近且不超过安装包的大小。其中,安装包的大小基于下载请求而确定。例如,将使用频率(下载次数)较低的绘画裁掉,得到使用频率较高的功能块的集合,该集合接近且不超过安装包的大小。通过该获得方式,以使得安装包内包含使用率较高的功能块,能够避免使用率高的功能块的第二次下载,提升用户操作的连贯性体验。
根据本申请的另一个优选实施例,基于下载请求所确定的安装包需要对完整安装包中的功能块进行裁切得到时,具体地可以通过以下方法获得,即按照功能块的优先度表筛选规则得到安装 包。其中,功能块的优先度表描述功能块在目标应用被使用时的被调用优先程度,调用优先程度能够体现目标应用的业务逻辑,其中,业务逻辑以实现功能块的功能为基础。通过该优先度表筛选规则获得的安装包,尽可能多的包含业务逻辑相关的功能块。
根据本申请的一个实施例,图7为本申请一个实施例的优先度表筛选规则的流程图,如图7所示,该优先度表筛选规则具体包括以下步骤:
步骤S501,将完整安装包中的功能块按照目标应用被使用时的被调用优先程度逐层排序。
其中,具有同一调用顺序的功能块处于同一层中,其中同一调用顺序内的功能块(能力片)之间的功能是独立的,也就是说,同一层中的各功能块之间的功能互不影响。
图8为本申请一个实施例的优先度表的结构图,如图8所示,包括主入口页面,即能力片0,处于0层,主入口页面下包括:能力片1到能力片7共7个子能力片,其中,能力片1,能力片2和能力片3为主入口页面下的相互独立的子功能块,处于1层,能力片4和能力片5为能力片1下面的互相独立的子功能块,能力片3包括能力片7子功能块,能力片4、能力片5和能力片7处于3层,能力片4包括能力片6子动能块,能力片6处于4层。在实现1层中各能力片的功能时,必须先有0层的能力片0,被调用优先程度逐层排序。例如,以下载华为视频APP为例,按照功能划分为,APP主入口页面即(0层),主入口下面包括电视、电影两个功能块,处于1层,当要实现1层内的各功能块的功能,首先优先调用APP主入口页面(0层),以此作为被调用优先程度逐层排序。
步骤S502,将以功能块所处的层作为主排序依据,以功能块的大小作为次排序依据,按照层的被调用顺序从先到后,并且功能块的大小从小到大的方式,对功能块进行排序,并且按照功能块的排序的前后顺序进行功能块的累加。
其中,安装包的大小基于下载请求而确定。如图8所示,首先按照层的被调用顺序排序从先到后,即首先0层,其次1层、再其次2层,再其次3层的顺序对各层内的功能块进行累加,当只能相加到层级2层时,将层级2层内的能力片4、能力片5和能力片6按照从小到大的顺序排列进行累加,直到当累加在一起的功能块的大小总和最接近且不超过安装包大小。
步骤S503,将累加的功能块作为保留的功能块,被加入到安装包内,未进行累加的功能块被裁切掉。
通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
根据本申请的另一个实施例,图9是根据本申请另一个实施例的优先度表筛选规则的流程图,如图9所示,该优先度表筛选规则具体包括以下步骤:
步骤S701,完整安装包中的功能块按照实现的任务不同被分为多个功能块的集合。
其中每一功能块的集合中包括在实现预定的任务时所被调用的且依预定调用顺序排列的一个或多个功能块。其中,实现预定的任务即预定完成一件任务需要哪些必备的功能块,例如看一部电影,首先要有主入口页面,其次是电影这一功能块,再其次是需求的电影,若要实现看一部电影的任务,必须具备主入口页面(功能块)和电影(功能块)。
结合图8所示,按照实现的任务不同被分为多个功能块的集合可以包括以下几种功能块的集合,第一种集合为:能力片0(主入口页面)+能力片1+能力片4;第二种集合为:能力片(主入口页面)+能力片1+能力片5+能力片6;第三种集合为:能力片(主入口页面)+能力片2;第四种集合为:能力片(主入口页面)+能力片3+能力片7。
步骤S702,按照基于下载请求所确定的需求的安装包大小,从各个功能块的集合中选择出大小最接近且不超过安装包大小的功能块的集合,加入到安装包内。例如,如图8所示,当基于下载请求所确定的安装包大小为10M,第一种集合的功能块大小之和为9M,第二种集合的功能块大小之和为5M,第三种集合的功能块大小之和为8M,第四种集合的功能块大小之和为6M,则选择第一种集合中的功能块的集合作为所确定的安装包。
此外,本申请的其他实施例中,在实现某一任务的功能块的集合远小于需求的安装包时,也可以是实现几种任务的功能块的集合。
根据本申请的实施例,通过该筛选方式获得的安装包,最大限度的包含了与目标应用的业务逻辑相关的功能块,避免与业务逻辑相关功能块的二次下载和安装,提升用户操作的连贯性体验。
根据本申请的一些实施例,基于下载请求所确定的安装包,需要对完整安装包中的功能块进行裁切得到时,具体地,还可以通过其他的方法获得,例如将各功能块按照名字或大小排序,也可以是对功能块随机筛选。以减少用户下载安装的等待时间,裁剪后的安装包无冗余安装文件,满足用户安装体验的同时,尽可能多的一次性下载更多的功能块,提升用户在应用安装完成后的连贯性操作体验。
根据本申请的一个实施例,该方法还包括从接收到的安装包中提取文件,写入所述终端的安装目录中,完成目标应用的安装,可以通过调用终端设备中的解压程序,从安装包中解压安装包中的文件,并在终端设备的安装目录中写入所解压出的文件,其中,安装目录为预先设定,或,用户通过终端设备的界面所选定的。该安装包能够尽可能一次性满足用户对目标应用的需求,提升用户操作的连贯性体验。
基于上面的描述,下面具体介绍服务器的主要工作流程。
根据本申请的一些实施例,图10为本申请一个实施例的安装包的分发方法的流程图,该方法可由图1中的服务器执行,下面以具体的实施例来介绍安装包的分发方法,如图10所示,该方法具体包括以下步骤:
步骤S801,接收下载目标应用的安装包的下载请求,下载请求中包括终端设备的动态信息。其中,动态信息是在下载请求生成时从终端设备中读取的、反映终端设备当前运行能力的状态信息。其中,终端设备可以但非限制性的为手机、手表、智能音箱、平板电脑、PC端电脑、电视、车载控制设备等互联网设备,服务器可以用于提供安装包的服务器,如应用市场服务器。运行能力的状态信息包括终端设备的存储模块的状态、通信模块的状态、及处理器的状态等。更具体地而言,包括存储状态、网络状态、CPU负荷状态等。这样的状态信息是动态的,可能会随时间的推移而动态变化,例如存储状态、CPU负荷状态,也可能随终端所处位置变化而动态变化,例如网络状态。
步骤S802,提供基于下载请求所确定的安装包,其中目标应用具有完整安装包,基于下载请求所确定的安装包是完整安装包的子集。其中,子集包括完整安装包本身。也就是说,基于下载请求所确定的安装包的大小可以等于完整安装包大小,也可以小于完整安装包的大小,当基于下载请求所确定的安装包小于完整安装包时,需要对完整安装包进行裁切,以实现满足下载请求的安装包。
需要说明的是,目标应用的完整安装包可以通过终端设备的静态设备信息而确定适应该终端设备的完整安装包,其中,静态设备信息可以包括设备类型、***版本、设备CPU平台、分辨率和编解码能力中的一个或多个。例如,在下载请求中,包括终端设备的设备的类型,如、手机或 是桌上电脑等,根据设备的类型选取适应该设备的完整安装包,又如,电脑的CPU平台是32位或是64位的,根据该电脑的CPU平台的处理能力选取适应该电脑的完整安装包。也可以是几种信息的结合确定完整安装包,在此并不作为限定。根据本申请的实施例方式,基于终端设备的动态信息得到安装包,用户可以通过一次下载得到该安装包,该安装包能够最大限度的满足用户对安装包的需求,提高用户的安装体验和后续使用连贯性体验。
本申请中的基于下载请求所确定的安装包的确定方法在上述实施例中已经详细的说明,具体可参见上述实施例安装包的下载方法中的相关描述,在此不再赘述。
基于上面的描述,下面具体介绍安装包的下载方法,该方法应用于终端设备和应用市场服务器。其中,终端设备实施上述实施例的安装包的下载方法,应用服务器实施上述实施例的安装包的分发方法。由于安装包的下载方法和安装包的分发方法在上述实施例中已经详细的说明,在此不再赘述。
根据本申请的一些实施例,公开了一种终端设备900。图11是根据本申请一些实施例的终端设备900的结构示意图。该终端设备900可以执行上述各实施例中的安装包的下载方法。具体地,如图11所示,该终端设备包括:
发送模块901,发送下载目标应用的安装包的下载请求,下载请求中包括动态信息,其中,动态信息是在下载请求生成时从终端设备中读取的、反映终端设备当前运行能力的状态信息。运行能力的状态信息包括终端设备的存储模块的状态、通信模块的状态、及处理器的状态等。更具体地而言,包括存储状态、网络状态、CPU负荷状态等。这样的状态信息是动态的,可能会随时间的推移而动态变化,例如存储状态、CPU负荷状态,也可能随终端所处位置变化而动态变化,例如网络状态。
接收模块902,接收基于下载请求所确定的安装包,其中目标应用具有完整安装包,基于下载请求所确定的安装包是完整安装包的子集。其中,子集包括完整安装包本身。也就是说,基于下载请求所确定的安装包的大小可以等于完整安装包大小,也可以小于完整安装包的大小,当基于下载请求所确定的安装包小于完整安装包时,需要对完整安装包进行裁切,以实现满足下载请求的安装包。
本申请中的接收模块接收基于下载请求所确定的安装包,具体的安装包的确定过程在上述实施例中已经详细的说明,具体可参见上述实施例安装包的下载方法中的相关描述,在此不再赘述。
根据本申请的实施例方式,终端设备900在下载安装包时,基于终端设备的动态信息得到安装包,可以通过一次下载来最大限度的满足用户对安装包的需求,提高用户的安装体验和后续使用连贯性体验。
根据本申请的一些实施例,公开了一种应用的安装包下载的服务器1000。图12是根据本申请一些实施例的服务器的结构示意图。该服务器可以执行上述各实施例中安装包的分发方法。具体地,如图12所示,该服务器1000包括:
请求接收模块1001,用于接收下载目标应用的安装包的下载请求,下载请求中包括终端设备的动态信息。其中,动态信息是在下载请求生成时从终端设备中读取的、反映终端设备当前运行能力的状态信息。其中,终端设备可以但非限制性的为手机、手表、智能音箱、平板电脑、PC端电脑、电视、车载控制设备等互联网设备,服务器可以用于提供安装包的服务器,如应用市场服务器。运行能力的状态信息包括终端设备的存储模块的状态、通信模块的状态、及处理器的状态等。更具体地而言,包括存储状态、网络状态、CPU负荷状态等。这样的状态信息是动态的,可 能会随时间的推移而动态变化,例如存储状态、CPU负荷状态,也可能随终端所处位置变化而动态变化,例如网络状态。
应用提供模块1002,用于提供基于下载请求所确定的安装包,其中目标应用具有完整安装包,基于下载请求所确定的安装包是完整安装包的子集。其中,子集包括完整安装包本身。也就是说,基于下载请求所确定的安装包的大小可以等于完整安装包大小,也可以小于完整安装包的大小,当基于下载请求所确定的安装包小于完整安装包时,需要对完整安装包进行裁切,以实现满足下载请求的安装包。
本申请中的接收模块应用提供模块提供基于下载请求所确定的安装包,具体的安装包的确定过程在上述实施例中已经详细的说明,具体可参见上述实施例安装包的分发方法中的相关描述,在此不再赘述。
根据本申请的实施例方式,服务器1000基于终端设备的动态信息和静态信息得到安装包,用户可以通过一次下载得到该安装包,该安装包能够最大限度的满足用户对安装包的需求,提高用户的安装体验和后续使用连贯性体验。
根据本申请的一些实施例,公开了一种安装包的分发***。图13是根据本申请一些实施例的安装包的分发***的结构示意图。如图13所示,该***包括上述实施例的终端设备和提供应用的安装包下载的服务器,其中终端设备和提供应用的安装包下载的服务器的结构及功能在上述实施例中已经详细的说明,在此不再赘述。
现在参考图14,所示为根据本申请的一个实施例的设备1200的框图。设备1200可以包括耦合到控制器中枢1203的一个或多个处理器1201。对于至少一个实施例,控制器中枢1203经由诸如前端总线(FSB)之类的多分支总线、诸如快速通道互连(QPI)之类的点对点接口、或者类似的连接1206与处理器1201进行通信。处理器1201执行控制一般类型的数据处理操作的指令。在一实施例中,控制器中枢1203包括,但不局限于,图形存储器控制器中枢(GMCH)(未示出)和输入/输出中枢(IOH)(其可以在分开的芯片上)(未示出),其中GMCH包括存储器和图形控制器并与IOH耦合。
设备1200还可包括耦合到控制器中枢1203的协处理器1202和存储器1204。或者,存储器和GMCH中的一个或两者可以被集成在处理器内(如本申请中所描述的),存储器1204和协处理器1202直接耦合到处理器1201以及控制器中枢1203,控制器中枢1203与IOH处于单个芯片中。存储器1204可以是例如动态随机存取存储器(DRAM)、相变存储器(PCM)或这两者的组合。在一个实施例中,协处理器1202是专用处理器,诸如例如高吞吐量MIC处理器、网络或通信处理器、压缩引擎、图形处理器、GPGPU、或嵌入式处理器等等。协处理器1202的任选性质用虚线表示在图14中。
存储器1204作为计算机可读存储介质,可以包括用于存储数据和/或指令的一个或多个有形的、非暂时性计算机可读介质。例如,存储器1204可以包括闪存等任何合适的非易失性存储器和/或任何合适的非易失性存储设备,例如一个或多个硬盘驱动器(HDD(s)),一个或多个光盘(CD)驱动器,和/或一个或多个数字通用光盘(DVD)驱动器。
该存储器1204可以包括***1200的装置上的一部分存储资源,或者它可以由设备访问,但不一定是设备的一部分。例如,可以经由网络接口1206通过网络访问。在一个实施例中,设备1200可以进一步包括网络接口(NIC)1206。网络接口1206可以包括收发器,用于为设备1200提供无线电接口,进而与任何其他合适的设备(如前端模块,天线等)进行通信。在各种实施例 中,网络接口1206可以与设备1200的其他组件集成。网络接口1206可以实现上述实施例中的通信单元的功能。
设备1200可以进一步包括输入/输出(I/O)设备1205。I/O 1205可以包括:用户界面,该设计使得用户能够与设备1200进行交互;***组件接口的设计使得***组件也能够与设备1200交互;和/或传感器设计用于确定与设备1200相关的环境条件和/或位置信息。
值得注意的是,图14仅是示例性的。即虽然图12中示出了设备1200包括处理器1201、控制器中枢1203、存储器1204等多个器件,但是,在实际的应用中,使用本申请各方法的设备,可以仅包括设备1200的各器件中的一部分器件,例如,可以仅包含处理器1201和NIC1206。图12中可选器件的性质用虚线示出。
根据本申请的一些实施例,作为计算机可读存储介质的存储器1204上存储有指令,该指令在计算机上执行时使***1200执行根据上述实施例中的安装包的下载方法或安装包的分发方法,具体可参照上述实施例的方法,在此不再赘述。
现在参考图15,所示为根据本申请的一实施例的SoC(System on Chip,片上***)1300的框图。在图15中,相似的部件具有同样的附图标记。另外,虚线框是更先进的SoC的可选特征。在图15中,SoC130包括:互连单元1350,其被耦合至处理器1310;***代理单元1380;总线控制器单元1390;集成存储器控制器单元1340;一组或一个或多个协处理器1320,其可包括集成图形逻辑、图像处理器、音频处理器和视频处理器;静态随机存取存储器(SRAM)单元1330;直接存储器存取(DMA)单元1360。在一个实施例中,协处理器1320包括专用处理器,诸如例如网络或通信处理器、压缩引擎、GPGPU、高吞吐量MIC处理器、或嵌入式处理器等等。
静态随机存取存储器(SRAM)单元1330中可以包括用于存储数据和/或指令的一个或多个计算机可读介质。计算机可读存储介质中可以存储有指令,具体而言,存储有该指令的暂时和永久副本。该指令可以包括:由处理器中的至少一个单元执行时使Soc1300执行根据上述实施例中的安装包的下载方法或安装包的分发方法,具体可参照上述实施例的方法,在此不再赘述。
本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程***上执行的计算机程序或程序代码,该可编程***包括至少一个处理器、存储***(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理***包括具有诸如例如数字信号处理器(DSP)、微控制器、专用集成电路(ASIC)或微处理器之类的处理器的任何***。
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理***通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。
在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读介质分发。因此,机器可读介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(ROM)、随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、电 可擦除可编程只读存储器(EEPROM)、磁卡或光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读介质包括适合于以机器(例如,计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读介质。
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。
Claims (19)
- 一种安装包的下载方法,其特征在于,包括:终端设备发送下载目标应用的安装包的下载请求,所述下载请求中包括动态信息,其中,所述动态信息是在所述下载请求生成时从所述终端设备中读取的、反映所述终端设备当前运行能力的状态信息;所述终端设备接收基于所述下载请求所确定的安装包,基于所述下载请求所确定的安装包是所述目标应用的完整安装包的子集。
- 根据权利要求1所述的方法,其特征在于,所述动态信息包括所述终端设备的网络状态和/或存储状态。
- 根据权利要求2所述的方法,其特征在于,所述网络状态包括网络类型和/或网速,所述存储状态包括所述终端设备剩余的存储空间大小。
- 根据权利要求1-3中任一项所述的方法,其特征在于,还包括:从接收到的所述安装包中提取文件,写入所述终端设备的安装目录中,完成所述目标应用的安装。
- 根据权利要求4所述的方法,其特征在于,所述安装目录为预先设定,或,用户通过终端设备的界面所选定的。
- 根据权利要求1所述的方法,其特征在于,进一步所述下载请求包括静态信息,所述静态信息包括:设备类型、***版本、设备CPU平台、分辨率和编解码能力中的一个或多个。
- 一种安装包的分发方法,其特征在于,包括:接收下载目标应用的安装包的下载请求,所述下载请求中包括终端设备的动态信息,其中,所述动态信息是在所述下载请求生成时从所述终端设备中读取的、反映所述终端设备当前运行能力的状态信息;提供基于所述下载请求所确定的安装包,基于所述下载请求所确定的安装包是所述目标应用的完整安装包的子集。
- 根据权利要求7所述的方法,其特征在于,所述动态信息包括所述终端设备的网络状态和/或存储状态。
- 根据权利要求8所述的方法,其特征在于,所述网络状态包括网络类型和/或网速,所述存储状态为所述终端设备剩余的储存空间大小。
- 根据权利要求7-9中任一项所述的方法,其特征在于,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,并且提供基于所述下载请求所确定的安装包的步骤包括,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块而得到的安装包。
- 根据权利要求10所述的方法,其特征在于,解析所述完整安装包中附带的属性表,以确定所述安装包中基于按照各自实现的功能不同被分成的各个功能块。
- 根据权利要求8所述的方法,其特征在于,所述动态信息包括所述终端设备的网络状态和存储状态,所述完整安装包能够按照各自实现的功能不同被分成多个功能块,并且提供基于所述下载请求所确定的安装包的步骤包括,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块,其中,对所述完整安装包中的各功能块进行裁切的步骤,包括:基于所述动态信息的其中一状态信息,对所述完整安装包进行第一次裁切,以及基于所述动态信息中的另一状态信息,对被所述第一次裁切后的所述完整安装包中的剩余的功能块进行第二次裁切。
- 根据权利要求10或12任一项所述的方法,其特征在于,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块的步骤,包括:所述完整安装包中的多个功能块具有预定的优先级排列,所述完整安装包中的优先级低的功能块将被裁掉,直到被保留的功能块大小匹配所述安装包大小,其中,所述安装包大小基于所述下载请求而确定。
- 根据权利要求10或12任一项所述的方法,其特征在于,对所述完整安装包中的各功能块进行裁切后,保留与所述下载请求相对应的功能块的步骤,包括:按照所述功能块的优先度表筛选规则得到所述安装包,所述功能块的优先度表描述所述功能块在所述目标应用被使用时的被调用优先程度。
- 根据权利要求14所述的方法,其特征在于,所述功能块的优先度表筛选规则,包括:将所述完整安装包中的所述功能块按照所述目标应用被使用时的被调用优先程度逐层排序,具有同一调用顺序的功能块处于同一层中;以功能块所处的层作为主排序依据,以功能块的大小作为次排序依据,按照层的被调用顺序从先到后,并且功能块的大小从小到大的方式,对功能块进行排序,并根据被使用时的调用优先级来选取匹配大小的功能块作为安装包。
- 根据权利要求14所述的方法,其特征在于,所述功能块的优先度表筛选规则,包括:所述完整安装包中的所述功能块按照实现的任务不同被分为多个功能块的集合,并根据实现预定的任务时被调用的顺序选取匹配大小的功能块作为安装包。
- 根据权利要求7所述的方法,其特征在于,进一步所述下载请求包括静态信息,所述静态信息包括:设备类型、***版本、设备CPU平台、分辨率和编解码能力中的一个或多个。
- 一种电子设备,其特征在于,包括处理器和存储器,所述存储器中存储有指令,所述处理器,用于读取所述存储器中存储的所述指令,以执行权利要求1-17任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有指令,该指令在计算机上执行时使所述计算机执行根据权利要求1-17任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911267641.2A CN112947947B (zh) | 2019-12-11 | 2019-12-11 | 安装包的下载方法、分发方法、终端设备、服务器及*** |
CN201911267641.2 | 2019-12-11 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021115112A1 true WO2021115112A1 (zh) | 2021-06-17 |
Family
ID=76234005
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/131058 WO2021115112A1 (zh) | 2019-12-11 | 2020-11-24 | 安装包的下载方法、分发方法、终端设备、服务器及*** |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112947947B (zh) |
WO (1) | WO2021115112A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114172876A (zh) * | 2021-11-29 | 2022-03-11 | 阿里巴巴(中国)有限公司 | 数据传输方法、装置及计算机存储介质 |
WO2024083114A1 (zh) * | 2022-10-20 | 2024-04-25 | 华为技术有限公司 | 一种软件分发方法、电子设备及*** |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113849200B (zh) * | 2021-12-01 | 2022-03-29 | 北京麟卓信息科技有限公司 | 一种安卓应用在安卓兼容环境中的安装优化方法及*** |
CN116737123A (zh) * | 2022-03-01 | 2023-09-12 | 华为技术有限公司 | 一种应用开发***、方法及设备 |
CN117499405A (zh) * | 2022-07-25 | 2024-02-02 | 华为云计算技术有限公司 | 一种数据包传输方法、装置及计算机设备 |
CN118233492A (zh) * | 2022-12-21 | 2024-06-21 | 华为技术有限公司 | 应用下载方法、服务器、电子设备及*** |
CN117573154B (zh) * | 2024-01-16 | 2024-04-12 | 麒麟软件有限公司 | Linux***上对基于electron的桌面应用安装包的优化方法及装置 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102129380A (zh) * | 2011-03-10 | 2011-07-20 | 宇龙计算机通信科技(深圳)有限公司 | 一种服务器及提供软件的方法、移动终端 |
US20140359601A1 (en) * | 2013-05-30 | 2014-12-04 | Microsoft Corporation | Resource package indexing |
CN106325908A (zh) * | 2015-06-30 | 2017-01-11 | 北京金山安全软件有限公司 | 一种应用程序包安装方法及应用程序包安装装置 |
CN107809491A (zh) * | 2017-11-30 | 2018-03-16 | 北京小米移动软件有限公司 | 安装包的下载方法及装置 |
-
2019
- 2019-12-11 CN CN201911267641.2A patent/CN112947947B/zh active Active
-
2020
- 2020-11-24 WO PCT/CN2020/131058 patent/WO2021115112A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102129380A (zh) * | 2011-03-10 | 2011-07-20 | 宇龙计算机通信科技(深圳)有限公司 | 一种服务器及提供软件的方法、移动终端 |
US20140359601A1 (en) * | 2013-05-30 | 2014-12-04 | Microsoft Corporation | Resource package indexing |
CN106325908A (zh) * | 2015-06-30 | 2017-01-11 | 北京金山安全软件有限公司 | 一种应用程序包安装方法及应用程序包安装装置 |
CN107809491A (zh) * | 2017-11-30 | 2018-03-16 | 北京小米移动软件有限公司 | 安装包的下载方法及装置 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114172876A (zh) * | 2021-11-29 | 2022-03-11 | 阿里巴巴(中国)有限公司 | 数据传输方法、装置及计算机存储介质 |
WO2024083114A1 (zh) * | 2022-10-20 | 2024-04-25 | 华为技术有限公司 | 一种软件分发方法、电子设备及*** |
Also Published As
Publication number | Publication date |
---|---|
CN112947947B (zh) | 2024-06-25 |
CN112947947A (zh) | 2021-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020259452A1 (zh) | 一种移动终端的全屏显示方法及设备 | |
WO2021115112A1 (zh) | 安装包的下载方法、分发方法、终端设备、服务器及*** | |
WO2021017889A1 (zh) | 一种应用于电子设备的视频通话的显示方法及相关装置 | |
WO2021213164A1 (zh) | 应用界面交互方法、电子设备和计算机可读存储介质 | |
US11573829B2 (en) | Task processing method and apparatus, terminal, and computer readable storage medium | |
WO2021017901A1 (zh) | 一种屏幕显示方法及电子设备 | |
US11861382B2 (en) | Application starting method and apparatus, and electronic device | |
EP4086780A1 (en) | File sharing method and system, and related device | |
CN112527476B (zh) | 资源调度方法及电子设备 | |
WO2020150917A1 (zh) | 一种应用权限的管理方法及电子设备 | |
WO2021253975A1 (zh) | 应用程序的权限管理方法、装置和电子设备 | |
CN113805797B (zh) | 网络资源的处理方法、电子设备及计算机可读存储介质 | |
CN113961157B (zh) | 显示交互***、显示方法及设备 | |
WO2021218429A1 (zh) | 应用窗口的管理方法、终端设备及计算机可读存储介质 | |
WO2022100141A1 (zh) | 插件管理方法、***及装置 | |
WO2022253158A1 (zh) | 一种用户隐私保护方法及装置 | |
WO2022179495A1 (zh) | 一种隐私风险反馈方法、装置及第一终端设备 | |
CN113741993B (zh) | 编译插件dex文件的方法及装置 | |
WO2022022674A1 (zh) | 应用图标布局方法及相关装置 | |
EP4228233A1 (en) | Method for adding operation sequence, electronic device, and system | |
CN112437341B (zh) | 一种视频流处理方法及电子设备 | |
WO2022242412A1 (zh) | 杀应用的方法及相关设备 | |
WO2021238376A1 (zh) | 功能包的加载方法、装置、服务器和电子设备 | |
CN114828098B (zh) | 数据传输方法和电子设备 | |
CN117724863A (zh) | 一种目标信号处理方法和电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20898656 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20898656 Country of ref document: EP Kind code of ref document: A1 |