WO2024131458A1 - 应用下载方法、服务器、电子设备及系统 - Google Patents
应用下载方法、服务器、电子设备及系统 Download PDFInfo
- Publication number
- WO2024131458A1 WO2024131458A1 PCT/CN2023/134487 CN2023134487W WO2024131458A1 WO 2024131458 A1 WO2024131458 A1 WO 2024131458A1 CN 2023134487 W CN2023134487 W CN 2023134487W WO 2024131458 A1 WO2024131458 A1 WO 2024131458A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- package
- electronic device
- server
- homepage
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 150
- 238000009434 installation Methods 0.000 claims abstract description 64
- 230000006870 function Effects 0.000 claims description 70
- 238000004590 computer program Methods 0.000 claims description 31
- 230000008569 process Effects 0.000 claims description 28
- 230000004044 response Effects 0.000 claims description 25
- 238000004891 communication Methods 0.000 description 38
- 230000000694 effects Effects 0.000 description 30
- 238000012545 processing Methods 0.000 description 22
- 238000010586 diagram Methods 0.000 description 16
- 238000007726 management method Methods 0.000 description 16
- 238000010295 mobile communication Methods 0.000 description 10
- 230000003287 optical effect Effects 0.000 description 7
- 238000011900 installation process Methods 0.000 description 6
- 238000013461 design Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 229920001621 AMOLED Polymers 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000014759 maintenance of location Effects 0.000 description 3
- 230000009467 reduction Effects 0.000 description 3
- 230000005236 sound signal Effects 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000036541 health Effects 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000003321 amplification Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000008571 general function Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000037361 pathway Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
Definitions
- the embodiments of the present application relate to the field of terminal technology, and in particular to an application downloading method, a server, an electronic device, and a system.
- some electronic devices can provide users with free installation application services.
- the electronic device responds to the user's operation and pulls up the free installation application for the first time, the user does not perceive the application installation process. This requires that the application package of the free installation application is small in size to provide users with a better free installation application experience.
- the present application provides an application downloading method, server, electronic device and system.
- the technical solution provided by the present application is that the server splits the application package of the application to be downloaded according to the information of the electronic device requesting to download the application, and retains the resources corresponding to the electronic device in the application package, thereby avoiding downloading unnecessary resources, reducing the size of the application package, thereby increasing the download speed of the application package and reducing the time consumption of application installation.
- an application download method is provided, which is applied to a server.
- the method includes: receiving a first application download request sent by an electronic device, wherein the first application download request carries device information of the electronic device and information of the first application requested to be downloaded. According to the information of the first application, a first application package corresponding to the first application is determined. According to the device information, the first application package is unpacked, and an entry package in the first application package is split into a basic package and other resource packages, wherein the basic package includes a collection of resources for the electronic device to run the first application. The basic package is sent to the electronic device.
- the server reserves the running resources required by the electronic device to run the application for downloading by the electronic device, reducing the size of the application package and avoiding the download of redundant resources, thereby increasing the application download speed. In addition, it can avoid the waste of download traffic caused by downloading redundant resources.
- the retention of running resources ensures that the electronic device can run the application normally after the application is downloaded, thereby effectively improving the speed at which the electronic device launches the application for the first time and reducing the user's waiting time, while meeting the user's application usage needs.
- the reduction in the size of the application package also reduces the storage space occupied by the application package in the electronic device, thereby improving the performance of the electronic device.
- the method also includes: unpacking the basic package, splitting the basic package into a home page package and a non-home page package, the home page package includes a collection of resources for opening the home page of the first application, and the non-home page package includes a collection of resources for opening the function page of the first application.
- the server After the server obtains the installation package of application A according to the application download request, it parses the installation package of application A and determines the Entry package included therein. Afterwards, the server can split the Entry package according to the device information carried in the application download request, and split the Entry package into different resource packages. Afterwards, the server can determine the running resources corresponding to the device information, and package the running resources into a basic package, that is, finally split the Entry package into a basic package and other resource packages.
- the server determines that the resolution resources in the Entry package include 1024x1024 resolution resources, 256x256 resolution resources, etc.
- the server determines that the resolution of the electronic device is 1024x1024 based on the device information of the electronic device. Then, the server can split the 1024x1024 resolution resources included in the Entry package into running resources during the process of splitting the Entry package, and then pack them into In the basic package, the subsequent electronic devices download the basic package to install the application, and no longer need to download unnecessary resolution resources.
- sending a basic package to an electronic device includes: sending a home page package to the electronic device, where the home page package is used by the electronic device to start a first application and display the home page of the first application.
- the server splits the resource file according to the resource index file, and splits the main basic resources included therein into the homepage package, which is a collection of resources for opening the homepage of the application.
- the server can retain the code files in the basic package in the homepage package. Afterwards, the server can split the other basic resources remaining in the resource file of the basic package into non-homepage packages, which is a collection of resources for opening the function page of the application.
- the server retains a collection of resources for the home page of the electronic device when opening the application by splitting the basic package, thereby further improving the application startup efficiency while ensuring that the application is started and the home page is displayed.
- the method further includes: receiving a second application download request sent by the electronic device, the second application download request being a request sent by the electronic device during or after the installation of the homepage package.
- sending a non-homepage package to the electronic device the non-homepage package being used for the electronic device to display a function page of the first application.
- the second application download request is, for example, a download request sent by the electronic device after determining that the download of the home page package of the first application is complete; or, the second application download request is, for example, a download request sent by the electronic device in response to a user operation, where the user operation is used to instruct the display of other function pages of the first application.
- the overall download and installation time of the home page package and the non-home page package can be reduced by parallelizing the installation process of the home page package and the download process of the non-home page package, thereby improving the application startup time and further reducing the waiting time for subsequent application running.
- the device information includes one or more of the following items: device type, language type, processor model, and resolution.
- an application download method is provided, which is applied to an electronic device.
- the method includes: in response to a first operation of a user, sending a first application download request to a server, wherein the first application download request carries device information of the electronic device and information of the first application downloaded by the first operation instruction.
- a basic package sent by the server for the first application download request is received, wherein the basic package includes a collection of resources in an entry package of the first application for the electronic device to run the first application.
- the first application is displayed.
- receiving a basic package sent by a server in response to a first application download request includes: receiving a homepage package sent by the server, the homepage package including a collection of resources in the basic package for opening the homepage of the first application.
- the method further includes: installing the homepage package. During or after installing the homepage package, sending a second application download request to the server. Receive a non-homepage package sent by the server, the non-homepage package including a collection of resources in the basic package for opening a function page of the first application.
- displaying the first application according to the basic package includes: displaying the homepage of the first application according to the homepage package.
- the method also includes: in the process of displaying the homepage of the first application, detecting the user's second operation, and jumping to the function page of the first application displayed by the second operation instruction according to the non-homepage package.
- the method before sending a second application download request to the server, the method also includes: in the process of displaying the homepage of the first application, detecting a third operation of the user, the third operation is used to indicate a jump to a function page of the first application.
- a server in a third aspect, includes: a processor and a memory, the memory and the processor are coupled, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor reads the computer instructions from the memory, the server executes: receiving a first application download request sent by an electronic device, the first application download request carries device information of the electronic device and information of the first application requested to be downloaded. According to the information of the first application, a first application package corresponding to the first application is determined. According to the device information, the first application package is unpacked, and the entry package in the first application package is split into a basic package and other resource packages, and the basic package includes a collection of resources for the electronic device to run the first application. Send the basic package to the electronic device.
- the server when the processor reads the computer instruction from the memory, the server is also caused to execute: disassembling the basic package Package processing, splitting the basic package into a homepage package and a non-homepage package, the homepage package includes a collection of resources for opening the homepage of the first application, and the non-homepage package includes a collection of resources for opening the function page of the first application.
- sending a basic package to an electronic device includes: sending a home page package to the electronic device, where the home page package is used by the electronic device to start a first application and display the home page of the first application.
- the server when the processor reads the computer instruction from the memory, the server is also caused to execute: receiving a second application download request sent by the electronic device, the second application download request is a request sent by the electronic device during or after the installation of the homepage package.
- a non-homepage package is sent to the electronic device, and the non-homepage package is used by the electronic device to display the function page of the first application.
- the device information includes one or more of the following: device type, language type, processor model, and resolution.
- an electronic device in a fourth aspect, includes: a processor, a display screen, and a memory.
- the memory, the display screen, and the processor are coupled.
- the memory is used to store computer program codes.
- the computer program codes include computer instructions.
- the processor reads the computer instructions from the memory, the electronic device executes: in response to a first operation of the user, a first application download request is sent to a server.
- the first application download request carries device information of the electronic device and information of the first application downloaded by the first operation instruction.
- a basic package sent by the server based on the first application download request is received.
- the basic package includes a collection of resources in the entry package of the first application for the electronic device to run the first application. According to the basic package, the first application is displayed.
- receiving a basic package sent by a server based on a first application download request includes: receiving a home page package sent by the server, the home page package including a collection of resources in the basic package for opening the home page of the first application.
- the electronic device when the processor reads a computer instruction from the memory, the electronic device executes: installing the homepage package. During or after the installation of the homepage package, a second application download request is sent to the server. A non-homepage package sent by the server is received, and the non-homepage package includes a collection of resources in the basic package for opening a function page of the first application.
- displaying the first application according to the basic package includes: displaying the homepage of the first application according to the homepage package.
- the electronic device executes: in the process of displaying the home page of the first application, the user's second operation is detected, and according to the non-home page package, the function page of the first application displayed by the second operation instruction is jumped to.
- the electronic device when the processor reads computer instructions from the memory, the electronic device executes: in the process of displaying the homepage of the first application, a third operation of the user is detected, and the third operation is used to indicate a jump to a function page of the first application.
- the present application provides an application download system, which includes: an electronic device and a server.
- the electronic device is used to: in response to a first operation of a user, send a first application download request to the server, the first application download request carries device information of the electronic device and information of the first application requested to be downloaded by the first operation.
- the server is used to: receive the first application download request sent by the electronic device, the first application download request carries device information of the electronic device and information of the first application requested to be downloaded. According to the information of the first application, determine the first application package corresponding to the first application.
- the device information unpack the first application package, split the entry package in the first application package into a basic package and other resource packages, the basic package includes a collection of resources for the electronic device to run the first application.
- the electronic device is also used to: receive the basic package sent by the server based on the first application download request, the basic package includes a collection of resources in the entry package of the first application for the electronic device to run the first application.
- the basic package display the first application.
- the server is also used to: unpack the basic package, split the basic package into a home page package and a non-home page package, the home page package includes a collection of resources for opening the home page of the first application, and the non-home page package includes a collection of resources for opening the function page of the first application.
- the server is further used to: send to the electronic device
- the homepage package is used by the electronic device to start the first application and display the homepage of the first application.
- the electronic device is also used to: receive the homepage package.
- the server is further used to: receive a second application download request sent by the electronic device, where the second application download request is a request sent by the electronic device during or after the installation of the homepage package.
- a non-homepage package is sent to the electronic device, where the non-homepage package is used by the electronic device to display a function page of the first application.
- the present application provides a server, which has the function of implementing the application download method described in the first aspect and any possible implementation thereof.
- the function can be implemented by hardware, or by hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the above functions.
- the present application provides an electronic device having the function of implementing the application download method described in the first aspect and any possible implementation thereof.
- the function can be implemented by hardware, or by hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the above functions.
- a computer-readable storage medium stores a computer program (also referred to as instructions or codes), and when the computer program is executed by a server, the server executes the method of the first aspect or any one of the implementations of the first aspect.
- a computer-readable storage medium stores a computer program (also referred to as an instruction or code), and when the computer program is executed by an electronic device, the electronic device executes the method of the first aspect or any one of the implementations of the first aspect.
- a computer program also referred to as an instruction or code
- the present application provides a computer program product.
- the server executes the method of the first aspect or any one of the implementations of the first aspect.
- the present application provides a computer program product.
- the computer program product When the computer program product is run on an electronic device, the electronic device executes the method of the second aspect or any one of the implementations of the second aspect.
- the present application provides a circuit system, the circuit system including a processing circuit, the processing circuit being configured to execute the method of the first aspect or any one of the embodiments of the first aspect; or, the processing circuit being configured to execute the method of the second aspect or any one of the embodiments of the second aspect.
- the present application provides a chip system comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to at least one processor, and when the at least one processor executes the instructions, the at least one processor executes the method of the first aspect or any one of the embodiments of the first aspect; or, the at least one processor executes the method of the second aspect or any one of the embodiments of the second aspect.
- FIG1 is a schematic diagram of a first application package download scenario provided in an embodiment of the present application.
- FIG2 is a schematic diagram of a communication system for an application downloading method provided in an embodiment of the present application
- FIG3 is a schematic diagram of the hardware structure of a server provided in an embodiment of the present application.
- FIG4 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
- FIG5 is a schematic diagram of an interface provided in an embodiment of the present application.
- FIG6 is a schematic diagram of an application package unpacking scenario provided in an embodiment of the present application.
- FIG7 is a second schematic diagram of an application package unpacking scenario provided in an embodiment of the present application.
- FIG8 is a second schematic diagram of an application package downloading scenario provided in an embodiment of the present application.
- FIG9 is a schematic diagram of a flow chart of an application downloading method provided in an embodiment of the present application.
- FIG10 is a schematic diagram of the structure of a server provided in an embodiment of the present application.
- FIG. 11 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
- references to "one embodiment” or “some embodiments” etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements “in one embodiment”, “in some embodiments”, “in some other embodiments”, “in some other embodiments”, etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean “one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
- the terms “including”, “comprising”, “having” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized in other ways.
- connection includes direct connection and indirect connection, unless otherwise specified. "First” and “second” are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
- the words “exemplarily” or “for example” are used to indicate examples, illustrations or explanations. Any embodiment or design described as “exemplarily” or “for example” in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as “exemplarily” or “for example” is intended to present related concepts in a specific way.
- the application package is, for example, an application package of a common application or an installation-free application.
- common applications include, for example, applications that users can choose to install or uninstall, such as sports health, smart life, memo and other applications.
- Installation-free applications include, for example, quick applications, mini-programs, etc.
- the homepage of the free installation app can be displayed.
- the download and installation process of the free-to-install application takes less time, so the process of installing the application is not perceived by the user.
- the user can directly launch the application by clicking an icon, card, or link, which can provide the user with a better user experience.
- the electronic device still needs to download the application package to install the application. From the perspective of the user, the user does not perceive the installation of the application, so he will not actively uninstall the installation-free application.
- the size of the current free-to-install application packages is still relatively large, and it takes a long time to install an application package on an electronic device for the first time, and the user has to wait for a long time, which affects the user experience.
- the installation package of application A may include code files, third-party library files, resource files, and resource index files.
- the code files include code that supports the operation of application A.
- the third-party library files include third-party libraries that support the operation of application A, such as implementing the text automatic translation function of the corresponding application A by configuring the third-party library.
- the resource files include Various resources implemented, such as basic resources, resolution resources, language resources, etc.
- the resource index file is used to index the corresponding resource locations in the resource file.
- some installation-free applications can support multi-language services.
- the language resources in the resource files in the installation package of application A include multi-language packages.
- only limited language support may be required. Therefore, among the multi-language packages included in the installation package of application A, there are some language packages that are not needed for the first use, resulting in a larger size of the installation package of application A, which increases the time spent on the electronic device to install application A.
- the larger installation package of application A also leads to excessive occupation of the storage space of the electronic device.
- the operating systems of some electronic devices support distributed services.
- developers will also design applications to support distributed services, that is, applications can automatically adapt to the use of various types of electronic devices. Then, the size of the application package will also increase, affecting the quick installation and launch of the installation-free application.
- an embodiment of the present application provides an application downloading method, in which the server splits the application package of the application to be downloaded according to the information of the electronic device requesting to download the application, and retains the resources in the application package corresponding to the electronic device, thereby avoiding downloading unnecessary resources, reducing the size of the application package, thereby increasing the download speed of the application package and reducing the time spent on application installation.
- Fig. 2 is a schematic diagram of a communication system for the application download method provided in an embodiment of the present application. As shown in Fig. 2, the communication system includes a server 100 and an electronic device 200.
- the server 100 may be a device or server with computing functions such as a cloud server or a network server.
- the server may be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.
- the electronic device 200 may be, for example, a mobile phone, a tablet computer, a laptop computer, a smart screen, a vehicle-mounted terminal, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a wearable device (such as a smart watch), an artificial intelligence (AI) device, or other terminal device.
- the operating system installed in the electronic device includes but is not limited to: Or other operating systems. This application does not limit the specific type of the electronic device 200 and the installed operating system.
- the server 100 is used to manage application packages, for example, the server 100 is an application market server.
- the server 100 unpacks the application package in response to the request of the electronic device 200 to reduce the size of the application package, and then the server 100 sends the corresponding application package to the electronic device 200.
- the electronic device 200 can complete the download and installation of the application according to the obtained application package.
- FIG3 shows a schematic structural diagram of the server 100 .
- the server includes at least one processor 201 , a communication line 202 , a memory 203 and at least one communication interface 204 .
- the memory 203 may also be included in the processor 201 .
- Processor 201 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
- CPU central processing unit
- ASIC application-specific integrated circuit
- the communication link 202 may include a pathway to transmit information between the above-mentioned components.
- the communication interface 204 is used to communicate with other devices.
- the communication interface can be a module, a circuit, a bus, an interface, a transceiver or other device capable of realizing a communication function, and is used to communicate with other devices.
- the transceiver can be an independently arranged transmitter, which can be used to send information to other devices, and the transceiver can also be an independently arranged receiver, which is used to receive information from other devices.
- the transceiver can also be a component that integrates the functions of sending and receiving information, and the embodiment of the present application does not limit the specific implementation of the transceiver.
- the memory 203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
- the memory may exist independently and be connected to the processor via the communication line 202. The memory may also be integrated with the processor.
- the memory 203 is used to store computer-executable instructions for implementing the solution of the present application, and the execution is controlled by the processor 201.
- the processor 201 is used to execute the computer-executable instructions stored in the memory 203, thereby implementing the application download method provided in the following embodiment of the present application.
- the computer-executable instructions in the embodiments of the present application may also be referred to as application code, instructions, computer program or other names, which are not specifically limited in the embodiments of the present application.
- the processor 201 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 3 .
- the server may include multiple processors, such as processor 201 and processor 205 in FIG3. Each of these processors may be a single-CPU processor or a multi-CPU processor.
- the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
- the server 100 determines the application package requested to be downloaded by the electronic device 200 and the device information of the electronic device 200 through the processor 201.
- the device information includes, for example, the device type, language type, CPU model, resolution, etc.
- the server 100 can unpack the application package according to the device information, and determine the running resources in the application package required for the electronic device 200 to run the application to be downloaded, and the running resources are used to support the running of the application to be downloaded in the electronic device 200.
- the server 100 may package and send the running resources to the electronic device 200 via the communication interface 204, thereby reducing the size of the application package and increasing the speed of application download.
- the server 100 may further unpack the running resources and split the running resources into resources required for application startup, such as a collection of resources for opening the homepage of the application; and resources required after the application is started, such as a collection of resources for opening the function page of the application. Afterwards, the server 100 may first package the resources required for application startup through the communication interface 204 and then send them to the electronic device 200 through the communication interface 204, thereby improving the application download startup speed. Afterwards, the resources required after the application is started are packaged and sent to the electronic device 200 through the communication interface 204, thereby ensuring the subsequent normal operation of the application.
- FIG4 shows a schematic structural diagram of an electronic device.
- the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
- a processor 110 an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card
- the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device.
- the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently.
- the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
- AP application processor
- GPU graphics processor
- ISP image signal processor
- DSP digital signal processor
- NPU neural-network processing unit
- Different processing units may be independent devices or integrated in one or more processors.
- the processor 110 may also be provided with a memory for storing instructions and data.
- the memory in the processor 110 is a cache memory.
- the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
- the processor 110 may include one or more interfaces.
- the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
- I2C inter-integrated circuit
- I2S inter-integrated circuit sound
- PCM pulse code modulation
- UART universal asynchronous receiver/transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB universal serial bus
- the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
- the USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and a peripheral device. It can also be used to connect headphones to play audio through the headphones.
- the interface can also be used to connect other first electronic devices, such as AR devices, etc.
- the charging management module 140 is used to receive charging input from a charger.
- the charger may be a wireless charger or a wired charger.
- the charging management module 140 may receive charging input from a wired charger through the USB interface 130.
- the charging management module 140 may receive wireless charging input through a wireless charging coil of an electronic device. While the charging management module 140 is charging the battery 142, it may also power the first 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 charging 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 number, battery health status (leakage, impedance), etc.
- the power management module 141 can also be set in the processor 110.
- the power management module 141 and the charging management module 140 can also be set in the same device.
- the wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
- Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
- antenna 1 can be reused as a diversity antenna for a wireless local area network.
- the antenna can be used in combination with a tuning switch.
- the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to electronic devices.
- the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
- the mobile communication module 150 may receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
- the mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
- at least some of the functional modules of the mobile communication module 150 may be arranged in the processor 110.
- at least some of the functional modules of the mobile communication module 150 may be arranged in the same device as at least some of the modules of the processor 110.
- the wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc.
- WLAN wireless local area networks
- BT Bluetooth
- GNSS global navigation satellite system
- FM frequency modulation
- NFC near field communication
- IR infrared
- the wireless communication module 160 can be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110.
- the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
- the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 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), 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.
- the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite based augmentation system
- the electronic device implements the display function through a GPU, a display screen 194, and an application processor.
- the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations 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, etc.
- the display screen 194 includes a display panel.
- the display panel can be manufactured using a liquid crystal display (LCD), such as an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-led, Micro-led, Micro-oled, quantum dot light-emitting diodes (QLED), etc.
- the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the electronic device 200 determines that the user instructs to download an application, and can send an application download request to the server 100 through the wireless communication module 160, and carry the device information of the electronic device 200 in the application download request.
- the electronic device 200 may receive the application package sent by the server 100 through the wireless communication module 160 , and after completing the installation of the application through the processor 110 , the application may be displayed through the display screen 194 .
- the camera 193 is used to capture still images or videos.
- the object generates an optical image through the lens and projects it onto the photosensitive element.
- the photosensitive element can 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 passes the electrical signal to the ISP to be converted into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- the DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
- the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
- the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
- the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be saved in the external memory card.
- the internal memory 121 may be used to store computer executable program codes, which include instructions.
- the internal memory 121 may include a program storage area and a data storage area.
- the internal memory 121 may include a high-speed random access memory and may also include a non-volatile memory.
- the processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor.
- the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
- the audio module 170 can also be used to encode and decode audio signals.
- the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
- the electronic device can use the audio module 170, such as music playing, recording, etc.
- the audio module 170 can include a speaker, a receiver, a microphone, a headphone interface, and an application processor to realize audio functions.
- the sensor module 180 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
- the key 190 includes a power key, a volume key, etc.
- the key 190 can be a mechanical key or a touch key.
- the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
- Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
- the indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
- the SIM card interface 195 is used to connect a SIM card.
- the electronic device may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
- the electronic device 200 determines that the user instructs to download an application, and may determine to send an application download request to the server 100 .
- the user operation is, for example, an operation performed by the user on an application download link, icon, card, control, etc.
- applications include, for example, common applications or installation-free applications.
- common applications include, for example, applications that users can choose to install or uninstall, such as sports health, smart life, memo, and other applications.
- Installation-free applications include, for example, quick applications, mini-programs, and the like.
- the application download request carries device information of the electronic device 200, which includes, for example, the device type.
- the device type includes, for example, a mobile phone, a tablet, a smart screen, etc.
- the language type includes, for example, the type of voice used by the device, etc.
- the free installation can be displayed in the form of a card, such as the interface 510 shown in FIG. 5 (a).
- the electronic device 200 When the electronic device 200 is displaying the negative one screen, it detects the user's operation on the card 511 and can start the corresponding quick service, such as the express service.
- the quick service is an implementation method of the free installation application. If the electronic device 200 starts the quick service for the first time, it can send an application download request to the server 100 to request the download of the corresponding application package. Subsequently, the electronic device 200 can pull up the corresponding quick service based on the downloaded application package to display the corresponding page.
- the electronic device 200 when the electronic device 200 is displaying the application market, it detects the user's operation of opening control 521 in the quick application center interface, and can determine that the user instructs to start the quick application corresponding to control 521. Then, the electronic device 200 can send an application download request to the server 100 to request to download the corresponding application package. Subsequently, the electronic device 200 can pull up the corresponding quick application based on the downloaded application package to display the corresponding page.
- the server 100 can determine the application package corresponding to the application download request, and the application package is the application package corresponding to the application requested to be downloaded by the electronic device 200.
- the application package is, for example, an installation package for installing an application, and different operating systems may support different types of application packages.
- the application package is, for example, an Android system installation package (Android package, APK), a HarmonyOS system capability installation package (HarmonyOS ability package, HAP), and the like.
- the following takes the HAP package in the Hongmeng system as an example to introduce the unpacking process of the application package in detail. It should be understood that for the APK package in the Android system, the unpacking and downloading of the application package can also be achieved based on this case.
- the HAP packet can be divided into an entry packet and a feature packet.
- the Entry package refers to the main module of the application. In an application, there is generally an Entry type package.
- the Entry package can be used to display the application's entry interface, display the application's entry icon, implement the main feature functions, etc.
- Feature packages refer to the dynamic feature modules of an application.
- An application can contain one or more packages of the Feature type, or it can contain no packages of the Feature type.
- Feature packages can be used to implement the application's feature functions and can be configured to be downloaded and installed on demand or to be downloaded and installed together with the Entry package.
- the installation package can be defined as an Entry package.
- the application package containing the component can run independently.
- the component in the Hap package of the Hongmeng system, the component is an ability (Ability); in the APK package of the Android system, the component is an activity (activity).
- the electronic device 200 can determine the resource information of the main ability (MainAbility).
- the resource information of the MainAbility is used to indicate the main resources for the operation of the application in the Hap package. These main resources can be used to support the operation of the application in different types of electronic devices and can be used to implement different functions of the application.
- the server 100 may parse the application package and determine the Entry package included in the application package according to the resource information of the MainAbility. Afterwards, the server 100 may split the Entry package according to the device information carried in the application download request and determine the running resources in the application package required for the electronic device 200 to run the application to be downloaded.
- the same type of electronic devices can be configured with different resolutions, and the resources required for different resolutions are somewhat different. Therefore, the server 100 can determine the resources in the Entry package required for the resolution of the electronic device 200 according to the resolution included in the device information.
- the server 100 can determine the resources in the Entry package required by the CPU model of the electronic device 200 based on the CPU model included in the device information.
- the CPU model includes two fields, one of which is used to indicate the platform and the other is used to indicate the word length.
- the platform of the CPU model of advanced RISC machines (ARM) 64 is ARM, and the word length is 64 bits; the platform of the CPU model of X86 is The server 100 can determine the resources needed to run the CPU according to the platform and byte of the CPU of the electronic device 200.
- the server 100 can also obtain the device information of the electronic device 200 in other ways.
- the server 100 can obtain the device information of the electronic device 200 during other communications with the electronic device 200.
- the electronic device 200 establishes a communication connection with the server 100 for the first time, it actively reports the device information.
- the embodiment of the present application does not specifically limit the method of device information of device 200.
- the server 100 after the server 100 obtains the installation package of application A according to the application download request, it parses the installation package of application A and determines the Entry package included therein. Afterwards, the server 100 can split the Entry package according to the device information carried in the application download request, and split the Entry package into different resource packages. Afterwards, the server 100 can determine the running resources corresponding to the device information, and package the running resources into a basic package, that is, finally split the Entry package into a basic package and the remaining resource packages.
- the server 100 after the server 100 completes the splitting of the basic package, it can send the basic package to the electronic device 200 that requests to download the application. Correspondingly, after obtaining the basic package, the electronic device 200 can install the application.
- the server 100 determines that the resolution resources in the Entry package include 1024x1024 resolution resources, 256x256 resolution resources, etc.
- the server 100 determines that the resolution of the electronic device 200 is 1024x1024 based on the device information of the electronic device 200. Then, the server 100 can split the 1024x1024 resolution resources included in the Entry package into running resources during the process of splitting the Entry package, and then package them into the basic package. In this way, the electronic device 200 downloads the basic package to install the application later, and no longer needs to download unnecessary resolution resources.
- the server 100 determines that the resources corresponding to the CPU model in the Entry package include resources for a CPU of model ARM64, resources for a CPU of model X86, and the like.
- the server 100 determines that the CPU model configured for the electronic device 200 is ARM 64 based on the device information of the electronic device 200. Then, in the process of splitting the Entry package, the server 100 can split the resources for the CPU of model ARM 64 included in the Entry package into running resources, and then pack them into the basic package. In this way, when the electronic device 200 subsequently downloads the basic package to install the application, it is no longer necessary to download unnecessary resources corresponding to the CPU model.
- the server 100 by splitting the application package by the server 100, the operating resources required by the electronic device 200 to run the application are reserved for the electronic device 200 to download, the size of the application package is reduced, and the download of redundant resources is avoided, thereby improving the application download speed. In addition, the waste of download traffic caused by downloading redundant resources can be avoided.
- the retention of running resources ensures that the electronic device 200 can run the application normally after the application is downloaded, thereby effectively improving the speed of the electronic device 200 launching the application for the first time and reducing the user's waiting time, while meeting the user's application usage needs.
- the reduction in the size of the application package also reduces the storage space occupied by the application package in the electronic device 200, thereby improving the performance of the electronic device 200.
- the basic package includes a set of resources for opening the home page of the application and a set of resources for opening the function page of the application.
- the set of resources for opening the home page of the application includes, for example, image resources and language packages required to display the home page of the application.
- the set of resources for opening the function page of the application includes, for example, resources required to display the function page of the corresponding application.
- the electronic device 200 can display the application homepage based on the set of resources for opening the application homepage included therein.
- the electronic device 200 only needs to use some resources included in the basic package to launch the application, and other resources may be used only during the subsequent application running process.
- the server 100 can split the basic package again to further reduce the size of the application package and improve the application startup speed.
- the server 100 splits the basic package according to the resource information of the determined MainAbility and the dimension of ability, and splits the basic package into a homepage package and a non-homepage package.
- the homepage package includes a collection of resources for opening the homepage of the application
- the non-homepage package includes a collection of resources for opening the function page of the application.
- the server 100 can send the homepage package to the electronic device 200. In this way, the electronic device 200 can start the installation-free application according to the obtained homepage package to display the installation-free application.
- the electronic device 200 downloads and installs the homepage package, it can display the homepage of the free-installation application. Therefore, the collection of resources for opening the homepage of the application included in the homepage package is used to display the homepage, such as image resources, control resources, text resources, etc. in the homepage. In this way, the electronic device 200 can quickly pull up the corresponding free-installation application to display the homepage of the free-installation application by downloading and installing a small homepage package.
- the electronic device 200 needs to jump to other function pages in response to the user's operation on the home page, and at this time the electronic device 200 needs to obtain the resources included in the non-home package to display the other function pages.
- the resources included in the non-home package are picture resources, control resources, text resources, etc. for displaying other jump function pages.
- the server 100 splits the installation package of the free-installation application (such as the installation package of application A) to complete the packaging of the basic package and the remaining resource packages. Afterwards, the server 100 splits the basic package again according to the resource information of MainAbility, and splits the basic package into the application A homepage package and the application A non-homepage package.
- the server 100 splits the installation package of the free-installation application (such as the installation package of application A) to complete the packaging of the basic package and the remaining resource packages. Afterwards, the server 100 splits the basic package again according to the resource information of MainAbility, and splits the basic package into the application A homepage package and the application A non-homepage package.
- the basic package includes code files, resource files, and resource index files.
- the code files include application stage (ApplicationStage) code files for providing general functions such as application reading files, main capabilities (MainAbility) code files for providing the main business capabilities of the application package, and main page (MainPage) code files for displaying the home page.
- application stage ApplicationStage
- Main capabilities Main Ability
- Main page Main page
- These code files are used to implement different functions of the application after the application package is installed, and the volume is small, so the server 100 can retain this part of the code files in the home page package.
- the volume of the resource file is large, so the server 100 can split the resource file according to the resource index file, such as the resource information of MainAbility, and split the main basic resources included therein into the home page package.
- These main basic resources are a collection of resources for opening the application. Afterwards, the server 100 can split the other basic resources remaining in the resource files of the basic package into non-home page packages. These other basic resources are a collection of resources
- the split application A homepage package includes code files, main basic resources, and resource index files for indicating the main basic resources.
- the split application A non-homepage package includes other basic resources and resource index files for indicating other basic resources.
- the server 100 may send the homepage package of application A to the electronic device 200. Accordingly, the electronic device 200 may display the homepage of application A according to the received homepage package of application A.
- the application package is unpacked twice by the server 100, and the volume of the homepage package obtained is significantly smaller than the volume of the complete application package.
- the download time of the homepage package is also significantly less than the download time of the complete application package; as shown in Table 1, the volume of the complete application package is 13 megabytes (M), and when the network speed is 2M/s, the electronic device 200 needs 6.5 seconds (s) to complete the download of the complete application package; and the volume of the homepage package is 3.95M, and when the network speed is 2M/s, the electronic device 200 only needs 1.98s to complete the download of the application package. Then, the electronic device 200 can save 4.52s of time by downloading the homepage package to launch the installation-free application.
- the installation time of the homepage package is also less than the installation time of the complete application package, such as saving 130 milliseconds (ms).
- the electronic device 200 can complete the download and installation of the homepage package in a relatively short time in response to the user's instruction to download the application, thereby displaying the application homepage without the user's awareness, and meeting the user's demand for quick startup of the installation-free application.
- the electronic device 200 needs to download the complete installation package before running the application, which causes the user to wait too long for the application download.
- the application download method provided in the embodiment of the present application splits the application package, and the electronic device 200 only needs to download the collection of resources for opening the homepage of the application in the complete application package, thereby effectively improving the application download efficiency and providing the user with a non-perceived application download and installation experience.
- the size of the application package is further reduced, thereby reducing the storage space occupied by the application package in the electronic device 200, thereby improving the performance of the electronic device 200.
- the electronic device 200 can also download the non-homepage package to ensure the subsequent operation of the application and meet the user's usage needs.
- the electronic device 200 after the electronic device 200 completes downloading of the home page package, it can install the home page package. After that, the electronic device 200 can download and install the non-home page package. Then, after the electronic device 200 completes installation of the non-home page package, it can support the application to run other pages.
- the electronic device 200 displays the home page of an application according to the resources included in the home page package, it detects the user's operation on the control and determines that it needs to jump to other pages of the application. Then, the electronic device 200 can obtain the corresponding resources from the non-home page package in response to the user operation to jump to the corresponding page.
- the electronic device 200 after the electronic device 200 completes the download of the application A homepage package, it can install the application A homepage package. Furthermore, during or after the installation of the homepage package of application A, the electronic device 200 may request the server 100 to download the non-homepage package of application A, and then install the non-homepage package of application A after the download of the non-homepage package of application A is completed. Accordingly, the server 100 may send the non-homepage package of application A to the electronic device 200 in response to the request of the electronic device 200. Subsequently, the electronic device 200 may display other pages of application A based on the resources included in the non-homepage package of application A.
- the package management service in the electronic device 200 can be used to parse and install application packages.
- the overall download and installation time of the home page package and the non-home page package can be reduced by parallelizing the installation process of the home page package and the download process of the non-home page package, thereby improving the application startup time and further reducing the waiting time for subsequent application running.
- the electronic device 200 may request the server 100 to download the non-homepage package, and then install the non-homepage package. Then, after completing the installation of the non-homepage package, the electronic device 200 may support the application to run other function pages.
- the non-home page package ensures that the application displays other function pages.
- the application starts the application according to the homepage package and displays the homepage of the application. Afterwards, during the process of displaying the homepage, the electronic device 200 detects the user's operation, determines the operation for instructing to display other function pages, and can request the server 100 to download the non-homepage package, and then install the non-homepage package. Then, after completing the installation of the non-homepage package, the electronic device 200 can display the function page indicated by the user.
- the non-home page package ensures that the application displays other function pages.
- the server 100 after the server 100 splits the basic package into the home page package and the non-home page package, it can simultaneously send the home page package and the non-home page package to the electronic device 200. Accordingly, the electronic device 200 can choose to download the home page package first, and then download the non-home page package after the home page package is downloaded. That is, the server 100 can choose to send the home page package and the non-home page package separately in response to the request of the electronic device 200, or send the home page package and the non-home page package at the same time.
- the Hap package uses the Hap package as an example to explain the process of splitting the application package, such as the process of splitting the basic package in the Entry package; and the secondary splitting process, such as the process of splitting the basic package into the homepage package and the non-homepage package.
- the names of the application packages are the same or different, and the names of the Entry package, basic package, homepage package, and non-homepage package are only exemplary descriptions, and the embodiments of the present application do not limit this.
- Fig. 9 is a flow chart of an application downloading method provided in an embodiment of the present application. As shown in Fig. 9, the method includes the following steps.
- an electronic device In response to a first operation of a user, an electronic device sends a first application download request to a server.
- the first application download request carries device information of the electronic device and information of a first application to be downloaded as instructed by the first operation.
- the device information includes one or more of the following: device type, language type, processor model, and resolution.
- the first operation is, for example, an operation by a user on an application download link, icon, card, control, or the like.
- the electronic device in response to a first operation instructing a user to download a first application, the electronic device sends a first application download request to a server, and carries its own device information and information of the first application requested to be downloaded in the first application download request to download the first application.
- the information of the first application includes, for example, an identifier for indicating the first application.
- the free installation can be displayed in the form of a card, such as the interface 510 shown in FIG5 (a).
- the electronic device 200 When the electronic device 200 is displaying the negative one screen, it detects the user's operation on the card 511 and can start the corresponding quick service, such as the express service.
- the quick service is an implementation method of the free installation application. If the electronic device 200 starts the quick service for the first time, it can send an application download request to the server 100 to request the download of the corresponding application package.
- the server determines a first application package corresponding to the first application according to information of the first application.
- the server receives a first application download request sent by an electronic device, and can determine a first application package corresponding to the first application requested to be downloaded based on information of the first application carried therein.
- S903 The server unpacks the first application package according to the device information, and splits the entry package in the first application package into a basic package and other resource packages.
- the basic package includes a collection of resources for the electronic device to run the first application.
- the server may determine the entry package therein. Afterwards, the server may unpack the entry package, determine the set of resources for the electronic device to run the first application based on the device information of the electronic device, and A collection of these resources is packaged into a base package.
- the server 100 after the server 100 obtains the installation package of application A according to the application download request, it parses the installation package of application A and determines the Entry package included therein. Afterwards, the server 100 can split the Entry package according to the device information carried in the application download request, and split the Entry package into different resource packages. Afterwards, the server 100 can determine the running resources corresponding to the device information, and package the running resources into a basic package, that is, finally split the Entry package into a basic package and other resource packages.
- the server 100 determines that the resolution resources in the Entry package include 1024x1024 resolution resources, 256x256 resolution resources, etc.
- the server 100 determines that the resolution of the electronic device 200 is 1024x1024 based on the device information of the electronic device 200. Then, the server 100 can split the 1024x1024 resolution resources included in the Entry package into running resources during the process of splitting the Entry package, and then package them into the basic package. In this way, the electronic device 200 downloads the basic package to install the application later, and no longer needs to download unnecessary resolution resources.
- S904 The server sends a basic package to the electronic device.
- the server may send the basic package to the electronic device.
- the electronic device receives the basic package sent by the server.
- the electronic device displays the first application according to the basic package.
- the electronic device may display the first application according to the resource set in the basic package.
- the server reserves the running resources required by the electronic device to run the application for downloading by the electronic device, reducing the size of the application package and avoiding the download of redundant resources, thereby increasing the application download speed. In addition, it can avoid the waste of download traffic caused by downloading redundant resources.
- the retention of running resources ensures that the electronic device can run the application normally after the application is downloaded, thereby effectively improving the speed at which the electronic device launches the application for the first time and reducing the user's waiting time, while meeting the user's application usage needs.
- the reduction in the size of the application package also reduces the storage space occupied by the application package in the electronic device, thereby improving the performance of the electronic device.
- the server can also unpack the basic package and split the basic package into a home page package and a non-home page package.
- the home page package includes a collection of resources for opening the home page of the first application
- the non-home page package includes a collection of resources for opening the function page of the first application.
- the server sends a homepage package to the electronic device.
- the electronic device receives the homepage package sent by the server, and then the electronic device can display the homepage of the first application according to the homepage package.
- the server 100 splits the resource file according to the resource index file, such as the resource information of MainAbility, and splits the main basic resources included therein into the homepage package, and these main basic resources are a collection of resources for opening the homepage of the application.
- the server 100 retains the code files in the basic package in the homepage package.
- the server 100 can split the other basic resources remaining in the resource file of the basic package into non-homepage packages, and these other basic resources are a collection of resources for opening the function page of the application.
- the server retains a collection of resources for the home page of the electronic device when opening the application by splitting the basic package, thereby further improving the application startup efficiency while ensuring that the application is started and the home page is displayed.
- the electronic device detects a second operation of the user during the process of displaying the home page of the first application, and the second operation is used to indicate a jump to the function page of the first application.
- the electronic device sends a second application download request to the server; or the electronic device responds to the second operation and sends a second application download request to the server.
- the second application download request is used to request the download of resources for displaying other function pages of the first application.
- the server receives a second application download request sent by the electronic device, which is a request sent by the electronic device during or after the installation of the homepage package.
- the server sends a non-homepage package to the electronic device, which is used by the electronic device to display the function page of the first application.
- the overall download and installation time of the home page package and the non-home page package can be reduced by parallelizing the installation process of the home page package and the download process of the non-home page package, thereby improving the application startup time and further reducing the waiting time for subsequent application running.
- FIG 10 is a schematic diagram of the structure of a server provided in an embodiment of the present application.
- the server 1000 may include: a transceiver unit 1001 and a processing unit 1002.
- the server 1000 may be used to implement the functions of the server 100 involved in the above method embodiment.
- the transceiver unit 1001 is used to support the server 1000 to execute S901 and S904 in FIG. 9 .
- processing unit 1002 is used to support the server 1000 to execute S902 and S903 in Figure 9.
- the transceiver unit may include a receiving unit and a sending unit, which may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module.
- the operations and/or functions of each unit in the server 1000 are respectively to implement the corresponding process of the application download method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, they will not be repeated here.
- the server 1000 shown in Figure 10 may further include a storage unit (not shown in Figure 10), in which a program or instruction is stored.
- a storage unit not shown in Figure 10
- the server 1000 shown in Figure 10 can execute the application download method described in the above method embodiment.
- the technical effects of the server 1000 shown in FIG. 10 may refer to the technical effects of the application downloading method described in the above method embodiment, and will not be repeated here.
- the technical solution provided by the present application may also be a functional unit or chip in the server, or a device used in conjunction with the server.
- Figure 11 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
- the electronic device 1100 may include: a transceiver unit 1101, a processing unit 1102, and a display unit 1103.
- the electronic device 1100 may be used to implement the functions of the electronic device 200 involved in the above method embodiment.
- the transceiver unit 1101 is used to support the electronic device 1100 to execute S901 and S904 in FIG. 9 .
- the processing unit 1102 is used to support the electronic device 1100 to execute S905 in FIG. 9 .
- the display unit 1103 is used to support the electronic device 1100 to execute S905 in FIG. 9 .
- the transceiver unit may include a receiving unit and a sending unit, and may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module.
- the operations and/or functions of each unit in the electronic device 1100 are respectively to implement the corresponding process of the application download method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, they will not be repeated here.
- the electronic device 1100 shown in FIG11 may further include a storage unit (not shown in FIG11 ), in which a program or instruction is stored.
- a storage unit not shown in FIG11
- the electronic device 1100 shown in FIG11 may execute the application download method described in the above method embodiment.
- the technical effects of the electronic device 1100 shown in FIG. 11 may refer to the technical effects of the application downloading method described in the above method embodiment, and will not be repeated here.
- the technical solution provided in the present application may also be a functional unit or chip in the electronic device, or a device used in conjunction with the electronic device.
- An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.
- the processor in the chip system may be one or more.
- the processor may be implemented by hardware or by software.
- the processor may be a logic circuit, an integrated circuit, etc.
- the processor may be a general-purpose processor implemented by reading software code stored in a memory.
- the memory in the chip system may be one or more.
- the memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application.
- the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively.
- the embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
- the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), or a microcontroller. It can be a micro controller unit (MCU), a programmable logic device (PLD) or other integrated chips.
- FPGA field programmable gate array
- ASIC application specific integrated circuit
- SoC system on chip
- CPU central processor unit
- NP network processor
- DSP digital signal processor
- MCU micro controller unit
- PLD programmable logic device
- each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software.
- the method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
- An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored.
- the computer program When the computer program is run on a computer, the computer executes the above-mentioned related steps to implement the application download method in the above-mentioned embodiment.
- the embodiment of the present application also provides a computer program product.
- the computer program product When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the application downloading method in the above-mentioned embodiment.
- an embodiment of the present application further provides a device.
- the device may be a component or a module, and the device may include one or more processors and a memory connected to each other.
- the memory is used to store a computer program.
- the device executes the application download method in each of the above method embodiments.
- the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
- the steps of the method or algorithm described in conjunction with the disclosed content of the embodiments of the present application can be implemented in hardware or by executing software instructions by a processor.
- the software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, read-only compact disks (CD-ROMs) or any other form of storage medium known in the art.
- An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium.
- the storage medium can also be a component of the processor.
- the processor and the storage medium can be located in an application specific integrated circuit (ASIC).
- ASIC application specific integrated circuit
- the disclosed method can be implemented in other ways.
- the device embodiments described above are merely schematic.
- the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of modules or units, which can be electrical, mechanical or other forms.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
- Computer-readable storage media include, but are not limited to, any of the following: USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or optical disks, and other media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本申请提供应用下载方法、服务器、电子设备及系统。本申请服务器根据请求下载应用的电子设备的信息,拆分待下载应用的应用包,保留应用包中与该电子设备对应的资源,从而避免下载不必要的资源,降低应用包的体积,从而提升应用包下载速度,减少应用安装耗时。该方法包括:服务器接收电子设备发送的第一应用下载请求,该第一应用下载请求中携带有电子设备的设备信息以及请求下载的第一应用的信息。之后服务器根据第一应用的信息,确定第一应用对应的第一应用包。并根据设备信息,对第一应用包进行拆包处理,将第一应用包中的入口包拆分为基础包和其余资源包,该基础包包括电子设备运行第一应用的资源的集合。之后服务器向电子设备发送基础包。
Description
本申请要求于2022年12月21日提交国家知识产权局、申请号为202211647230.8、申请名称为“应用下载方法、服务器、电子设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请实施例涉及终端技术领域,尤其涉及一种应用下载方法、服务器、电子设备及系统。
随着终端技术的发展,应用可实现的功能越来越丰富,应用包的大小也随之增加,那么应用包的下载耗时也随之增加。
目前,一些电子设备可为用户提供免安装应用服务,电子设备响应于用户操作,首次拉起免安装应用时,用户不感知应用的安装过程。这就要求免安装应用的应用包的体积较小,才能够为用户带来更好的免安装应用使用体验。
但是,目前受限于较大的应用包体积,导致免安装应用的应用包安装过程耗时增加,影响用户的使用体验。
发明内容
为了解决上述的技术问题,本申请提供了一种应用下载方法、服务器、电子设备及系统。本申请提供的技术方案,服务器根据请求下载应用的电子设备的信息,拆分待下载应用的应用包,保留应用包中与该电子设备对应的资源,从而避免下载不必要的资源,降低应用包的体积,从而提升应用包下载速度,减少应用安装耗时。
为了实现上述的技术目的,本申请提供了如下技术方案:
第一方面,提供一种应用下载方法,应用于服务器。该方法包括:接收电子设备发送的第一应用下载请求,第一应用下载请求中携带有电子设备的设备信息以及请求下载的第一应用的信息。根据第一应用的信息,确定第一应用对应的第一应用包。根据设备信息,对第一应用包进行拆包处理,将第一应用包中的入口包拆分为基础包和其余资源包,基础包包括电子设备运行第一应用的资源的集合。向电子设备发送基础包。
如此,通过服务器对应用包的拆分,保留电子设备运行应用所需的运行资源供电子设备下载,降低应用包的体积,且避免冗余资源的下载,从而提升应用下载速度。并且,能够避免由于下载冗余资源,导致的下载流量的浪费。
应理解,运行资源的保留,保证了应用下载后,电子设备可正常运行应用,从而在有效提升电子设备首次拉起应用的速度降低用户等待时长的同时,满足用户的应用使用需求。
此外,应用包体积的降低,也减少了应用包对于电子设备的存储空间的占用,以提升电子设备的性能。
根据第一方面,该方法还包括:对基础包进行拆包处理,将基础包拆分为首页包和非首页包,首页包包括打开第一应用的首页的资源的集合,非首页包包括打开第一应用的功能页面的资源的集合。
示例性的,服务器在根据应用下载请求,获取到应用A安装包后,对应用A安装包进行解析,确定其中包括的Entry包。之后,服务器可根据应用下载请求中携带的设备信息,对Entry包进行拆分,将Entry包拆分为不同的资源包。之后,服务器可确定对应于设备信息的运行资源,并将运行资源打包为基础包,即最终将Entry包拆分为基础包和其余资源包。
例如,服务器确定Entry包中的分辨率资源包括1024x1024分辨率资源、256x256分辨率资源等。服务器根据电子设备的设备信息,确定电子设备的分辨率为1024x1024。那么,服务器可在拆分Entry包的过程中,将Entry包中包括的1024x1024分辨率资源拆分为运行资源,后续打包到
基础包中。这样后续电子设备下载基础包进行应用的安装,不再需要下载不必要的分辨率资源。
根据第一方面,或者以上第一方面的任意一种实现方式,向电子设备发送基础包,包括:向电子设备发送首页包,首页包用于电子设备启动第一应用并显示第一应用的首页。
示例性的,服务器根据资源索引文件,对资源文件进行拆分,将其中包括的主要基础资源拆分至首页包中,这些主要基础资源为打开应用的首页的资源的集合。并且,服务器可将基础包中的代码文件保留至首页包中。之后,服务器可将基础包的资源文件中剩余的其他基础资源拆分至非首页包中,这些其他基础资源为打开应用的功能页面的资源的集合。
如此,服务器通过对基础包的拆分,保留电子设备打开应用的首页的资源的集合,在保证应用启动并显示首页的同时,进一步提升应用启动效率。
根据第一方面,或者以上第一方面的任意一种实现方式,在向电子设备发送首页包之后,方法还包括:接收电子设备发送的第二应用下载请求,第二应用下载请求为电子设备在安装首页包的过程中或者完成后发送的请求。响应于第二应用下载请求,向电子设备发送非首页包,非首页包用于电子设备显示第一应用的功能页面。
一些示例中,第二应用下载请求例如为电子设备在确定完成第一应用的首页包的下载后,发送的下载请求;或者,第二应用下载请求例如为电子设备响应于用户操作发送的下载请求,该用户操作例如用于指示显示第一应用的其他功能页面。
如此,不必等待在首页包下载并安装完成后才能够下载非首页包,而是通过并行首页包的安装过程,以及非首页包的下载过程,减少首页包和非首页包下载和安装的整体时间,从而在提升应用拉起时间的同时,进一步降低后续应用运行的等待时间。
根据第一方面,或者以上第一方面的任意一种实现方式,设备信息包括如下一项或几项:设备类型、语言类型、处理器型号、分辨率。
第二方面,提供一种应用下载方法,应用于电子设备。该方法包括:响应于用户的第一操作,向服务器发送第一应用下载请求,第一应用下载请求中携带有电子设备的设备信息以及第一操作指示下载的第一应用的信息。接收服务器第一应用下载请求发送的基础包,基础包包括第一应用的入口包中用于供电子设备运行第一应用的资源的集合。根据基础包,显示第一应用。
根据第二方面,接收服务器第一应用下载请求发送的基础包,包括:接收服务器发送的首页包,首页包包括基础包中用于打开第一应用的首页的资源的集合。
根据第二方面,或者以上第二方面的任意一种实现方式,在接收服务器发送的首页包之后,方法还包括:安装首页包。在安装首页包的过程中或者完成后,向服务器发送第二应用下载请求。接收服务器发送的非首页包,非首页包包括基础包中用于打开第一应用的功能页面的资源的集合。
根据第二方面,或者以上第二方面的任意一种实现方式,根据基础包,显示第一应用,包括:根据首页包,显示第一应用的首页。
根据第二方面,或者以上第二方面的任意一种实现方式,方法还包括:在显示第一应用的首页的过程中,检测到用户的第二操作,根据非首页包,跳转至第二操作指示显示的第一应用的功能页面。
根据第二方面,或者以上第二方面的任意一种实现方式,在向服务器发送第二应用下载请求之前,方法还包括:在显示第一应用的首页的过程中,检测到用户的第三操作,第三操作用于指示跳转至第一应用的功能页面。
第二方面以及第二方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第三方面,提供一种服务器。该服务器包括:处理器和存储器,存储器和处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,使得服务器执行:接收电子设备发送的第一应用下载请求,第一应用下载请求中携带有电子设备的设备信息以及请求下载的第一应用的信息。根据第一应用的信息,确定第一应用对应的第一应用包。根据设备信息,对第一应用包进行拆包处理,将第一应用包中的入口包拆分为基础包和其余资源包,基础包包括电子设备运行第一应用的资源的集合。向电子设备发送基础包。
根据第三方面,当处理器从存储器中读取计算机指令,还使得服务器执行:对基础包进行拆
包处理,将基础包拆分为首页包和非首页包,首页包包括打开第一应用的首页的资源的集合,非首页包包括打开第一应用的功能页面的资源的集合。
根据第三方面,或者以上第三方面的任意一种实现方式,向电子设备发送基础包,包括:向电子设备发送首页包,首页包用于电子设备启动第一应用并显示第一应用的首页。
根据第三方面,或者以上第三方面的任意一种实现方式,当处理器从存储器中读取计算机指令,还使得服务器执行:接收电子设备发送的第二应用下载请求,第二应用下载请求为电子设备在安装首页包的过程中或者完成后发送的请求。响应于第二应用下载请求,向电子设备发送非首页包,非首页包用于电子设备显示第一应用的功能页面。
根据第三方面,或者以上第三方面的任意一种实现方式,设备信息包括如下一项或几项:设备类型、语言类型、处理器型号、分辨率。
第三方面以及第三方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第四方面,提供一种电子设备。该电子设备包括:处理器、显示屏以及存储器,存储器、显示屏和处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,使得电子设备执行:响应于用户的第一操作,向服务器发送第一应用下载请求,第一应用下载请求中携带有电子设备的设备信息以及第一操作指示下载的第一应用的信息。接收服务器基于第一应用下载请求发送的基础包,基础包包括第一应用的入口包中用于供电子设备运行第一应用的资源的集合。根据基础包,显示第一应用。
根据第四方面,接收服务器基于第一应用下载请求发送的基础包,包括:接收服务器发送的首页包,首页包包括基础包中用于打开第一应用的首页的资源的集合。
根据第四方面,或者以上第四方面的任意一种实现方式,当处理器从存储器中读取计算机指令,使得电子设备执行:安装首页包。在安装首页包的过程中或者完成后,向服务器发送第二应用下载请求。接收服务器发送的非首页包,非首页包包括基础包中用于打开第一应用的功能页面的资源的集合。
根据第四方面,或者以上第四方面的任意一种实现方式,根据基础包,显示第一应用,包括:根据首页包,显示第一应用的首页。
根据第四方面,或者以上第四方面的任意一种实现方式,当处理器从存储器中读取计算机指令,使得电子设备执行:在显示第一应用的首页的过程中,检测到用户的第二操作,根据非首页包,跳转至第二操作指示显示的第一应用的功能页面。
根据第四方面,或者以上第四方面的任意一种实现方式,当处理器从存储器中读取计算机指令,使得电子设备执行:在显示第一应用的首页的过程中,检测到用户的第三操作,第三操作用于指示跳转至第一应用的功能页面。
第四方面以及第四方面中任意一种实现方式所对应的技术效果,可参见上述第二方面及第二方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第五方面,本申请提供一种应用下载系统,该系统包括:电子设备和服务器。其中,电子设备,用于:响应于用户的第一操作,向服务器发送第一应用下载请求,第一应用下载请求中携带有电子设备的设备信息以及第一操作指示下载的第一应用的信息。服务器,用于:接收电子设备发送的第一应用下载请求,第一应用下载请求中携带有电子设备的设备信息以及请求下载的第一应用的信息。根据第一应用的信息,确定第一应用对应的第一应用包。根据设备信息,对第一应用包进行拆包处理,将第一应用包中的入口包拆分为基础包和其余资源包,基础包包括电子设备运行第一应用的资源的集合。向电子设备发送基础包。电子设备,还用于:接收服务器基于第一应用下载请求发送的基础包,基础包包括第一应用的入口包中用于供电子设备运行第一应用的资源的集合。根据基础包,显示第一应用。
根据第五方面,服务器,还用于:对基础包进行拆包处理,将基础包拆分为首页包和非首页包,首页包包括打开第一应用的首页的资源的集合,非首页包包括打开第一应用的功能页面的资源的集合。
根据第五方面,或者以上第五方面的任意一种实现方式,服务器,还用于:向电子设备发送
首页包,首页包用于电子设备启动第一应用并显示第一应用的首页。电子设备,还用于:接收首页包。
根据第五方面,或者以上第五方面的任意一种实现方式,服务器,还用于:接收电子设备发送的第二应用下载请求,第二应用下载请求为电子设备在安装首页包的过程中或者完成后发送的请求。响应于第二应用下载请求,向电子设备发送非首页包,非首页包用于电子设备显示第一应用的功能页面。
第五方面以及第五方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第六方面,本申请提供一种服务器,该电子服务器具有实现如上述第一方面及其中任一种可能的实现方式中所述的应用下载方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应地软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第六方面以及第六方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第七方面,本申请提供一种电子设备,该电子设备具有实现如上述第一方面及其中任一种可能的实现方式中所述的应用下载方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应地软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第七方面以及第七方面中任意一种实现方式所对应的技术效果,可参见上述第二方面及第二方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第八方面,提供一种计算机可读存储介质。计算机可读存储介质存储有计算机程序(也可称为指令或代码),当该计算机程序被服务器执行时,使得服务器执行第一方面或第一方面中任意一种实施方式的方法。
第八方面以及第八方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第九方面,提供一种计算机可读存储介质。计算机可读存储介质存储有计算机程序(也可称为指令或代码),当该计算机程序被电子设备执行时,使得电子设备执行第一方面或第一方面中任意一种实施方式的方法。
第九方面以及第九方面中任意一种实现方式所对应的技术效果,可参见上述第二方面及第二方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第十方面,本申请提供一种计算机程序产品,当计算机程序产品在服务器上运行时,使得服务器执行第一方面或第一方面中任意一种实施方式的方法。
第十方面以及第十方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第十一方面,本申请提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行第二方面或第二方面中任意一种实施方式的方法。
第十一方面以及第十一方面中任意一种实现方式所对应的技术效果,可参见上述第二方面及第二方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第十二方面,本申请提供一种电路系统,电路系统包括处理电路,处理电路被配置为执行第一方面或第一方面中任意一种实施方式的方法;或者,处理电路被配置为执行第二方面或第二方面中任意一种实施方式的方法。
第十二方面以及第十二方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第十三方面,本申请提供一种芯片系统,包括至少一个处理器和至少一个接口电路,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,当至少一个处理器执行指令时,至少一个处理器执行第一方面或第一方面中任意一种实施方式的方法;或者,至少一个处理器执行第二方面或第二方面中任意一种实施方式的方法。
第十三方面以及第十三方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
图1为本申请实施例提供的应用包下载场景示意图一;
图2为本申请实施例提供的一种应用下载方法应用的通信系统的示意图;
图3为本申请实施例提供的服务器的硬件结构示意图;
图4为本申请实施例提供的电子设备的硬件结构示意图;
图5为本申请实施例提供的界面示意图;
图6为本申请实施例提供的应用包拆包场景示意图一;
图7为本申请实施例提供的应用包拆包场景示意图二;
图8为本申请实施例提供的应用包下载场景示意图二;
图9为本申请实施例提供的应用下载方法的流程示意图;
图10为本申请实施例提供的服务器的结构示意图;
图11为本申请实施例提供的电子设备的结构示意图。
下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或两个以上(包含两个)。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。
在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。
在一些场景中,随着应用功能的增多,应用包的体积随之增加,应用包体积的增加直接影响应用的下载速度。其中,应用包例如为普通应用或免安装应用的应用包。其中,普通应用例如包括用户可选择安装、卸载的应用,如运动健康、智慧生活、备忘录等应用。免安装应用例如包括快应用、小程序等,在用户触发将某个还未安装的免安装应用拉起的操作后,电子设备可以在界面上显示页面加载的动画,并相应对该免安装应用进行下载和安装。因此,对于用户,从视觉上可以看到对应的页面在加载、显示;但是,用户一般不会感知该免安装应用会进行下载或者安装。
一些示例中,免安装应用下载并安装完成后,可显示免安装应用的首页。
一些示例中,免安装应用的下载和安装过程耗时较少,从而安装应用的过程不受用户感知,用户在使用的过程中通过点击某个图标、卡片、或者链接可以直接将应用拉起,能够为用户提供更好的使用体验。
应理解,从操作系统的角度而言,对于免安装应用,电子设备还是需要下载应用包,以安装应用。而从用户的角度,用户并不感知应用的安装,那么也就不会主动地卸载免安装应用。
但是,目前免安装应用包的体积还是比较大,电子设备首次安装应用包耗时较长,用户等待时间较长,影响用户的使用体验。
比如,如图1所示,应用A安装包中可以包括代码文件、三方库文件、资源文件、以及资源索引文件。其中,代码文件包括支持应用A运行的代码。三方库文件包括支持应用A运行的三方库,如通过配置三方库实现对应的应用A的文字自动翻译功能等。资源文件包括支持应用A功能
实现的各种资源,如基础资源、分辨率资源、语言资源等。资源索引文件用于索引资源文件中相应的资源位置。
一些示例中,部分免安装应用(如应用A)可支持多语言服务,那么应用A安装包中的资源文件中,语言资源包括多语言包。但是,用户实际使用过程中,首次使用应用,可能仅需其中有限的语言支持。那么,应用A安装包中包括的多语言包中,存在部分首次使用并不需要的语言包,导致应用A安装包体积较大,造成电子设备在安装应用A的过程中,耗时增加。并且,电子设备下载应用A后,较大的应用A安装包也导致对电子设备存储空间的过多占用。
又比如,部分电子设备的操作系统支持分布式服务,那么在应用开发过程中,开发者也会设计应用支持分布式服务,即应用可自动适配于多种类型的电子设备的使用。那么,应用包的体积也会随之增大,影响免安装应用的快速安装、拉起的实现。
由此,本申请实施例提供一种应用下载方法,服务器根据请求下载应用的电子设备的信息,拆分待下载应用的应用包,保留应用包中与该电子设备对应的资源,从而避免下载不必要的资源,降低应用包的体积,从而提升应用包下载速度,减少应用安装耗时。
图2为本申请实施例提供的应用下载方法应用的通信系统的示意图。如图2所示,该通信系统包括服务器100和电子设备200。
可选的,服务器100可以是云服务器或者网络服务器等具有计算功能的设备或服务器。上述服务器可以是一台服务器,也可以是由多台服务器组成的服务器集群,或者是一个云计算服务中心。
可选的,电子设备200例如可以为手机、平板电脑、笔记本电脑、智慧屏、车载终端、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴设备(如智能手表等)、人工智能(artificial intelligence,AI)设备等终端设备,电子设备安装的操作系统包括但不限于
或者其它操作系统。本申请对电子设备200的具体类型、所安装的操作系统均不作限制。
在一些实施例中,服务器100用于管理应用包,例如,服务器100为应用市场服务器。一些示例中,服务器100响应于电子设备200的请求,对应用包进行拆包处理,降低应用包的体积,之后服务器100向电子设备200下发相应的应用包。电子设备200可根据获取到的应用包,完成应用的下载安装。
示例性的,图3示出了服务器100的一种结构示意图。
服务器包括至少一个处理器201,通信线路202,存储器203以及至少一个通信接口204。其中,存储器203还可以包括于处理器201中。
处理器201可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
通信线路202可包括一通路,在上述组件之间传送信息。
通信接口204,用于与其他设备通信。在本申请实施例中,通信接口可以是模块、电路、总线、接口、收发器或者其它能实现通信功能的装置,用于与其他设备通信。可选的,当通信接口是收发器时,该收发器可以为独立设置的发送器,该发送器可用于向其他设备发送信息,该收发器也可以为独立设置的接收器,用于从其他设备接收信息。该收发器也可以是将发送、接收信息功能集成在一起的部件,本申请实施例对收发器的具体实现不做限制。
存储器203可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路202与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器203用于存储用于实现本申请方案的计算机执行指令,并由处理器201来控制执行。处理器201用于执行存储器203中存储的计算机执行指令,从而实现本申请下述实施例提供的应用下载方法。
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码、指令、计算机程序或者其它名称,本申请实施例对此不作具体限定。
在具体实现中,作为一种实施例,处理器201可以包括一个或多个CPU,例如图3中的CPU0和CPU1。
在具体实现中,作为一种实施例,服务器可以包括多个处理器,例如图3中的处理器201和处理器205。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在一些实施例中,服务器100通过通信接口204接收到电子设备200发送的应用下载请求后,服务器100通过处理器201确定电子设备200请求下载的应用包以及电子设备200的设备信息。该设备信息例如包括设备类型、语言类型、CPU型号、分辨率等。之后,服务器100可根据设备信息,对应用包进行拆包处理,确定该电子设备200运行该待下载的应用所需的应用包中的运行资源,该运行资源用于支持待下载的应用在电子设备200中的运行。
一些示例中,服务器100可通过通信接口204,将运行资源打包下发至电子设备200,从而降低应用包体积,提升应用下载速度。
另一些示例中,服务器100可再进一步对运行资源进行拆包处理,将运行资源拆分为应用启动所需的资源,如打开应用的首页的资源的集合;以及应用启动后所需的资源,如打开应用的功能页面的资源的集合。之后,服务器100可通过通信接口204,先将应用启动所需的资源打包后通过通信接口204下发至电子设备200,从而提升应用下载启动速度。之后,再将应用启动后所需的资源打包后通过通信接口204下发至电子设备200,从而保证应用的后续正常运行。
示例性的,图4示出了电子设备的一种结构示意图。
电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器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)接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备充电,也可以用于电子设备与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他第一电子设备,例如AR设备等。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为第一电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在电子设备上的包括无线局域网(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转为电磁波辐射出去。
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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)。
电子设备通过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),Mini-led,Micro-led,Micro-oled,量子点发光二极管(quantum dot light emitting diodes,QLED)等生产制造。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。
在一些实施例中,响应于用户在显示屏194上的操作,电子设备200确定用户指示下载应用,可通过无线通信模块160向服务器100发送应用下载请求,并在该应用下载请求中携带电子设备200的设备信息。
后续,电子设备200可通过无线通信模块160接收服务器100下发的应用包,并通过处理器110完成应用的安装后,可通过显示屏194显示应用。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备可以包括1个或N个摄像头193,N为大于1的正整数。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。电子设备可以通过音频模块170,例如音乐播放,录音等。音频模块170可以包括扬声器,受话器,麦克风,耳机接口,以及应用处理器等实现音频功能。
传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。
在一些实施例中,响应于用户操作,电子设备200确定用户指示下载应用,可确定向服务器100发送应用下载请求。
一些示例中,用户操作例如为用户对应用下载链接、图标、卡片、控件等的操作。
一些示例中,应用例如包括普通应用或免安装应用。其中,普通应用例如包括用户可选择安装、卸载的应用,如运动健康、智慧生活、备忘录等应用。免安装应用例如包括快应用、小程序等。免安装应用虽然也需要下载应用包并安装,但是其下载或安装的过程不受用户感知,因此在本申请实施例中称之为免安装应用。
一些示例中,应用下载请求中携带有电子设备200的设备信息,该设备信息例如包括设备类
型、语言类型、CPU型号、分辨率等。其中,设备类型例如包括手机、平板、智慧屏等。语言类型例如包括设备使用的语音种类等。
示例性的,免安装可以以卡片的形式显示,如图5中(a)所示界面510,电子设备200在显示负一屏的过程中,检测到用户对卡片511的操作,可启动对应的快服务,如快递服务。该快服务为免安装应用的一种实现方式,如电子设备200首次启动该快服务,可向服务器100发送应用下载请求,以请求下载对应的应用包。后续,电子设备200可基于下载的应用包,拉起相应的快服务,以显示相应的页面。
又示例性的,如图5中(b)所示界面520,电子设备200在显示应用市场的过程中,在快应用中心界面检测到用户对打开控件521的操作,可确定用户指示启动控件521对应的快应用。那么,电子设备200可向服务器100发送应用下载请求,以请求下载对应的应用包。后续,电子设备200可基于下载的应用包,拉起相应的快应用,以显示相应的页面。
在一些实施例中,服务器100接收到电子设备200发送的应用下载请求后,可确定该应用下载请求对应的应用包,该应用包即为电子设备200请求下载的应用对应的应用包。
一些示例中,应用包例如为用于安装应用的安装包,不同操作系统支持的应用包类型可能不同。例如,应用包例如为Android系统安装包(Android package,APK),鸿蒙系统能力安装包(HarmonyOS ability package,HAP)等。
下文以应用包为鸿蒙系统中的HAP包为例,对应用包的拆包过程进行详细介绍。应理解,对于安卓系统中的APK包,也可基于本案实现应用包的拆包、下载。
在一些实施例中,HAP包可分为入口(Entry)包和特性(Feature)包。
Entry包是指应用的主模块。一个应用中,一般会有一个Entry类型的包。Entry包例如可用于显示应用的入口界面、显示应用的入口图标、实现主特性功能等。
Feature包是指应用的动态特性模块。一个应用可以包含一个或多个Feature类型的包,也可以不包含Feature类型的包。Feature包可用于实现应用的特性功能,可以配置成按需下载安装,也可以配置成随Entry包一起下载安装。
在另一些示例中,当免安装应用只有一个安装包,并且该免安装应用基于该安装包运行,可以将该安装包定义为Entry包。
在一些实施例中,包含组件的应用包能够独立运行。其中,在鸿蒙系统的Hap包中,该组件为能力(Ability);在安卓系统的APK包中,该组件为活动(activity)。那么,以Hap包为例,电子设备200在确定Hap包后,可确定主要能力(MainAbility)的资源信息,该MainAbility的资源信息用于指示Hap包中应用运行的主要资源,这些主要资源可用于支持应用在不同类型的电子设备中的运行,可用于实现应用的不同功能。
在一些实施例中,服务器100在根据应用下载请求,获取到相应的应用包后,可对应用包进行解析,根据MainAbility的资源信息,确定应用包中包括的Entry包。之后,服务器100可根据应用下载请求中携带的设备信息,对Entry包进行拆分,确定电子设备200运行该待下载的应用所需的应用包中的运行资源。
比如,相同类型的电子设备可配置不同的分辨率,而不同分辨率需要使用的资源存在一定的差异。因此,服务器100可根据设备信息中包括的分辨率,确定电子设备200的分辨率所需的Entry包中的资源。
又比如,不同的电子设备可配置不同型号的处理器(CPU),而不同型号的处理器需要使用的资源存在一定的差异。因此,服务器100可根据设备信息中包括的CPU型号,确定电子设备200的CPU型号所需的Entry包中的资源。一些示例中,CPU型号包括两个字段,其中一个字段用于指示平台,另一个字段用于指示字长。例如,型号为高级精简指令集机器(advanced RISC machines,ARM)64的CPU的平台为ARM,字长为64位;型号为X86的CPU的平台为平台,字长为32位。服务器100根据电子设备200的CPU的平台和字节,可确定CPU运行需要使用的资源。应理解,服务器100也可通过其他方式获取到电子设备200的设备信息。比如,服务器100在其他与电子设备200通信的过程中,可获取到电子设备200的设备信息。又比如,电子设备200在首次与服务器100建立通信连接时,主动上报设备信息。对于服务器100获取电子
设备200的设备信息的方式,本申请实施例不做具体限定。
示例性的,如图6所示,服务器100在根据应用下载请求,获取到应用A安装包后,对应用A安装包进行解析,确定其中包括的Entry包。之后,服务器100可根据应用下载请求中携带的设备信息,对Entry包进行拆分,将Entry包拆分为不同的资源包。之后,服务器100可确定对应于设备信息的运行资源,并将运行资源打包为基础包,即最终将Entry包拆分为基础包和其余资源包。
在一些实施例中,服务器100在完成基础包的拆分后,可向请求下载应用的电子设备200下发该基础包。相应的,电子设备200在获取到基础包后,可安装应用。
例如,服务器100确定Entry包中的分辨率资源包括1024x1024分辨率资源、256x256分辨率资源等。服务器100根据电子设备200的设备信息,确定电子设备200的分辨率为1024x1024。那么,服务器100可在拆分Entry包的过程中,将Entry包中包括的1024x1024分辨率资源拆分为运行资源,后续打包到基础包中。这样后续电子设备200下载基础包进行应用的安装,不再需要下载不必要的分辨率资源。
又例如,服务器100确定Entry包中的CPU型号对应的资源包括针对型号为ARM64的CPU的资源、针对型号为X86的CPU的资源等。服务器100根据电子设备200的设备信息,确定电子设备200配置的CPU型号为ARM 64。那么,服务器100可在拆分Entry包的过程中,将Entry包中包括的针对型号为ARM 64的CPU的资源拆分为运行资源,后续打包到基础包中。这样后续电子设备200下载基础包进行应用的安装,不再需要下载不必要的CPU型号对应的资源。
如此,通过服务器100对应用包的拆分,保留电子设备200运行应用所需的运行资源供电子设备200下载,降低应用包的体积,且避免冗余资源的下载,从而提升应用下载速度。并且,能够避免由于下载冗余资源,导致的下载流量的浪费。
应理解,运行资源的保留,保证了应用下载后,电子设备200可正常运行应用,从而在有效提升电子设备200首次拉起应用的速度降低用户等待时长的同时,满足用户的应用使用需求。
此外,应用包体积的降低,也减少了应用包对于电子设备200的存储空间的占用,以提升电子设备200的性能。
在一些实施例中,基础包中包括打开应用的首页的资源的集合,以及打开应用的功能页面的资源的集合。其中,打开应用的首页的资源的集合例如包括显示应用首页所需的图片资源、语言包等。打开应用的功能页面的资源的集合例如包括用于显示相应的应用的功能页面所需的资源等。
那么,电子设备200在下载基础包后,可基于其中包括的打开应用的首页的资源的集合,显示应用首页。也就是说,电子设备200拉起应用只需要使用基础包中包括的部分资源,而其他资源在后续应用运行过程中才可能被使用。
由此,服务器100可再次对基础包进行拆分,以进一步减小应用包体积,提升应用拉起速度。
在一些实施例中,服务器100根据已经确定的MainAbility的资源信息,以ability的维度对基础包进行拆分,将基础包拆分为首页包和非首页包。其中,首页包包括打开应用的首页的资源的集合,非首页包包括打开应用的功能页面的资源的集合。之后,服务器100可向电子设备200下发首页包。这样,电子设备200可根据获取到的首页包启动免安装应用,以显示免安装应用。
比如,电子设备200下载并安装首页包后,可显示免安装应用首页。因此,在首页包中包括的打开应用的首页的资源的集合用于显示该首页,如包括首页中的图片资源、控件资源、文字资源等资源。这样,电子设备200通过下载并安装体积较小的首页包,可实现快速拉起对应的免安装应用,以显示免安装应用的首页。
又比如,电子设备200响应于用户在首页上的操作,需要跳转至其他功能页面,此时电子设备200需要获取到非首页包中包括的资源,以显示其他功能页面。如非首页包中包括的资源为用于显示其他跳转功能页面的图片资源、控件资源、文字资源等资源。
示例性的,如图7所示,基于上述各个实施例所述的方法,服务器100对免安装应用的安装包(如应用A安装包)进行拆分,完成基础包和其余资源包的打包。之后,服务器100根据MainAbility的资源信息,再次对基础包进行拆分,将基础包拆分为应用A首页包和应用A非首页包。
一些示例中,如图7所示,基础包中包括代码文件、资源文件以及资源索引文件。其中,代码文件包括用于提供应用读取文件等通用功能的应用阶段(ApplicationStage)代码文件、用于提供应用包主要业务能力的主要能力(MainAbility)代码文件、以及用于显示首页的主页(MainPage)代码文件等代码文件,这些代码文件用于在应用包安装后实现应用的不同功能,且体积较小,因此服务器100可在首页包中保留这部分代码文件。资源文件的体积较大,因此服务器100可根据资源索引文件,如MainAbility的资源信息,对资源文件进行拆分,将其中包括的主要基础资源拆分至首页包中,这些主要基础资源为打开应用的资源的集合。之后,服务器100可将基础包的资源文件中剩余的其他基础资源拆分至非首页包中,这些其他基础资源为打开应用的功能页面的资源的集合。
那么,如图7所示,服务器100在拆分基础包后,拆分后的应用A首页包中包括代码文件、主要基础资源、以及用于指示主要基础资源的资源索引文件。拆分后的应用A非首页包中包括其他基础资源、以及用于指示其他基础资源的资源索引文件。
之后,服务器100可向电子设备200下发应用A首页包。相应的,电子设备200可根据接收到的应用A首页包,显示应用A的首页。
为了便于更明显的体现本申请实施例提供的应用下载方法的有益效果,如下表1所示,示例性的说明完整的应用包和首页包,在应用包体积、下载耗时、安装耗时上的差异。
可以看出,通过服务器100对应用包进行两次拆包,获取到的首页包的体积明显小于完整的应用包的体积。那么相应的,首页包的下载耗时也明显小于完整的应用包的下载耗时;如表1所示例的,完整的应用包体积为13兆(M),在网速为2M/s的情况下,电子设备200需要6.5秒(s)才能够完成完整的应用包的下载;而首页包的体积为3.95M,在网速为2M/s的情况下,电子设备200只需1.98s即可完成应用包的下载。那么,电子设备200通过下载首页包拉起免安装应用,可节约4.52s的时间。此外,首页包的安装耗时也少于完整的应用包的安装耗时,如可节约130毫秒(ms)。
这样,电子设备200响应于用户指示下载应用的操作,可在较短的时间内完成首页包的下载和安装。从而实现在用户无感知的情况下,显示应用首页,满足用户对于免安装应用快速启动的需求。
表1
如此,相比于现有技术中,电子设备200需要下载完整的安装包后,才能够运行应用,导致用户等待应用下载时间过长。本申请实施例提供的应用下载方法,通过对应用包进行拆分,电子设备200只需要下载完整的应用包中打开应用的首页的资源的集合,从而有效提升应用下载效率,为用户提供无感知的应用下载安装体验。
此外,应用包体积进一步降低,减少了应用包对于电子设备200的存储空间的占用,以提升电子设备200的性能。
在一些实施例中,应用启动后,后续应用的运行需要使用非首页包中的资源。因此,电子设备200还可以下载非首页包,以保证应用的后续运行,满足用户的使用需求。
示例性的,电子设备200在完成首页包的下载后,可安装首页包。之后,电子设备200可下载并安装非首页包。那么,电子设备200在完成非首页包的安装后,可支持应用运行其他页面。
比如,电子设备200在根据首页包中包括的资源显示应用首页的过程中,检测到用户对控件的操作,确定需要跳转至应用的其他页面。那么,电子设备200可响应于用户操作,从非首页包中获取到相应的资源,以跳转至对应的页面。
如此,在降低应用包体积,提升应用拉起时间的同时,保证了后续应用的运行。
又示例性的,如图8所示,电子设备200在完成应用A首页包的下载后,可安装应用A首页
包。并且,在安装应用A首页包的过程中或者完成后,电子设备200可向服务器100请求下载应用A非首页包,在应用A非首页包下载完成后再安装应用A非首页包。相应的,服务器100可响应于电子设备200的请求,向电子设备200下发应用A非首页包。后续,电子设备200可基于该应用A非首页包中包括的资源,显示应用A的其他页面。
其中,电子设备200中的包管理服务,可用于解析、安装应用包。
如此,不必等待在首页包下载并安装完成后才能够下载非首页包,而是通过并行首页包的安装过程,以及非首页包的下载过程,减少首页包和非首页包下载和安装的整体时间,从而在提升应用拉起时间的同时,进一步降低后续应用运行的等待时间。
又示例性的,电子设备200在完成首页包的下载和安装后,可向服务器100请求下载非首页包,之后可安装非首页包。那么,电子设备200在完成非首页包的安装后,可支持应用运行其他功能页面。
如此,在提升应用首页显示效率的同时,通过非首页包保证应用显示其他功能页面。
再示例性的,电子设备200在完成首页包的下载和安装后,应用根据首页包启动应用,并显示该应用的首页。之后,电子设备200在显示首页的过程中,检测到用户的操作,确定用于指示显示其他功能页面的操作,可向服务器100请求下载非首页包,之后可安装非首页包。那么,电子设备200在完成非首页包的安装后,可显示用户指示显示的功能页面。
如此,在提升应用首页显示效率的同时,通过非首页包保证应用显示其他功能页面。
一些示例中,服务器100在将基础包拆分为首页包和非首页包后,可同时向电子设备200下发首页包和非首页包。相应的,电子设备200可选择优先下载首页包,在首页包下载完成后,再下载非首页包。即,服务器100可选择响应于电子设备200的请求单独下发首页包和非首页包,或者同时下发首页包和非首页包。
上文以Hap包为例,对应用包的拆分过程,如拆分出其中Entry包中的基础包的过程;以及二次拆分过程,如将基础包拆分为首页包和非首页包的过程,进行说明。应理解,在不同的操作系统中,应用包的名称相同或不相同,其中Entry包、基础包、首页包、非首页包的名称仅为示例性说明,本申请实施例对此不做限制。
示例性的,图9为本申请实施例提供的一种应用下载方法的流程示意图。如图9所示,该方法包括如下步骤。
S901、响应于用户的第一操作,电子设备向服务器发送第一应用下载请求,该第一应用下载请求中携带有电子设备的设备信息以及第一操作指示下载的第一应用的信息。
其中,设备信息包括如下一项或几项:设备类型、语言类型、处理器型号、分辨率。第一操作例如为用户对应用下载链接、图标、卡片、控件等的操作。
在一些实施例中,响应于用户指示下载第一应用的第一操作,电子设备向服务器发送第一应用下载请求,并在该第一应用下载请求中携带自身的设备信息以及请求下载的第一应用的信息,以下载第一应用。
一些示例中,第一应用的信息例如包括用于指示第一应用的标识。
示例性的,免安装可以以卡片的形式显示,如图5中(a)所示界面510,电子设备200在显示负一屏的过程中,检测到用户对卡片511的操作,可启动对应的快服务,如快递服务。该快服务为免安装应用的一种实现方式,如电子设备200首次启动该快服务,可向服务器100发送应用下载请求,以请求下载对应的应用包。
S902、服务器根据第一应用的信息,确定第一应用对应的第一应用包。
在一些实施例中,服务器接收电子设备发送的第一应用下载请求,可根据其中携带的第一应用的信息,确定请求下载的第一应用对应的第一应用包。
S903、服务器根据设备信息,对第一应用包进行拆包处理,将第一应用包中的入口包拆分为基础包和其余资源包。
其中,基础包包括电子设备运行第一应用的资源的集合。
在一些实施例中,服务器在确定第一应用包后,可确定其中的入口包。之后,服务器可对入口包进行拆包处理,根据电子设备的设备信息,确定该电子设备运行第一应用的资源的集合,将
这些资源的集合打包为基础包。
示例性的,如图6所示,服务器100在根据应用下载请求,获取到应用A安装包后,对应用A安装包进行解析,确定其中包括的Entry包。之后,服务器100可根据应用下载请求中携带的设备信息,对Entry包进行拆分,将Entry包拆分为不同的资源包。之后,服务器100可确定对应于设备信息的运行资源,并将运行资源打包为基础包,即最终将Entry包拆分为基础包和其余资源包。
例如,服务器100确定Entry包中的分辨率资源包括1024x1024分辨率资源、256x256分辨率资源等。服务器100根据电子设备200的设备信息,确定电子设备200的分辨率为1024x1024。那么,服务器100可在拆分Entry包的过程中,将Entry包中包括的1024x1024分辨率资源拆分为运行资源,后续打包到基础包中。这样后续电子设备200下载基础包进行应用的安装,不再需要下载不必要的分辨率资源。
S904、服务器向电子设备发送基础包。
在一些实施例中,服务器在确定基础包后,可向电子设备发送基础包。相应的,电子设备接收服务器发送的基础包。
S905、电子设备根据基础包,显示第一应用。
在一些实施例中,电子设备在接收到基础包后,可根据基础包中的资源集合,显示第一应用。
如此,通过服务器对应用包的拆分,保留电子设备运行应用所需的运行资源供电子设备下载,降低应用包的体积,且避免冗余资源的下载,从而提升应用下载速度。并且,能够避免由于下载冗余资源,导致的下载流量的浪费。
应理解,运行资源的保留,保证了应用下载后,电子设备可正常运行应用,从而在有效提升电子设备首次拉起应用的速度降低用户等待时长的同时,满足用户的应用使用需求。
此外,应用包体积的降低,也减少了应用包对于电子设备的存储空间的占用,以提升电子设备的性能。
在一些实施例中,服务器还可以对基础包进行拆包处理,将基础包拆分为首页包和非首页包,首页包包括打开第一应用的首页的资源的集合,非首页包包括打开第一应用的功能页面的资源的集合。
一些示例中,服务器向电子设备发送首页包。相应的,电子设备接收服务器发送的首页包,之后电子设备可根据首页包,显示第一应用的首页。
示例性的,如图7所示,服务器100根据资源索引文件,如MainAbility的资源信息,对资源文件进行拆分,将其中包括的主要基础资源拆分至首页包中,这些主要基础资源为打开应用的首页的资源的集合。并且,服务器100将基础包中的代码文件保留至首页包中。之后,服务器100可将基础包的资源文件中剩余的其他基础资源拆分至非首页包中,这些其他基础资源为打开应用的功能页面的资源的集合。
如此,服务器通过对基础包的拆分,保留电子设备打开应用的首页的资源的集合,在保证应用启动并显示首页的同时,进一步提升应用启动效率。
在一些实施例中,电子设备在显示第一应用的首页的过程中,检测到用户的第二操作,第二操作用于指示跳转至第一应用的功能页面。一些示例中,电子设备在首页包下载完成后,向服务器发送第二应用下载请求;或者电子设备响应于该第二操作,向服务器发送第二应用下载请求。其中,第二应用下载请求用于请求下载用于显示第一应用其他功能页面的资源。
相应的,服务器接收电子设备发送的第二应用下载请求,第二应用下载请求为电子设备在安装首页包的过程中或者完成后发送的请求。响应于第二应用下载请求,服务器向电子设备发送非首页包,非首页包用于电子设备显示第一应用的功能页面。
如此,不必等待在首页包下载并安装完成后才能够下载非首页包,而是通过并行首页包的安装过程,以及非首页包的下载过程,减少首页包和非首页包下载和安装的整体时间,从而在提升应用拉起时间的同时,进一步降低后续应用运行的等待时间。
以上结合图5-图9详细说明了本申请实施例提供的应用下载方法。以下结合图10详细说明本申请实施例提供的服务器,以及结合图11详细说明本申请实施例提供的电子设备。
在一种可能的设计中,图10为本申请实施例提供的服务器的结构示意图。如图10所示,服务器1000可以包括:收发单元1001和处理单元1002。服务器1000可用于实现上述方法实施例中涉及的服务器100的功能。
可选地,收发单元1001,用于支持服务器1000执行图9中的S901和S904。
可选地,处理单元1002,用于支持服务器1000执行图9中的S902和S903。
其中,收发单元可以包括接收单元和发送单元,可以由收发器或收发器相关电路组件实现,可以为收发器或收发模块。服务器1000中的各个单元的操作和/或功能分别为了实现上述方法实施例中所述的应用下载方法的相应流程,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能单元的功能描述,为了简洁,在此不再赘述。
可选地,图10所示的服务器1000还可以包括存储单元(图10中未示出),该存储单元中存储有程序或指令。当收发单元1001和处理单元1002执行该程序或指令时,使得图10所示的服务器1000可以执行上述方法实施例中所述的应用下载方法。
图10所示的服务器1000的技术效果可以参考上述方法实施例中所述的应用下载方法的技术效果,此处不再赘述。
除了以服务器1000的形式以外,本申请提供的技术方案也可以为服务器中的功能单元或者芯片,或者与服务器匹配使用的装置。
在一种可能的设计中,图11为本申请实施例提供的电子设备的结构示意图。如图11所示,电子设备1100可以包括:收发单元1101、处理单元1102以及显示单元1103。电子设备1100可用于实现上述方法实施例中涉及的电子设备200的功能。
可选地,收发单元1101,用于支持电子设备1100执行图9中的S901和S904。
可选地,处理单元1102,用于支持电子设备1100执行图9中的S905。
可选地,显示单元1103,用于支持电子设备1100执行图9中的S905。
其中,收发单元可以包括接收单元和发送单元,可以由收发器或收发器相关电路组件实现,可以为收发器或收发模块。电子设备1100中的各个单元的操作和/或功能分别为了实现上述方法实施例中所述的应用下载方法的相应流程,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能单元的功能描述,为了简洁,在此不再赘述。
可选地,图11所示的电子设备1100还可以包括存储单元(图11中未示出),该存储单元中存储有程序或指令。当收发单元1101、处理单元1102以及显示单元1103执行该程序或指令时,使得图11所示的电子设备1100可以执行上述方法实施例中所述的应用下载方法。
图11所示的电子设备1100的技术效果可以参考上述方法实施例中所述的应用下载方法的技术效果,此处不再赘述。
除了以电子设备1100的形式以外,本申请提供的技术方案也可以为电子设备中的功能单元或者芯片,或者与电子设备匹配使用的装置。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请实施例并不限定。示例性地,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性地,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制
器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当该计算机程序在计算机上上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的应用下载方法。
本申请实施例还提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的应用下载方法。
另外,本申请实施例还提供一种装置。该装置具体可以是组件或模块,该装置可包括相连的一个或多个处理器和存储器。其中,存储器用于存储计算机程序。当该计算机程序被一个或多个处理器执行时,使得装置执行上述各方法实施例中的应用下载方法。
其中,本申请实施例提供的装置、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法。因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
结合本申请实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应地软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read only memory,ROM)、可擦除可编程只读存储器(erasable programmable ROM,EPROM)、电可擦可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于专用集成电路(application specific integrated circuit,ASIC)中。
通过以上的实施方式的描述,本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明。实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成;即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的。例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式;例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
计算机可读存储介质包括但不限于以下的任意一种:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
Claims (22)
- 一种应用下载方法,其特征在于,应用于服务器,所述方法包括:接收电子设备发送的第一应用下载请求,所述第一应用下载请求中携带有所述电子设备的设备信息以及请求下载的第一应用的信息;根据所述第一应用的信息,确定所述第一应用对应的第一应用包;根据所述设备信息,对所述第一应用包进行拆包处理,将所述第一应用包中的入口包拆分为基础包和其余资源包,所述基础包包括所述电子设备运行所述第一应用的资源的集合;向所述电子设备发送所述基础包。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:对所述基础包进行拆包处理,将所述基础包拆分为首页包和非首页包,所述首页包包括打开所述第一应用的首页的资源的集合,所述非首页包包括打开所述第一应用的功能页面的资源的集合。
- 根据权利要求2所述的方法,其特征在于,所述向所述电子设备发送所述基础包,包括:向所述电子设备发送所述首页包,所述首页包用于所述电子设备启动所述第一应用并显示所述第一应用的首页。
- 根据权利要求3所述的方法,其特征在于,在所述向所述电子设备发送所述首页包之后,所述方法还包括:接收所述电子设备发送的第二应用下载请求,所述第二应用下载请求为所述电子设备在安装所述首页包的过程中或者完成后发送的请求;响应于所述第二应用下载请求,向所述电子设备发送所述非首页包,所述非首页包用于所述电子设备显示所述第一应用的功能页面。
- 根据权利要求1-4任一项所述的方法,其特征在于,所述设备信息包括如下一项或几项:设备类型、语言类型、处理器型号、分辨率。
- 一种应用下载方法,其特征在于,应用于电子设备,所述方法包括:响应于用户的第一操作,向服务器发送第一应用下载请求,所述第一应用下载请求中携带有所述电子设备的设备信息以及所述第一操作指示下载的第一应用的信息;接收所述服务器基于所述第一应用下载请求发送的基础包,所述基础包包括所述第一应用的入口包中用于供所述电子设备运行所述第一应用的资源的集合;根据所述基础包,显示第一应用。
- 根据权利要求6所述的方法,其特征在于,所述接收所述服务器基于所述第一应用下载请求发送的基础包,包括:接收所述服务器发送的首页包,所述首页包包括所述基础包中用于打开所述第一应用的首页的资源的集合。
- 根据权利要求7所述的方法,其特征在于,在所述接收所述服务器发送的首页包之后,所述方法还包括:安装所述首页包;在所述安装所述首页包的过程中或者完成后,向所述服务器发送第二应用下载请求;接收所述服务器发送的非首页包,所述非首页包包括所述基础包中用于打开所述第一应用的功能页面的资源的集合。
- 根据权利要求8所述的方法,其特征在于,所述根据所述基础包,显示第一应用,包括:根据所述首页包,显示所述第一应用的首页。
- 根据权利要求9所述的方法,其特征在于,所述方法还包括:在显示所述第一应用的首页的过程中,检测到用户的第二操作,根据所述非首页包,跳转至所述第二操作指示显示的所述第一应用的功能页面。
- 根据权利要求9所述的方法,其特征在于,在所述向所述服务器发送第二应用下载请求之前,所述方法还包括:在显示所述第一应用的首页的过程中,检测到用户的第三操作,所述第三操作用于指示跳转 至所述第一应用的功能页面。
- 根据权利要求6-11任一项所述的方法,其特征在于,所述设备信息包括如下一项或几项:设备类型、语言类型、处理器型号、分辨率。
- 一种应用下载系统,其特征在于,所述系统包括:电子设备和服务器;所述电子设备,用于:响应于用户的第一操作,向服务器发送第一应用下载请求,所述第一应用下载请求中携带有所述电子设备的设备信息以及所述第一操作指示下载的第一应用的信息;所述服务器,用于:接收电子设备发送的第一应用下载请求,所述第一应用下载请求中携带有所述电子设备的设备信息以及请求下载的第一应用的信息;根据所述第一应用的信息,确定所述第一应用对应的第一应用包;根据所述设备信息,对所述第一应用包进行拆包处理,将所述第一应用包中的入口包拆分为基础包和其余资源包,所述基础包包括所述电子设备运行所述第一应用的资源的集合;向所述电子设备发送所述基础包;所述电子设备,还用于:接收所述服务器基于所述第一应用下载请求发送的基础包,所述基础包包括所述第一应用的入口包中用于供所述电子设备运行所述第一应用的资源的集合;根据所述基础包,显示第一应用。
- 根据权利要求13所述的系统,其特征在于,所述服务器,还用于:对所述基础包进行拆包处理,将所述基础包拆分为首页包和非首页包,所述首页包包括打开所述第一应用的首页的资源的集合,所述非首页包包括打开所述第一应用的功能页面的资源的集合。
- 根据权利要求14所述的系统,其特征在于,所述服务器,还用于:向所述电子设备发送所述首页包,所述首页包用于所述电子设备启动所述第一应用并显示所述第一应用的首页;所述电子设备,还用于:接收所述首页包。
- 根据权利要求15所述的系统,其特征在于,所述服务器,还用于:接收所述电子设备发送的第二应用下载请求,所述第二应用下载请求为所述电子设备在安装所述首页包的过程中或者完成后发送的请求;响应于所述第二应用下载请求,向所述电子设备发送所述非首页包,所述非首页包用于所述电子设备显示所述第一应用的功能页面。
- 一种应用下载方法,其特征在于,应用于电子设备,所述方法包括:响应于用户对卡片的打开操作,所述电子设备向服务器发送第一应用下载请求;所述电子设备接收所述服务器基于所述第一应用下载请求发送的首页包;基于所述首页包,所述电子设备显示所述第一应用的首页;响应于用户对所述第一应用的首页的跳转操作,所述电子设备向服务器发送第二应用下载请求;所述电子设备接收所述服务器基于所述第二应用下载请求发送的非首页包;其中,所述首页包和所述非首页包均为所述第一应用的安装包;基于所述非首页包,所述电子设备显示所述第一应用的功能页面。
- 一种服务器,其特征在于,包括:处理器和存储器,所述存储器和所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,使得所述服务器执行如权利要求1-5中任意一项所述的方法。
- 一种电子设备,其特征在于,包括:处理器、存储器和显示屏,所述存储器、所述显示屏和所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指 令,当所述处理器从所述存储器中读取所述计算机指令,使得所述电子设备执行如权利要求6-12中任意一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当所述计算机程序在服务器上运行时,使得所述服务器执行如权利要求1-5中任意一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求6-12中任意一项所述的方法。
- 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-5中任意一项所述的方法;或者,使得所述计算机执行如权利要求6-12中任意一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211647230.8 | 2022-12-21 | ||
CN202211647230.8A CN118233492A (zh) | 2022-12-21 | 2022-12-21 | 应用下载方法、服务器、电子设备及系统 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024131458A1 true WO2024131458A1 (zh) | 2024-06-27 |
Family
ID=91499801
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/134487 WO2024131458A1 (zh) | 2022-12-21 | 2023-11-27 | 应用下载方法、服务器、电子设备及系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118233492A (zh) |
WO (1) | WO2024131458A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020188941A1 (en) * | 2001-06-12 | 2002-12-12 | International Business Machines Corporation | Efficient installation of software packages |
CN107809491A (zh) * | 2017-11-30 | 2018-03-16 | 北京小米移动软件有限公司 | 安装包的下载方法及装置 |
CN108287722A (zh) * | 2018-01-09 | 2018-07-17 | 北京大学 | 一种安卓应用的解耦方法 |
CN110502245A (zh) * | 2018-05-16 | 2019-11-26 | 华为技术有限公司 | 数据处理方法、终端、服务器以及应用开发设备 |
CN112947947A (zh) * | 2019-12-11 | 2021-06-11 | 华为终端有限公司 | 安装包的下载方法、分发方法、终端设备、服务器及系统 |
-
2022
- 2022-12-21 CN CN202211647230.8A patent/CN118233492A/zh active Pending
-
2023
- 2023-11-27 WO PCT/CN2023/134487 patent/WO2024131458A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020188941A1 (en) * | 2001-06-12 | 2002-12-12 | International Business Machines Corporation | Efficient installation of software packages |
CN107809491A (zh) * | 2017-11-30 | 2018-03-16 | 北京小米移动软件有限公司 | 安装包的下载方法及装置 |
CN108287722A (zh) * | 2018-01-09 | 2018-07-17 | 北京大学 | 一种安卓应用的解耦方法 |
CN110502245A (zh) * | 2018-05-16 | 2019-11-26 | 华为技术有限公司 | 数据处理方法、终端、服务器以及应用开发设备 |
CN112947947A (zh) * | 2019-12-11 | 2021-06-11 | 华为终端有限公司 | 安装包的下载方法、分发方法、终端设备、服务器及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN118233492A (zh) | 2024-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4002108B1 (en) | Application start method and electronic device | |
WO2021027630A9 (zh) | 补丁方法、相关装置及系统 | |
JP2023506936A (ja) | マルチ画面共働方法およびシステム、ならびに電子デバイス | |
US11886222B1 (en) | Dynamic link library loading method and apparatus | |
WO2021073337A1 (zh) | 安装插件的方法、装置和存储介质 | |
WO2021052167A1 (zh) | 一种实现应用插件化的方法及电子设备 | |
WO2021042991A1 (zh) | 一种非侵入式交互方法及电子设备 | |
CN115480834A (zh) | 显示方法及电子设备 | |
CN115407961A (zh) | 音频焦点的控制方法及相关装置 | |
WO2022228065A1 (zh) | 功能跳转方法及电子设备 | |
WO2024131458A1 (zh) | 应用下载方法、服务器、电子设备及系统 | |
WO2022228035A1 (zh) | 应用程序的图标更新方法及相关装置 | |
US20230289160A1 (en) | Application installation method and electronic device | |
WO2021238376A1 (zh) | 功能包的加载方法、装置、服务器和电子设备 | |
CN113760192B (zh) | 数据读取方法、装置、存储介质和程序产品 | |
CN113835802A (zh) | 设备交互方法、系统、设备及计算机可读存储介质 | |
CN113760191A (zh) | 数据读取方法、装置、存储介质和程序产品 | |
CN115113867A (zh) | 电子设备及其免安装应用的处理方法、介质 | |
CN114816973A (zh) | 调试代码的方法、装置、电子设备和可读存储介质 | |
WO2024179203A1 (zh) | 语音控制方法及电子设备 | |
WO2024193526A1 (zh) | 一种备份方法及装置 | |
WO2024109484A1 (zh) | 应用迁移方法及电子设备 | |
WO2023005783A1 (zh) | 数据处理方法及电子设备 | |
CN116048629B (zh) | 系统服务切换方法及控制装置、电子设备和存储介质 | |
WO2024104095A1 (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: 23905626 Country of ref document: EP Kind code of ref document: A1 |