WO2023071472A1 - 应用下载安装方法、应用老化方法及电子设备 - Google Patents

应用下载安装方法、应用老化方法及电子设备 Download PDF

Info

Publication number
WO2023071472A1
WO2023071472A1 PCT/CN2022/114539 CN2022114539W WO2023071472A1 WO 2023071472 A1 WO2023071472 A1 WO 2023071472A1 CN 2022114539 W CN2022114539 W CN 2022114539W WO 2023071472 A1 WO2023071472 A1 WO 2023071472A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
subpackage
application
download
time
Prior art date
Application number
PCT/CN2022/114539
Other languages
English (en)
French (fr)
Inventor
许嘉璐
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023071472A1 publication Critical patent/WO2023071472A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/43Assembling or disassembling of packets, e.g. segmentation and reassembly [SAR]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Definitions

  • the present application belongs to the technical field of terminals, and in particular relates to an application downloading and installing method, an application aging method, electronic equipment, and a computer-readable storage medium.
  • Embodiments of the present application provide a method for downloading and installing an application, a method for aging an application, an electronic device, and a computer-readable storage medium, which can solve the problem of slow download speed of applications in the prior art.
  • the embodiment of the present application provides a method for downloading and installing an application, which is applied to a first electronic device, and the method may include:
  • the first electronic device obtains the first subpackage from a second device, and obtains the second subpackage from a third device; the second device is different from the third device;
  • the first electronic device installs the first application according to the first part and the second part.
  • the installation package of the first application may be divided into a first part and a second part, the first part may include the first subpackage, and the second part may include the second subpackage.
  • the first electronic device detects the trigger event of downloading the first application
  • the first electronic device can obtain the first subpackage from the second device, and can obtain the second subpackage from the third device at the same time, so as to obtain the second subpackage from different devices
  • the distributed acquisition of different subpackages of the first application can reduce the time for the first electronic device to download and install the first application, increase the speed of downloading and installing the first application by the first electronic device, thereby improving user experience.
  • the first application may be any application.
  • the first application may be a feature capability (feature ability, FA)
  • the trigger event may be a click or touch operation on an uninstalled FA.
  • the first electronic device may determine the FA as the first application, and may determine that a trigger event for downloading the FA is detected .
  • the first application may be an uninstalled application in the application market, and the trigger event may be a click or touch operation on an install or download button corresponding to the application.
  • the first electronic device may determine the short message application as the first application, and may determine that the download of the short message application is detected. trigger event.
  • the second device may be the user's second electronic device
  • the third device may be the user's third electronic device or a server. That is to say, the first electronic device may obtain the first subpackage from the second electronic device, and obtain the second subpackage from the third electronic device; or, the first electronic device may obtain the first subpackage from the second electronic device, And get the second subpackage from the server.
  • the first subpackage obtained by the first electronic device may be stored in the second electronic device; or, it may be obtained by the second electronic device, for example, it may be obtained by the second electronic device from a server, or it may be It is obtained by the second electronic device from other electronic devices storing the first subpackage.
  • the second subpackage obtained by the first electronic device may be stored in the third electronic device; or may be obtained by the third electronic device, for example, The third electronic device obtains it from the server, or the third electronic device may obtain it from another electronic device that stores the second subpackage. Wherein, the other electronic device may also be the user's second electronic device.
  • the first part may further include a third subpackage, and the first electronic device may acquire the third subpackage from a fourth device, where the fourth device is a fourth electronic device of the user or a server.
  • the fourth electronic device and the second electronic device may be the same electronic device.
  • the fourth electronic device and the third electronic device may be the same electronic device.
  • the fourth electronic device may also be an electronic device other than the second electronic device and the third electronic device.
  • the second part may further include a fourth subpackage, and the first electronic device may acquire the fourth subpackage from the fifth device.
  • the fifth device may be a fifth electronic device of the user or a server. It should be understood that the fifth electronic device and the second electronic device may be the same electronic device, or the fifth electronic device and the third electronic device may be the same electronic device, or the fifth electronic device and the fourth electronic device may be the same electronic device. Certainly, the fifth electronic device may also be an electronic device other than the second electronic device, the third electronic device, and the fourth electronic device.
  • the first part is a basic part of the first application; the second part is a characteristic part, and the second part is related to the attribute of the first electronic device; or, the first part is a characteristic part, and the second part is a basic part.
  • the method may further include:
  • the first electronic device determines a first download time for downloading the first subpackage, and a second download time for downloading the second subpackage;
  • the first electronic device determines a download strategy according to the first download time and the second download time, and the download strategy includes: the first electronic device obtains the first subpackage from the second device, and obtains the first subpackage from the The third device acquires the second subpackage.
  • the first electronic device may determine the download strategy according to the first download time for downloading the first subpackage and the second download time for downloading the second subpackage, so as to determine the second download time according to the download time.
  • the second device and the third device ensure that the time for the first electronic device to obtain the first application is relatively short, thereby increasing the download speed of the first electronic device and improving user experience.
  • the first download time of the first subpackage may be the time when the first electronic device acquires the first subpackage from any sixth device that stores the first subpackage, or may be the time when a certain electronic device of the user obtains the first subpackage from The sum of the time when the first subpackage is downloaded in any sixth device storing the first subpackage and the time when the electronic device transmits the downloaded first subpackage to the first electronic device.
  • the second download time of the second subpackage may be the time when the first electronic device obtains the second subpackage from any device storing the second subpackage, or may be the time when a certain electronic device of the user downloads the second subpackage from any The sum of the time when the second subpackage is downloaded in the device storing the second subpackage and the time when the electronic device transmits the downloaded second subpackage to the first electronic device.
  • the first electronic device may determine the download strategy according to the shortest sum of the first download time and the second download time, so that the time for the first electronic device to obtain the first application is the shortest, and the download speed of the application is increased. , to improve user experience.
  • the first electronic device may also obtain download policies whose sum of the first download time and the second download time is less than or equal to the preset time threshold, and determine the final target download from these download policies.
  • strategy In an example, the first electronic device may determine the target download policy according to the usage conditions and/or device performance of the devices corresponding to these download policies. In another example, the first electronic device may determine the target download strategy according to the user's selection operation, that is, the user may select the target download strategy from these download strategies.
  • the preset time threshold can be set by default by the first electronic device, or can be customized by the user. For example, the user can set the preset time threshold according to the maximum download time acceptable to the user.
  • the first electronic device determining the first download time for downloading the first subpackage may include:
  • the first electronic device obtains the size of the first subpacket and the first speed corresponding to the first subpacket, and the first speed corresponding to the first subpacket includes The speed at which the sixth device downloads the first subpacket, or the speed at which the seventh device downloads the first subpacket and the speed at which the seventh device transmits the first subpacket to the the speed of the first electronic device;
  • the first electronic device determines a first download time for downloading the first subpackage according to the size of the first subpackage and the first speed.
  • the first download time of the first subpackage is the time when the first electronic device obtains the first subpackage from any sixth device that stores the first subpackage
  • the first speed corresponding to the first subpackage The speed at which the first electronic device can download the first subpackage from the sixth device may be.
  • the first speed corresponding to the first subpackage may include the speed at which the seventh device downloads the first subpackage from the sixth device and the speed at which the seventh device downloads the first subpackage The speed of transmission to the first electronic device.
  • the first electronic device may determine the time when the seventh device downloads the first subpackage from the sixth device according to the speed at which the seventh device downloads the first subpackage from the sixth device and the size of the first subpackage, and The time when the seventh device transmits the first subpacket to the first electronic device may be determined according to the speed at which the seventh device transmits the first subpacket to the first electronic device and the size of the first subpacket.
  • the seventh device may be a user's electronic device. For a specific way of determining the time, reference may be made to the aforementioned way of determining T j1 .
  • the method may further include:
  • the first electronic device determines a third download time for downloading the first subpackage and a fourth download time for downloading the second subpackage;
  • the first electronic device determines a target subpackage to be aged according to the third download time and the fourth download time, and ages the target subpackage, and the target subpackage is the first subpackage , or the target subpackage is the second subpackage, and aging the target subpackage includes deleting the target subpackage or uninstalling the target subpackage.
  • the acquisition manner of the third download time and the fourth download time may be the same as that of the aforementioned first download time and second download time.
  • the first electronic device may also directly use the first download time as the third download time, and/or use the second download time as the fourth download time.
  • the first electronic device may directly determine the first download time as the second download time, so as to reduce the determination of the download time. process to improve aging efficiency.
  • the first electronic device can directly determine the second download time as the fourth download time, so as to reduce the download time. Determine the process.
  • the first electronic device aging the target subpackage may include:
  • the first electronic device ages the first subpackage and retains the second subpackage
  • the first electronic device aging the target subpackage may include:
  • the first electronic device ages the second subpackage and retains the first subpackage.
  • the first electronic device when the first electronic device needs to age the downloaded and installed first application, the first electronic device can determine the time to download each subpackage of the first application again, and can The first application is aged according to the download time corresponding to each sub-package, so as to reserve part of the sub-packages of the first application, so that when the first application needs to be used next time, the first electronic device only needs to download part of the sub-packages of the first application package without downloading the entire installation package of the first application, which can reduce the download time of the first application, increase the speed of re-starting the first application, and improve user experience.
  • the first electronic device may retain the subpackage with the longest download time, and may age other subpackages of the first application, that is, may reserve some subpackages with a slower download speed, so that the first application can be started again.
  • the download time of the first application can be reduced.
  • aging the target subpackage may refer to uninstalling the target subpackage, or may refer to deleting the target subpackage.
  • the embodiment of the present application provides an application aging method, which is applied to the first electronic device, and the method may include:
  • the first electronic device determines a first application, and the first application includes a first subpackage and a second subpackage;
  • the first electronic device performs different processing on the first subpacket and the second subpacket, and the first electronic device performs different processing on the first subpacket and the second subpacket, including : the first electronic device ages the first subpacket and retains the second subpacket; or, the first electronic device ages the first subpacket at the first time, and Aging the second subpackage at a second time; aging the first subpackage by the first electronic device includes deleting the first subpackage or uninstalling the first subpackage by the first electronic device .
  • the first electronic device performs different processing on the first subpackage and the second subpackage, and the method may further include:
  • the first electronic device acquires the first download time of the first subpackage, and acquires the second download time of the second subpackage;
  • the first electronic device determines a target subpackage to be aged according to the first download time and the second download time, and ages the target subpackage, and the target subpackage is the first subpackage , or the target subpackage is the second subpackage.
  • the first electronic device aging the target subpackage may include:
  • the first electronic device ages the first subpackage and retains the second subpackage
  • the first electronic device aging the target subpackage may include:
  • the first electronic device ages the second subpackage and retains the first subpackage.
  • the installation package of the application may be split into a first sub-package and a second sub-package.
  • the first electronic device can determine the time to download each sub-package of the application again, and can age the application according to the download time corresponding to each sub-package, Part of the sub-package of the application is reserved, so that when the application needs to be used next time, the first electronic device only needs to download a part of the sub-package of the application, instead of downloading the entire installation package of the application, which can reduce the download time of the application , improve the speed of re-starting the application, and improve the user experience.
  • the first electronic device may retain the subpackage with the longest download time, and may age out other subpackages of the application, that is, reserve some subpackages with a slower download speed, so that when the application is started again, the Reduce the download time of the app.
  • the determination of the first application by the first electronic device may include:
  • the first electronic device acquires a first duration of the second application, the first duration is a continuous duration during which the second application is not used, and the second application is any application in the first electronic device ;
  • the first electronic device determines that the second application is the first application.
  • the acquisition of the first download time of the first subpackage by the first electronic device may include:
  • the first electronic device obtains the size of the first subpacket and the first speed corresponding to the first subpacket, and the first speed corresponding to the first subpacket includes the speed at which the second device downloads the first subpacket, or includes the speed at which the third device downloads the first subpacket and the speed at which the third device transmits the first subpacket to the the speed of the first electronic device;
  • the first electronic device determines a first download time of the first subpackage according to the size of the first subpackage and the first speed.
  • an embodiment of the present application provides an application downloading and installing apparatus, which is applied to a first electronic device, and the apparatus may include:
  • a trigger event detection module configured to detect a trigger event for downloading a first application, the first application includes at least a first part and a second part, the first part includes a first subpackage, and the second part includes a second subpackage Bag;
  • An application installation module configured to install the first application according to the first part and the second part.
  • the second device is a user's second electronic device
  • the third device is a user's third electronic device or a server.
  • the first subpackage obtained by the first electronic device is stored in the second electronic device, or the first subpacket obtained by the first electronic device is the first subpackage obtained by the first electronic device. Two electronic devices acquired.
  • the third device is a third electronic device of the user
  • the second subpackage obtained by the first electronic device is stored in the third electronic device, or, The second subpackage obtained by the first electronic device is obtained by the third electronic device.
  • the first part further includes a third subpackage
  • the device may further include:
  • the third subpackage acquisition module is configured to acquire the third subpackage from a fourth device, where the fourth device is a fourth electronic device of a user or a server.
  • the second part further includes a fourth subpackage
  • the device may further include:
  • a fourth subpackage acquiring module configured to acquire the fourth subpackage from the fifth device.
  • the first part is a basic part of the first application; the second part is a characteristic part, and the second part is related to the attribute of the first electronic device; or, the first part is the feature part, and the second part is the basic part.
  • the device may further include:
  • a first download time determining module configured to determine a first download time for downloading the first subpackage, and a second download time for downloading the second subpackage;
  • a download strategy determining module configured to determine a download strategy according to the first download time and the second download time, the download strategy includes: the first electronic device acquires the first subpackage from the second device, and Acquire the second subpackage from the third device.
  • a first download time determining unit configured to determine a first download time for downloading the first subpackage according to the size of the first subpackage and the first speed.
  • the device may further include:
  • a third download time determining module configured to determine a third download time for downloading the first subpackage and a fourth download time for downloading the second subpackage;
  • a target subpackage aging module configured to determine a target subpackage to be aged according to the third download time and the fourth download time, and age the target subpackage, the target subpackage being the first subpackage, or the target subpackage is the second subpackage, and aging the target subpackage includes deleting the target subpackage or uninstalling the target subpackage.
  • the target subpackage aging module is specifically configured to age the first subpackage and retain the second subpackage;
  • the embodiment of the present application provides an application aging device, which is applied to the first electronic device, and the device may include:
  • a first application determining module configured to determine a first application, where the first application includes a first subpackage and a second subpackage;
  • a sub-packet processing module configured to perform different processing on the first sub-packet and the second sub-packet, and the first electronic device performs different processing on the first sub-packet and the second sub-packet including: the first electronic device ages the first subpackage and retains the second subpackage; or, the first electronic device ages the first subpacket at a first time, and Aging the second subpackage at a second time; aging the first subpackage by the first electronic device includes deleting the first subpackage or uninstalling the first subpackage by the first electronic device Bag.
  • the subpacket processing module may include:
  • a download time obtaining unit configured to obtain the first download time of the first subpackage, and obtain the second download time of the second subpackage
  • a target subpackage aging unit configured to determine a target subpackage to be aged according to the first download time and the second download time, and age the target subpackage, the target subpackage being the first subpackage, or the target subpackage is the second subpackage.
  • the target subpacket aging unit is specifically configured to age the first subpacket and retain the second subpacket;
  • the target subpacket aging unit is specifically configured to age the second subpacket and retain the first subpacket.
  • the first application determining module may include:
  • a duration acquiring unit configured to acquire a first duration of a second application, the first duration is a continuous duration in which the second application is not used, and the second application is any application in the first electronic device ;
  • a first application determining unit configured to determine, by the first electronic device, that the second application is the first application when the first duration is greater than or equal to a preset duration threshold.
  • the download time obtaining unit may include:
  • the first speed determination subunit is configured to acquire the size of the first subpacket and the first speed corresponding to the first subpacket, the first speed corresponding to the first subpacket includes the first electronic device from The second device storing the first subpacket downloads the first subpacket, or includes the speed at which the third device downloads the first subpacket and the third device transmits the first subpacket a speed for the first electronic device;
  • the download time determination subunit is configured to determine a first download time of the first subpackage according to the size of the first subpackage and the first speed.
  • the embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and operable on the processor, when the processor executes the computer program , enabling the electronic device to implement the application downloading and installing method described in any one of the above first aspects, or implement the application aging method described in any one of the above second aspects.
  • the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the computer can realize any of the above-mentioned first aspects.
  • the embodiment of the present application provides a computer program product, which, when the computer program product runs on the electronic device, causes the electronic device to execute the application download and installation method described in any one of the above first aspects, or execute the above-mentioned The application aging method according to any one of the second aspects.
  • FIG. 1 is a schematic structural diagram of an electronic device to which an application download and installation method provided by an embodiment of the present application is applicable;
  • FIG. 2 is a schematic diagram of a software architecture applicable to an application download and installation method provided by an embodiment of the present application
  • FIG. 3 is a structural diagram of a system applied by the application download and installation method provided in Embodiment 1 of the present application;
  • FIG. 4 and Figure 5 are schematic diagrams of the first application scenario provided by the first embodiment of the present application.
  • FIG. 6 is a second schematic diagram of an application scenario provided by Embodiment 1 of the present application.
  • FIG. 7 is a third schematic diagram of an application scenario provided by Embodiment 1 of the present application.
  • FIG. 9 is a schematic flowchart of the method for downloading and installing an application provided in Embodiment 1 of the present application.
  • FIG. 10 is a schematic diagram of an application scenario of the application aging method provided in Embodiment 2 of the present application.
  • the term “if” may be construed, depending on the context, as “when” or “once” or “in response to determining” or “in response to detecting “.
  • the phrase “if determined” or “if [the described condition or event] is detected” may be construed, depending on the context, to mean “once determined” or “in response to the determination” or “once detected [the described condition or event] ]” or “in response to detection of [described condition or event]”.
  • references to "one embodiment” or “some embodiments” or the like in the specification of the present application means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
  • the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
  • the steps involved in the application download and installation method and the application aging method provided in the embodiments of this application are only examples, and not all steps are mandatory steps, or not all information or content in the message is mandatory , can be increased or decreased as needed during use.
  • the same step or steps or messages having the same function can be referred to and used in different embodiments.
  • the electronic device needs to perform aging processing on the applications in the electronic device.
  • the aging process refers to deleting or uninstalling the application.
  • the electronic device performs aging processing on the entire installation package of the application, that is, deletes or uninstalls all the installation packages of the application.
  • This aging processing method causes the user to re-download all the installation packages of the application when he wants to use the application next time, which greatly reduces the speed of restarting the application and reduces the user experience.
  • the embodiment of the present application provides a method for downloading and installing an application.
  • the method divides the installation package of the application into multiple sub-packages, and the cloud and the electronic device that has downloaded the application can store the sub-packages of the application.
  • the first electronic device detects a trigger event for downloading the application, the first electronic device can download part of the application's subpackages from the second device and the third device at the same time, so as to reduce the downloading time of the application installation package by the first electronic device. time, increase the download speed of the first electronic device, and improve user experience.
  • the embodiment of the present application also provides an application aging method, which divides the installation package of the application into multiple sub-packages.
  • the first electronic device can determine the time to download each subpackage of the application again, and age the application according to the download time of each subpackage, so as to retain some subpackages of the application.
  • Package so that when the application needs to be used next time, the first electronic device only needs to download some subpackages of the application, instead of downloading the entire installation package of the application, which can reduce the download time of the application and increase the speed of restarting the application. Improve user experience.
  • the application download and installation method and the application aging method provided in the embodiments of the present application can be applied to electronic devices, and the electronic devices can be mobile phones, tablet computers, wearable devices (such as smart watches, smart glasses, smart headphones, etc.), smart large screens, vehicle-mounted devices, etc. devices, smart speakers, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants , PDA), desktop computer, etc., the embodiment of the present application does not impose any limitation on the specific type of electronic equipment.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an environmental Light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized 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 (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 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 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the storage program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • 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 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes may be determined by the gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • the touch sensor 180K is also called “touch device”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging status, the change of the battery capacity, and can also be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
  • FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, smart fitness and other applications.
  • the application framework layer can include window managers, content providers, view systems, phone managers, resource managers, notification managers, and so on.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
  • the Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the installation package of the application may be split into multiple sub-packages.
  • the electronic device needs to download all subpackages of the application, so as to obtain the application through installation according to all subpackages.
  • the electronic device only acquires part of the subpackages of the application, the electronic device will not be able to install the application, or there may be a problem that all or part of the functions of the installed application cannot be used.
  • developers can develop each sub-package separately, so that the convenience of application development can be improved.
  • installation-free applications that is, applications that can be used after being installed in the background by the system program framework without explicit installation, such as atomic services and feature capabilities (feature ability, FA)
  • developers can The installation package is divided into one or more Harmonyos ability packages (harmonyos ability package, hap).
  • hap corresponds to one ability.
  • Ability is an abstraction of the capabilities of the application and is an important part of the application. Each ability can run independently. A specific function can be completed, and one or more functions can complete a specific convenient service.
  • the application download and installation method provided in this embodiment will be illustrated below by taking the application without installation as an example.
  • both the first subpackage and the second subpackage may include one or more subpackages.
  • the first subpackage may be a basic part of the application, that is, it may be a subpackage contained in each installation package of the application, that is to say, the first subpackage is a data package that can be shared by different types of electronic devices.
  • the second subpackage can be a feature part, that is, the second subpackage can be a subpackage specific to a certain installation package, that is to say, the second subpackage is corresponding to the characteristics (or attributes) of a certain type of electronic equipment data packets.
  • the developer can first divide the sub-packages into the first part and the second part, and then send the first part and the second part to the cloud. Therefore, for any application, the cloud can store the first subpackage of the application and the second subpackages respectively corresponding to various types of electronic devices, so as to reduce the number of data packets stored in the cloud for each application and reduce the number of data packets stored in the cloud. storage burden.
  • the first part of the above description is the basic part, and the second part is the characteristic part, which is only for schematic explanation and should not be construed as limiting the embodiment of the present application.
  • the first part may also be The characteristic part, the second part is the common part.
  • the following will take the first part as the basic part and the second part as the characteristic part as an example for illustration.
  • FIG. 3 shows a system structure diagram applied by the method for downloading and installing an application provided in this embodiment.
  • the system may include a cloud 300 , a first electronic device 110 and at least one second electronic device 120 .
  • the first electronic device 110 is an electronic device that needs to download applications
  • the second electronic device 120 is an electronic device that is communicatively connected to the first electronic device 110 through a communication network.
  • the first electronic device 110 can also communicate with the cloud 300 through a communication network, and the cloud 300 stores the first subpackage and the second subpackage applicable to each application of the first electronic device 110 .
  • the first electronic device 110 and the second electronic device 120 one in (a) in FIG.
  • the cloud 300 may store the first subpackage and each second subpackage of each application applicable to the mobile phone. For example, when the call application and the music application can be applied to the mobile phone, the cloud 300 can store the first subpackage R and the second subpackage A of the call application, and the first subpackage S and the second subpackage of the music application. Subpackage B.
  • the first electronic device 110 and the second electronic device 120 are electronic devices of the same type but have different characteristics, that is, when the first electronic device 110 and the second electronic device 120 are electronic devices of the same type devices, but have different second subpackages, the first electronic device 110 may be regarded as a different type of electronic device from the second electronic device 120 to download and install the application.
  • the first electronic device 110 may determine whether to download the first application according to whether a trigger event for downloading the first application is detected.
  • the first application may be any application.
  • the first application may be an FA
  • the trigger event may be a click or touch operation on an uninstalled FA.
  • the first application may be an uninstalled application in the application market, and the trigger event may be a click or a touch operation on an install or download button corresponding to the application.
  • the first electronic device 110 and the second electronic device 120 may also be electronic devices of different types.
  • the first electronic device 110 can be a mobile phone
  • the second electronic device 120 can be a smart watch, a computer, a tablet computer, and a smart large screen respectively.
  • the cloud 300 can store various applications that can be applied to the first electronic device 110 The first subpackage and the second subpackage of .
  • Each application that can be applied to the first electronic device 110 can also be applied to at least one type of second electronic device 120. Therefore, the second subpackage of each application can at least include the second subpackage corresponding to the first electronic device 110.
  • the second subpackage H corresponding to the tablet computer, and the second subpackage I corresponding to the smart big screen;
  • the first subpackage T of the fitness application the second subpackage J corresponding to the mobile phone, the second subpackage K corresponding to the smart watch, the second subpackage L corresponding to the smart big screen, and so on.
  • the communication network may be a local area network such as Bluetooth, WiFi, ZigBee, or NFC, or it may be 2G, 3G, 4G, 5G, a future evolved public land mobile network (public land mobile network, PLMN) or the Internet, etc. Wan.
  • a local area network such as Bluetooth, WiFi, ZigBee, or NFC
  • 2G, 3G, 4G, 5G a future evolved public land mobile network (public land mobile network, PLMN) or the Internet, etc. Wan.
  • the process of downloading an application by the first electronic device 110 will be described in detail below by taking an example in which the first sub-package of the application and the second sub-package corresponding to each type of electronic device respectively include multiple.
  • the first electronic device 110 may first determine whether each second electronic device 120 has downloaded the application. When none of the second electronic devices 120 has downloaded the application, it indicates that only the cloud 300 stores the first subpackage and each second subpackage of the application. At this time, the first electronic device 110 can download the application from the cloud 300.
  • the first subpackage and the second subpackage corresponding to the first electronic device 110 For example, in the application scenario shown in (b) in Figure 3, when the mobile phone needs to download the call application, if the smart watch, computer, tablet computer and smart big screen have not downloaded the call application, it means that only the cloud 300 stores the call application.
  • the first subpackage R and each second subpackage (i.e. A, B, C, D, E) of the call application at this time, the mobile phone can download the first subpackage R of the call application and the corresponding subpackages of the mobile phone from the cloud 300.
  • the second subpackage A is a.
  • the first electronic device 110 may determine whether each second electronic device 120 has downloaded the application according to the subpackage information of the application in each second electronic device 120 . Specifically, when the application needs to be downloaded, the first electronic device 110 can send a first query request to the cloud 300 to request to query the subpackage information of the application, for example, the first electronic device 110 can call the pagequery interface and send the query request to the cloud 300 The first query request. After the cloud 300 receives the first query request, it can query the sub-package information of the application, and can store the queried sub-package information in the form of an array (such as ⁇ sub-package 1, sub-package 2, ..., sub-package n ⁇ ) is returned to the first electronic device 110.
  • an array such as ⁇ sub-package 1, sub-package 2, ..., sub-package n ⁇
  • the first electronic device 110 may respectively send a second query request to each second electronic device 120 to request to query the subpackage information of the application in each second electronic device 120, for example, the first electronic device 110 may call the queryDevicesFa interface, Send the second query request to each second electronic device 120 respectively.
  • each second electronic device 120 receives the second query request, it can query the relevant information of the application in each second electronic device 120 , and can send the query result to the first electronic device 110 .
  • the first electronic device 110 may determine whether each second electronic device 120 has downloaded the application according to the query result returned by each second electronic device 120 and the subpackage information returned by the cloud 300 .
  • the first electronic device 110 can first determine the type of electronic device to which the application can be applied. . Then, the first electronic device 110 may determine whether those types of second electronic devices 120 have downloaded the application. That is, the first electronic device 110 only needs to send a second query request to these types of second electronic devices 120 to query the relevant information of the application, instead of sending a second query request to each second electronic device 120, reducing the number of queries , improve query efficiency, and increase the application download speed of the first electronic device 110 .
  • the mobile phone when the mobile phone needs to download the smart fitness application, the mobile phone can first determine the type of electronic equipment that the smart fitness application can be applied to, assuming that the smart fitness application can be applied
  • the types of electronic devices are mobile phones, smart watches and smart big screens.
  • the mobile phone can only send a second query request to the smart watch and the smart big screen respectively, so as to request whether the smart fitness application exists in the smart watch and the smart big screen related information.
  • the mobile phone can determine that the smart watch has downloaded the smart fitness application, but the smart big screen has not downloaded the smart fitness application. fitness app.
  • the installation package determines the type of electronic device to which the application can be applied. That is, the cloud 300 may store the types of electronic devices applicable to each application. Therefore, the first electronic device 110 can directly send a type query request to the cloud 300 to query the type of electronic device to which the application can be applied.
  • FIG. 4 and FIG. 5 show a first schematic diagram of an application scenario provided by this embodiment.
  • the first electronic device 110 may send a download instruction to at least one second electronic device 120, the download instruction It is used to instruct the at least one second electronic device 120 to download the first subpackage of the application from the cloud 300 and/or download the second subpackage corresponding to the first electronic device 110, and download the downloaded first subpackage and/or Or the second subpackage is sent to the first electronic device 110 .
  • the first electronic device 110 may instruct a certain second electronic device 120 to download from the cloud 300 a complete installation package corresponding to the first electronic device 110 (that is, the first sub-package of the application and the first sub-package associated with the first electronic device 110). corresponding to the second subpackage). Specifically, the first electronic device 110 may first determine the first time when each second electronic device 120 downloads the complete installation package from the cloud 300 and the first time when each second electronic device 120 sends the complete installation package to the first electronic device 110. Two time.
  • the first electronic device 110 may determine the second electronic device 120 whose sum of the first time and the second time is the shortest as the second electronic device 120 that finally downloads the complete installation package from the cloud 300, and sends the determined second electronic device 120
  • the electronic device 120 sends a download instruction to instruct it to download the first subpackage of the application and the second subpackage corresponding to the first electronic device 110 from the cloud 300, and send the downloaded first subpackage and the second subpackage to Downloading the application to the first electronic device 110, that is, through the second electronic device with better performance, can reduce the time for the first electronic device 110 to download the application, increase the download speed of the first electronic device 110, and improve user experience.
  • the mobile phone can first determine the smart watch The first time TW 1 for downloading the first subpackage S of the music application and the second subpackage F corresponding to the mobile phone from the cloud 300, and the second time TW for sending the first subpackage S and the second subpackage F to the mobile phone 2.
  • the mobile phone can determine that the tablet computer is to download the first subpackage from the cloud 300 S and the second electronic device of the second subpackage F, at this time, as shown in (a) in Figure 4, the mobile phone can send a download instruction to the tablet computer to instruct the tablet computer to download the first music application from the cloud 300. subpackage S and second subpackage F, and send the downloaded first subpackage S and second subpackage F to the mobile phone.
  • the tablet computer receives the download instruction, it can send a download request to the cloud 300 to request to download the first subpackage S and the second subpackage F.
  • the first time for any second electronic device 120 to download the complete installation package from the cloud 300 can be determined according to the network transmission speed between the second electronic device 120 and the cloud 300 and the size volume all of the complete installation package . Assuming that when the j-th second electronic device 120 downloads the complete installation package from the cloud 300, it takes time t j,delay1 to reach a stable speed v j,max1 , then the j-th second electronic device 120 downloads the complete installation package from the cloud 300
  • the first time T j1 of the package t j, delay1 + max (volume all - volume 1 , 0)/vj, max1, volume 1 is the installation time downloaded by the second electronic device 120 from the cloud 300 within the time t j, delay1 The size of the package.
  • the second time for the second electronic device 120 to send the complete installation package to the first electronic device 110 may be based on the network transmission speed between the second electronic device 120 and the first electronic device 110 and the size of the complete installation package volume all OK. Assuming that when the j-th second electronic device 120 transmits the complete installation package to the first electronic device 110, it takes time t j,delay2 to reach a stable speed v j,max2 , then the j-th second electronic device 120 transmits the complete installation package to the first electronic device 110.
  • the second time T j2 t j,delay2 +max(volume all -volume 2 , 0)/v j,max2 when the installation package is sent to the first electronic device 110, volume 2 is within the time t j,delay2 , the second The size of the installation package that the electronic device 120 transmits to the first electronic device 110 .
  • the network transmission speed between the second electronic device 120 and the cloud 300 refers to the transmission speed of the network connected between the second electronic device 120 and the cloud 300 when the first electronic device 110 requests to download the application.
  • the network transmission speed between the second electronic device 120 and the first electronic device 110 refers to the speed of the network connected between the second electronic device 120 and the first electronic device 110 when the first electronic device 110 requests to download the application. transfer speed. It can be understood that the network transmission speed between the second electronic device 120 and the cloud 300 and the network transmission speed between the second electronic device 120 and the first electronic device 110 can be determined according to actual conditions.
  • the first electronic device 110 may also obtain the second electronic devices whose sum of the first time and the second time is less than or equal to the preset time threshold, and determine from these second electronic devices that the final download from the cloud 300 Electronics for this complete installation package.
  • the first electronic device 110 may determine the electronic device that finally downloads the complete installation package from the cloud 300 according to the current usage and/or device performance of these second electronic devices, for example, the second electronic device that is currently in an idle state may be The electronic device is determined to be the electronic device for which the cloud 300 finally downloads the complete installation package.
  • the first electronic device 110 can determine the electronic device that finally downloads the complete installation package from the cloud 300 according to the user's selection operation, that is, the user can choose from these second electronic devices to finally download the complete installation package from the cloud 300. Pack of electronic devices.
  • the preset time threshold can be set by default by the first electronic device 110, or can be customized by the user.
  • the user can set the preset time threshold according to the maximum download time he can accept, such as setting the preset time threshold from Define the settings as 40 seconds, 60 seconds or 80 seconds, etc.
  • the second electronic device with the shortest sum of the third time and the fourth time is subsequently determined as the second electronic device that finally downloads the first subpackage or the second subpackage from the cloud 300.
  • the device 120 is also only used for schematic explanation, and should not be construed as limiting the embodiment of the present application.
  • the first electronic device 110 may instruct a certain second electronic device 120 to download all the first subpackages of the application from the cloud 300, and at the same time, the first electronic device 110 may download from the cloud 300 the first electronic device 110 package. all corresponding second subpackages; or, the first electronic device 110 may instruct a certain second electronic device 120 to download all second subpackages corresponding to the first electronic device 110 from the cloud 300, and the first electronic device 110 may download from the cloud 300
  • the cloud 300 downloads all the first subpackages of the application; or, the first electronic device 110 may instruct a certain second electronic device 120 to download all the first subpackages of the application from the cloud 300, and at the same time instruct another second electronic device 120 to download all the first subpackages of the application.
  • the first electronic device 110 may determine the third time when each second electronic device 120 downloads all the first subpackages from the cloud 300 and send the downloaded first subpackages to the first electronic device 110 for the fourth time. Then, the first electronic device 110 may determine the second electronic device 120 whose sum of the third time and the fourth time is the shortest as the second electronic device 120 that finally downloads all the first subpackages from the cloud 300, and sends the determined second electronic device 120
  • the second electronic device 120 sends a download instruction to instruct it to download all the first subpackages of the application from the cloud 300, and can send the downloaded first subpackages to the first electronic device 110, and the first electronic device 110 can download from the cloud 300.
  • the cloud 300 downloads all second subpackages corresponding to the first electronic device 110 .
  • the mobile phone can first determine the smart watch The third time TW 13 when the first subpackage R of the call application is downloaded from the cloud 300 and the fourth time TW 14 when the first subpackage R is sent to the mobile phone, and the third time when the computer downloads the first subpackage R from the cloud 300 TC 13 and the fourth time TC 14 for sending the first subpackage R to the mobile phone, the third time TP 13 for the tablet computer to download the first subpackage R from the cloud 300 and the fourth time for sending the first subpackage R to the mobile phone TP 14 , the third time TS 13 when the smart screen downloads the first subpackage R from the cloud 300, and the fourth time TS 14 when the first subpackage R is sent to the mobile phone.
  • the mobile phone can determine that the computer is to download the first subpackage R from the cloud 300
  • the mobile phone can send a download command to the computer to instruct the computer to download the first subpackage R of the call application from the cloud 300, and download the downloaded The first subpacket R is sent to the mobile phone.
  • the computer receives the download instruction, it can send a first download request to the cloud 300 to request to download the first subpackage R.
  • the mobile phone may send a second download request to the cloud 300 to request to download the second subpackage A corresponding to the mobile phone.
  • the first electronic device 110 may determine a third time when each second electronic device 120 downloads all second subpackages corresponding to the first electronic device 110 from the cloud 300 and store the downloaded The fourth time when the second subpacket is sent to the first electronic device 110 .
  • the first electronic device 110 may determine the second electronic device 120 whose sum of the third time and the fourth time is the shortest as the second electronic device 120 that finally downloads the second subpackage from the cloud 300, and sends the determined second electronic device 120
  • the electronic device 120 sends a download instruction to instruct it to download all the second subpackages corresponding to the first electronic device 110 from the cloud 300, and send the downloaded second subpackages to the first electronic device 110, while the first electronic device 110 may download the first subpackage of the application from the cloud 300 .
  • the mobile phone can first determine the smart watch The third time TW 23 when the second subpackage A corresponding to the first electronic device 110 is downloaded from the cloud 300 and the fourth time TW 24 when the second subpackage A is sent to the mobile phone, the computer downloads the second subpackage A from the cloud 300
  • the mobile phone can determine that the smart screen is downloaded from the cloud 300.
  • the second electronic device of subpackage A at this time, as shown in (a) in Figure 5, the mobile phone can send a download command to the smart big screen to instruct the smart big screen to download the second subpackage of the call application from the cloud 300 A, and send the downloaded second subpackage A to the mobile phone.
  • the smart large screen receives the download instruction, it can send a first download request to the cloud 300 to request to download the second subpackage A.
  • the mobile phone may send a second download request to the cloud 300 to request to download the first subpackage R of the calling application.
  • the first electronic device 120 may determine the third time when each second electronic device 120 downloads all the first subpackages of the application from the cloud 300 and send the downloaded first subpackages to the The fourth time of the first electronic device 110, and determine the fifth time when each second electronic device 120 downloads all the second subpackages corresponding to the first electronic device 110 from the cloud 300 and send the downloaded second subpackages to The sixth time of the first electronic device 110 .
  • the first electronic device 110 may determine the second electronic device a with the shortest sum of the third time and the fourth time as the electronic device that downloaded all the first subpackages of the application from the cloud 300, and may compare the fifth time and the fourth time
  • the second electronic device b with the shortest sixth time sum is determined as the electronic device that downloads the second subpackage corresponding to the first electronic device 110 from the cloud 300 .
  • the first electronic device 110 may send a first download instruction to the second electronic device a, and at the same time send a second download instruction to the second electronic device b, the first download instruction is used to instruct to download all the first subtitles of the application. package, and send the downloaded first subpackage to the first electronic device 110, the second download instruction is used to instruct to download all the second subpackages corresponding to the first electronic device 110, and send the downloaded second subpackage sent to the first electronic device 110.
  • the mobile phone can first determine the smart watch The third time TW 13 when downloading all the first subpackages R of the call application from the cloud 300 and the fourth time TW 14 when the first subpackage R is sent to the mobile phone, the computer downloads the third time TW 14 of the first subpackage R from the cloud 300 Time TC 13 and the fourth time TC 14 when the first subpackage R is sent to the mobile phone, the third time TP 13 when the tablet computer downloads the first subpackage R from the cloud 300 and the fourth time TP 13 when the first subpackage R is sent to the mobile phone Time TP 14 , the third time TS 13 when the smart screen downloads the first subpackage R from the cloud 300 , and the fourth time TS 14 when the first subpackage R is sent to the mobile phone.
  • the first electronic device 110 can also determine the fifth time TW 25 when the smart watch downloads the second subpackage A corresponding to the first electronic device 110 from the cloud 300 and the sixth time TW when the second subpackage A is sent to the mobile phone.
  • the fifth time TC 25 when the computer downloads the second subpackage A from the cloud 300 and the sixth time TC 26 when the second subpackage A is sent to the mobile phone the fifth time when the tablet computer downloads the second subpackage A from the cloud 300 TP 25 and the sixth time TP 26 when the second subpackage A is sent to the mobile phone
  • the mobile phone determines that (TC 13 +TC 14 ) ⁇ (TS 13 +TS 14 ) ⁇ (TP 13 +TP 14 ) ⁇ (TW 13 +TW 14 ), and (TS 25 +TS 26 ) ⁇ (TC 25 +TC 26 ) ⁇ (TP 25 +TP 26 ) ⁇ (TW 25 +TW 26 ), the mobile phone can determine the computer as the second electronic device for downloading the first subpackage R from the cloud 300, and determine the smart screen as the downloading from the cloud 300
  • the second electronic device of the second subpackage A as shown in (b) in Figure 5, the mobile phone can send the first download instruction to the computer to instruct the computer to download the first subpackage R from the cloud 300, and download the downloaded The first subpackage R is sent to the mobile phone.
  • the mobile phone can send a second download command to the smart large screen to instruct the smart large screen to download the second subpackage A from the cloud 300, and send the downloaded second subpackage A to cell phone.
  • the computer receives the first download instruction, it can send a first download request to the cloud 300 to request to download the first subpackage R.
  • the smart large screen receives the second download instruction, it can send a second download request to the cloud 300 to request to download the second subpackage A.
  • the determination method of the third time, the fourth time, the fifth time and the sixth time mentioned above is similar to the determination method of the first time or the second time mentioned above, and the principle is basically the same.
  • the specific content please refer to the foregoing description. This will not be repeated here.
  • the first electronic device 110 may obtain the second electronic device c whose sum of the third time and the fourth time is only greater than T a , And obtain the second electronic device d whose sum of the fifth time and the sixth time is only greater than T b .
  • T a is the sum of the third time and the fourth time corresponding to the second electronic device a
  • T b is the sum of the fifth time and the sixth time corresponding to the second electronic device b.
  • the first electronic device 110 may determine the time T a ' when the second electronic device a downloads all the first subpackages and all the second subpackages corresponding to the first electronic device 110 . Subsequently, the first electronic device 110 determines the smaller value of T c and T d , and downloads the application according to the smaller value, T a , T b and T a ′ .
  • the first electronic device 110 can determine All first subpackages of the application and all second subpackages corresponding to the first electronic device 110 are downloaded by the second electronic device a.
  • the first electronic device 110 may instruct at least two electronic devices among the first electronic device 110 and the second electronic device 120 to download the first subpackage of the application in a distributed manner.
  • the first electronic device 110 may instruct at least two electronic devices among the first electronic device 110 and the second electronic device 120 to download the second subpackage corresponding to the first electronic device 110 in a distributed manner.
  • the first electronic device 110 may instruct at least two electronic devices among the first electronic device 110 and the second electronic device 120 to download the installation package of the application in a distributed manner (that is, the first sub-package and the first sub-package corresponding to the first electronic device 110). second subpackage). That is, by downloading the installation package of the application distributedly by multiple electronic devices, the download time of the installation package can be reduced, and the speed at which the first electronic device 110 downloads the application can be improved.
  • the following will take an example in which the first electronic device 110 instructs at least two electronic devices among the first electronic device 110 and the second electronic device 120 to download the first subpackage of the application in a distributed manner.
  • the distributed downloading of the second subpackage corresponding to the first electronic device 110 and the distributed downloading of the installation package of the application reference may be made to the related content of the distributed downloading of the first subpackage of the application.
  • the first electronic device 110 may determine all possible grouping methods for grouping the first subpackage of the application according to the number of the second electronic device 120, and perform grouping of the first subpackage of the application according to each grouping method. grouping to obtain each sub-packet group corresponding to each grouping mode. Subsequently, for each grouping method, the first electronic device 110 may determine all possible distributed downloading methods corresponding to the grouping method. Then, the first electronic device 110 can determine the download time corresponding to each distributed download method, and can determine the download strategy corresponding to the application according to the distributed download method with the shortest download time. Each electronic device of the package and the sub-packages that each electronic device needs to download. Each subpackage group may include one or more first subpackages, and the number of subpackage groups corresponding to each grouping manner is s ⁇ [2,1+n], where n is the number of second electronic devices 120 .
  • FIG. 6 shows a second schematic diagram of an application scenario provided by this embodiment.
  • the first electronic device 110 may be a mobile phone
  • the second electronic device 120 may include a smart watch and a tablet computer.
  • the mobile phone, the smart watch and the tablet computer communicate with the cloud 300 through the communication network respectively.
  • the cloud 300 stores a call application that can be applied to a mobile phone.
  • the first subpackage R of the call application may include ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇ , and both the smart watch and the tablet computer
  • the calling app was not downloaded.
  • the mobile phone can determine all possible grouping methods for grouping the first subpackage R according to the number of the second electronic devices 120, and can group the first subpackage R according to each grouping method , to obtain each sub-packet group corresponding to each grouping mode. For example, the mobile phone can obtain the grouping method A, grouping method B, and grouping method C according to the method of dividing the first subpackage R into two subpackage groups, and obtain the grouping method according to the method of dividing the first subpackage R into three subpackage groups. Grouping method D, grouping method E and grouping method F, etc.
  • the subpackage group corresponding to grouping mode A may include ⁇ R 1 , R 2 , R 3 , R 4 , R 5 ⁇ and ⁇ R 6 ⁇
  • the subpacket group corresponding to grouping mode B may include ⁇ R 1 , R 3 , R 5 , R 6 ⁇ and ⁇ R 2 , R 4 ⁇
  • the subpackage group corresponding to the grouping method C can include ⁇ R 1 , R 3 , R 4 ⁇ and ⁇ R 2 , R 5 , R 6 ⁇
  • the subpackage group corresponding to the grouping method D can include ⁇ R 1 , R 2 ⁇ , ⁇ R 3 , R 4 ⁇ and ⁇ R 5 , R 6 ⁇
  • the subpacket group corresponding to the grouping method E can include ⁇ R 1 , R 2 , R 3 ⁇ , ⁇ R 4 , R 5 ⁇ and ⁇ R 6 ⁇
  • the subpackage group corresponding to the grouping method F can include ⁇ R
  • the mobile phone can determine all possible distributed downloading methods corresponding to the grouping method, and determine the download time corresponding to each distributed downloading method.
  • the mobile phone can determine the distributed downloading method 1 as: the mobile phone downloads the subpackage group ⁇ R 1 , R 3 , R 4 ⁇ , and the smart watch downloads the subpackage group ⁇ R 2 , R 5 , R 6 ⁇ ;
  • the second distributed download method is; the mobile phone download subpackage group ⁇ R 1 , R 3 , R 4 ⁇ , the tablet computer download subpackage group ⁇ R 2 , R 5 , R 6 ⁇ ;
  • the third distributed download method is: mobile phone Download subpackage group ⁇ R 2 , R 5 , R 6 ⁇ , smart watch download ⁇ R 1 , R 3 , R 4 ⁇ ;
  • the fourth distributed download method is: mobile phone download subpackage group ⁇ R 2 , R 5 , R 6 ⁇ , tablet computer download subpackage group ⁇ R 1 , R 3
  • the download time T 1 max(TI 11 , TW 12 +TW 13 ) corresponding to the distributed download mode 1
  • TI 11 is the first subpackage ⁇ R 1 , R 3 , R 4 ⁇ downloaded by the mobile phone from the cloud 300
  • TW 12 is the time when the smart watch downloads the first subpackage ⁇ R 2 , R 5 , R 6 ⁇ from the cloud 300
  • TW 13 is the time when the smart watch transmits the first subpackage ⁇ R 2 , R 5 , R 6 ⁇ to cell phone time.
  • TW 52 is the time when the smart watch transmits the first subpackage ⁇ R 1 , R 3 , R 4 ⁇ to the mobile phone
  • TP 53 is the time when the tablet downloads the first subpackage ⁇ R 2 , R 5 , R 4 ⁇ from the cloud 300 6 ⁇
  • TP 54 is the time when the tablet computer transmits the first subpacket ⁇ R 2 , R 5 , R 6 ⁇ to the mobile phone.
  • the download time corresponding to distributed download method 2 the download time corresponding to distributed download method 3, and the download time corresponding to distributed download method 4 are determined in the same principle as the download time corresponding to distributed download method 1, and the distributed download method
  • the download time corresponding to five is determined in the same principle as the download time corresponding to distributed download mode six, and will not be repeated here.
  • the mobile phone can obtain the distributed download method with the shortest download time, and download the first subpackage according to the distributed download method.
  • the mobile phone can determine that the mobile phone downloads the first subpackage ⁇ R 2 , R 5 , R 6 ⁇ from the cloud 300, and at the same time
  • the tablet computer downloads the first subpackage ⁇ R 1 , R 3 , R 4 ⁇ from the cloud 300 .
  • the mobile phone can send a download instruction to the tablet computer to instruct the tablet computer to download the first subpackage R 1 , the first subpackage R 3 and the first subpackage R 4 of the application from the cloud 300, and store the downloaded The first subpacket R 1 , the first subpacket R 3 and the first subpacket R 4 are sent to the mobile phone.
  • the tablet computer may send a first download request to the cloud 300 to request to download the first subpackage R 1 , the first subpackage R 3 and the first subpackage R 4 .
  • the mobile phone itself may send a second download request to the cloud 300 to request to download the first subpackage R 2 , the first subpackage R 5 and the first subpackage R 6 of the application.
  • the first electronic device 110 may first classify the first subpackage according to the size of the first subpackage, that is, divide the first subpackage into preset Levels, each level may include one or more first subpackages. Then, the first electronic device 110 can group all the first subpackages in each level as a whole to obtain the subpackage groups corresponding to each grouping mode, and each subpackage group can include at least one All first subpackages in the hierarchy.
  • the first electronic device 110 may determine all possible distributed downloading methods corresponding to the grouping method. Subsequently, the first electronic device 110 can determine the download time corresponding to each distributed download mode, and determine the download strategy corresponding to the application according to the distributed download mode with the shortest download time, that is, determine to download each subpackage of the first subpackage of the application. The electronic device and the subpackages required to be downloaded by each electronic device.
  • the first electronic device 110 can determine the preset level according to the actual situation. ⁇ ] divides the first subpackage of the application into three levels, and the volume may be the size of the downloaded subpackage when the first electronic device 110 reaches an optimal stable speed.
  • the first electronic device 110 can obtain the download time required for the first electronic device 110 to directly download the first subpackage of the application, and instruct a second electronic device
  • the device 120 takes the shortest download time required to download the first subpackage, and can determine the electronic device that finally downloads the first subpackage according to the multiple download times.
  • the first electronic device may determine the electronic device that finally downloads the first subpackage according to the shortest time among the multiple download times.
  • the first electronic device 110 may download the application according to the first electronic device 110. Whether the installation package downloaded by the third electronic device includes the second sub-package corresponding to the first electronic device 110 to download the application.
  • the installation package downloaded by the third electronic device does not include the second sub-package corresponding to the first electronic device 110
  • each electronic device when each electronic device downloads an application, it may only download the first subpackage of the application and the second subpackage corresponding to the electronic device. Therefore, when the first electronic device 110 downloads the application, if there is a third electronic device, it indicates that the third electronic device has the first subpackage of the application. That is to say, the cloud 300 has the second subpackage corresponding to the first electronic device 110, and both the third electronic device and the cloud 300 have the first subpackage of the application. At this time, the first electronic device 110 may download the second subpackage corresponding to the first electronic device 110 from the cloud 300, and may download the first subpackage of the application from the cloud 300 and/or the third electronic device.
  • the first electronic device 110 only downloads the first subpackage of the application from the cloud 300 and the content of the second subpackage corresponding to the first electronic device 110 can refer to the first electronic device 110 downloading the complete application from the cloud 300. A description of the package to install.
  • the first electronic device 110 may download the first subpackage of the application from the third electronic device, and may simultaneously download the second subpackage corresponding to the first electronic device 110 from the cloud 300 .
  • the first electronic device 110 may download the first subpackage from the one third electronic device.
  • the first electronic device 110 may determine the third electronic device with the shortest download time, and download the first subpackage from the third electronic device with the shortest download time.
  • the download time at this time refers to the time required for the first electronic device 110 to download all the first subpackages from the third electronic device.
  • the downloading time at this time and the downloading time described later can be determined by referring to the method for determining the first time mentioned above, which will not be repeated here.
  • the first electronic device 110 may download the second subpackage corresponding to the first electronic device 110 from the cloud 300, and may download the first subpackage of the application from the cloud 300 and the third electronic device in a distributed manner.
  • the first electronic device 110 may determine all possible grouping methods for grouping the first subpackages according to the number of the third electronic devices, and may group the first subpackages according to each grouping method to obtain the grouping methods of each grouping method.
  • Corresponding subpackage groups wherein, the number s ⁇ [2,1+n] of the sub-package groups corresponding to each grouping manner, n is the number of the third electronic devices.
  • the first electronic device 110 may determine all possible distributed downloading methods corresponding to the grouping method. Then, the first electronic device 110 may determine the download time corresponding to each distributed download mode, and download the application according to the distributed download mode with the shortest download time.
  • the first electronic device 110 can obtain the download time required for the first electronic device 110 to directly download the second subpackage of the application, and instruct a second electronic device 120
  • the shortest download time required for downloading the second subpackage, and the electronic device that finally downloads the second subpackage can be determined according to the multiple download times.
  • the first electronic device may determine the electronic device that finally downloads the second subpackage according to the shortest time among the multiple download times.
  • the download time corresponding to the distributed download mode is the maximum value of the time required for the first electronic device 110 to download part of the first subpackage from the devices involved in the distributed download mode. Since the first electronic device 110 needs to download the second subpackage corresponding to the first electronic device 110 from the cloud 300, when the distributed download method involves downloading the first subpackage from the cloud 300, the first electronic device 110 downloads the first subpackage from the cloud 300.
  • the time when the cloud 300 downloads the first subpackage may include the time when the first electronic device 110 downloads the second subpackage corresponding to the first electronic device 110 from the cloud 300 and the time when part of the first subpackage is downloaded from the cloud 300 .
  • FIG. 7 shows a third schematic diagram of an application scenario provided by this embodiment.
  • the first subpackage R of the calling application can include ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇
  • the mobile phone determines the smart watch and tablet
  • the computer has downloaded the calling application. That is, the smart watch has the first subpackage ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇ and the second subpackage B of the calling application, and the tablet computer has the first subpackage of the calling application.
  • package ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇ and a second sub-package D.
  • the mobile phone can determine the time TW for downloading the first subpackage ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇ from the smart watch and download the first subpackage ⁇ R 1 , R 6 ⁇ from the tablet computer. 2 , R 3 , R 4 , R 5 , R 6 ⁇ time TP, assuming that the mobile phone determines that TW ⁇ TP, as shown in (a) in Figure 7, the mobile phone can send the first download request to the cloud 300 to request the download The second subpackage A corresponding to the mobile phone. At the same time, the mobile phone can send a second download request to the slave smart watch to request to download the first subpackage ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇ .
  • the mobile phone may determine all possible grouping modes for grouping the first subpackage, and perform grouping on the first subpacket ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇ according to each grouping mode. grouping to obtain each sub-packet group corresponding to each grouping mode. For example, according to the method of dividing the first sub-package ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇ into two sub-package groups, the grouping method d and the grouping method e can be obtained.
  • a sub-package ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇ is divided into three sub-package groups, and the grouping method f and the grouping method g can be obtained.
  • the sub-package group corresponding to the grouping method d may include ⁇ R 1 , R 2 , R 4 ⁇ and ⁇ R 3 , R 5 , R 6 ⁇
  • the sub-packet group corresponding to the grouping method e may include ⁇ R 1 , R 4 , R 5 , R 6 ⁇ and ⁇ R 2 , R 3 ⁇
  • the subpackage group corresponding to the grouping method f can include ⁇ R 1 , R 2 , R 3 ⁇ , ⁇ R 4 , R 5 ⁇ and ⁇ R 6 ⁇
  • the subpackage groups corresponding to the grouping mode g may include ⁇ R 2 , R 3 ⁇ , ⁇ R 1 , R 5 ⁇ , and ⁇ R 4 , R
  • the mobile phone can determine all possible distributed downloading methods corresponding to the grouping method, and determine the download time corresponding to each distributed downloading method. For example, for the grouping method d, the mobile phone can determine the distributed downloading method one as follows: the mobile phone downloads the subpackage group ⁇ R 1 , R 2 , R 4 ⁇ from the smart watch, and downloads ⁇ R 3 , R 5 , R 4 ⁇ from the tablet computer at the same time.
  • the second distributed download method can be: the mobile phone downloads ⁇ R 3 , R 5 , R 6 ⁇ from the smart watch, and simultaneously downloads ⁇ R 1 , R 2 , R 4 ⁇ from the tablet computer;
  • the third distributed download method can It is: the mobile phone downloads the subpackage group ⁇ R 1 , R 2 , R 4 ⁇ from the cloud, and simultaneously downloads ⁇ R 3 , R 5 , R 6 ⁇ from the smart watch;
  • the fourth distributed download method can be: the mobile phone downloads from the cloud ⁇ R 3 , R 5 , R 6 ⁇ , and simultaneously download ⁇ R 1 , R 2 , R 4 ⁇ from the tablet.
  • the download time corresponding to distributed download mode 1 max(TW, TP), at this time TW is the time for the mobile phone to download the first subpackage ⁇ R 1 , R 2 , R 4 ⁇ from the smart watch, and TP is the time for the mobile phone to download the first subpackage ⁇ R 1 , R 2 , R 4 ⁇ from the tablet
  • TW is the time for the mobile phone to download the first subpackage ⁇ R 1 , R 2 , R 4 ⁇ from the tablet
  • TP is the time for the mobile phone to download the first subpackage ⁇ R 1 , R 2 , R 4 ⁇ from the tablet
  • the download time corresponding to distributed download method 3 max(TC, TW), at this time TC is the time for the mobile phone to download the first subpackage ⁇ R 1 , R 2 , R 4 ⁇ and the second subpackage A from the cloud, and TW is The time when the mobile phone downloads the first subpackage ⁇ R 3 , R 5 , R 6 ⁇ from the smart watch.
  • TC the time for the mobile phone to download the first subpackage ⁇ R 1 , R 2 , R 4 ⁇ and the second subpackage A from the cloud
  • TW is The time when the mobile phone downloads the first subpackage ⁇ R 3 , R 5 , R 6 ⁇ from the smart watch.
  • the mobile phone can download the application according to the distributed download method with the shortest download time. Assuming that the mobile phone determines that the download time corresponding to the above-mentioned distributed download method 2 is the shortest, at this time, as shown in (b) in FIG. At the same time, the mobile phone can send a second download request to the smart watch to request to download the first subpackage ⁇ R 3 , R 5 , R 6 ⁇ , and can send a third download request to the tablet computer to request to download the first subpackage ⁇ R 1 , R 2 , R 4 ⁇ .
  • the installation package downloaded by the third electronic device includes the second sub-package corresponding to the first electronic device 110
  • the third electronic device and the first electronic device 110 are electronic devices of the same type and characteristics, or when each electronic device downloads the application, all installation packages of the application (that is, the first subclass of the application) can be downloaded.
  • package and the second sub-package corresponding to each type of electronic device it means that both the third electronic device and the cloud 300 have the first sub-package of the application and the application corresponding to the first electronic device 110 Second subpackage.
  • the first electronic device 110 can download the first subpackage of the application from the cloud 300 and/or the third electronic device, and can download the first subpackage corresponding to the first electronic device 110 from the cloud 300 and/or the third electronic device. Two subpackages.
  • the first electronic device 110 downloads the first subpackage of the application from the cloud 300 or the third electronic device, and distributes the second subpackage corresponding to the first electronic device 110 from the cloud 300 and the third electronic device, and The first electronic device 110 distributes and downloads the first subpackage of the application from the cloud 300 and the third electronic device, and downloads the second subpackage corresponding to the first electronic device 110 from the cloud 300 or the third electronic device.
  • the first electronic device 110 downloads the second sub-package corresponding to the first electronic device 110 from the cloud 300, and the principle of distributively downloading the first sub-package of the application from the cloud 300 and the third electronic device is basically the same. For details, please refer to the foregoing description.
  • the first electronic device 110 downloads the second subpackage corresponding to the first electronic device 110 from the cloud 300 and the third electronic device in a distributed manner, and downloads the application from the cloud 300 and the third electronic device in a distributed manner.
  • the process of the first subpackage is described as an example.
  • FIG. 8 shows a fourth schematic diagram of an application scenario provided by this embodiment.
  • the first subpackage R of the call application may include ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 ⁇
  • the second subpackage R corresponding to the mobile phone The package can include ⁇ A 1 , A 2 , A 3 , A 4 ⁇
  • the mobile phone confirms that the smart watch, tablet computer and smart big screen have all downloaded the call application, that is, the smart watch, tablet computer and smart big screen all have this
  • the mobile phone can determine all the possibilities of grouping all subpackages ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 , A 1 , A 2 , A 3 , A 4 ⁇ of the call application grouping methods, and all subpackages ⁇ R 1 , R 2 , R 3 , R 4 , R 5 , R 6 , A 1 , A 2 , A 3 , A 4 ⁇ of the application can be grouped according to each grouping method. grouping to obtain each sub-packet group corresponding to each grouping mode.
  • the grouping method F1 and the first grouping method F2, etc. are divided into three sub-packet groups, the grouping method F3 and the grouping method F4, etc., and the method of dividing into four sub-packet groups can be obtained.
  • the subpackage group corresponding to the grouping method F1 can include ⁇ R 1 , R 2 , R 3 , A 1 , A 2 ⁇ and ⁇ R 4 , R 5 , R 6 , A 3 , A 4 ⁇
  • the grouping method F2 corresponds to
  • the subpackage group can include ⁇ R 1 , R 2 , R 3 , R 4 ⁇ and ⁇ R 5 , R 6 , A 1 , A 2 , A 3 , A 4 ⁇
  • the subpackage group corresponding to the grouping method F3 can include ⁇ R 1 , R 2 , A 1 , A 2 ⁇ , ⁇ R 3 , R 4 , A 3 ⁇ and ⁇ R 5 , R 6 , A 4 ⁇
  • the subpackage group corresponding to grouping mode F4 can include ⁇ R 1 , R 2 , R 3 ⁇ , ⁇ R 4 , R 5 , R 6 ⁇ and ⁇ A 1 , A 2 , A 3 , A
  • the first electronic device 110 may determine all possible distributed downloading manners corresponding to the grouping manner, and determine the download time corresponding to each distributed downloading manner.
  • the mobile phone can determine the distributed download method 1 which can be: the mobile phone downloads ⁇ R 1 , R 2 , R 3 ⁇ from the cloud, downloads ⁇ R 4 , R 5 , R 6 ⁇ from the smart watch, and downloads ⁇ R 4 , R 5 , R 6 ⁇ from the tablet.
  • the second distributed download method can be: the mobile phone downloads ⁇ R 1 , R 2 , R 3 ⁇ from the smart watch, and downloads ⁇ R 1 , R 2 , R 3 ⁇ from the tablet computer Download ⁇ R 4 , R 5 , R 6 ⁇ , download ⁇ A 1 , A 2 ⁇ from the cloud, and download ⁇ A 3 , A 4 ⁇ from the smart screen;
  • the third distributed download method can be: the mobile phone downloads from the cloud ⁇ R 1 , R 2 , R 3 ⁇ , download ⁇ R 4 , R 5 , R 6 ⁇ from the tablet, ⁇ A 1 , A 2 ⁇ from the smart screen and ⁇ A 3 , A 4 ⁇ from the smart watch; distribution The fourth method of downloading can be: download ⁇ R 1 , R 2 , R 3 ⁇ from the smart screen, download ⁇ R 4 , R 5 , R 6 ⁇
  • the download time corresponding to distributed download mode 1 max(TC, TW, TP, TS), at this time, TC is the time for the mobile phone to download ⁇ R 1 , R 2 , R 3 ⁇ from the cloud, and TW is the time for the mobile phone to download ⁇ R 1 , R 2 , R 3 ⁇ from the smartphone
  • TP is the time for the mobile phone to download ⁇ A 1 , A 2 ⁇ from the tablet
  • TS is the time for the mobile phone to download ⁇ A 3 , A 4 ⁇ from the smart screen. It should be understood that the determination of the download time corresponding to the distributed download modes 2, 3 and 4 is similar.
  • the mobile phone can download the application according to the distributed download method with the shortest download time. Assuming that the mobile phone determines that the download time corresponding to the above-mentioned distributed download mode 4 is the shortest, at this time, as shown in Figure 8, the mobile phone can send the first download request to the smart large screen to request to download ⁇ R 1 , R 2 , R 3 ⁇ . At the same time, the mobile phone can send a second download request to the cloud 300 to request to download ⁇ R 4 , R 5 , R 6 ⁇ , and send a third download request to the tablet computer to request to download ⁇ A 1 , A 2 ⁇ , and send The smart watch sends a fourth download request to request the download of ⁇ A 3 , A 4 ⁇ .
  • the first electronic device 110 determines the download time corresponding to the distributed download mode, it can obtain the information required by the first electronic device 110 to directly download all installation packages of the application from the cloud 300 or any third electronic device.
  • download time, and the download mode of the final download can be determined according to the multiple download times.
  • the first electronic device may determine the final downloading method according to the shortest time among the multiple downloading times.
  • FIG. 9 shows a schematic flowchart of a method for downloading application sub-packages provided by this embodiment.
  • the first electronic device 110 may send a first query request to the cloud 300 to request to query the subpackage information of the application, for example, the first electronic device 110
  • the pagequery interface can be called to send the first query request to the cloud 300 .
  • the first electronic device 110 can determine the download strategy of the application according to the query results returned by the second electronic devices 120 and the subpackage information returned by the cloud 300, and download the application according to the download strategy.
  • the download policy instructs the first electronic device 110 how to download the first subpackage of the application and how to download the second subpackage corresponding to the first electronic device 110 .
  • the download strategy may be that the first electronic device 110 downloads the second subpackage corresponding to the first electronic device 110 from the cloud 300 and simultaneously downloads the first subpackage of the application from the second electronic device 120 .
  • a service center is set in the first electronic device 110, and the service center may include a service management module, a device-side data management module, and a policy calling module.
  • the service management module can call the pagequery interface to send a first query request to the cloud 300 and receive the subpackage information returned by the cloud 300 .
  • the service management module can also call the queryDevicesFa interface in the end-side data management module to send the second query request to each second electronic device 120 .
  • the terminal-side data management module may store the query results returned by each second electronic device 120 .
  • the service management module can also instruct the policy calling module to determine the download strategy of the application according to the query result in the device-side data management module and the subpackage information in the service management module, and send the determined download strategy to the service management module.
  • the service management module can also download the application according to the download policy of the application.
  • the structure of the first sub-package and the second sub-package may be a header, a serial number, and specific content.
  • the type of the subpackage for example, whether it is the first subpackage or the second subpackage
  • the application to which it belongs are recorded in the packet header. Therefore, after the first electronic device 110 obtains each sub-package, it can find all the sub-packages corresponding to the application according to the information in the package header, and splice all the sub-packages of the application according to the serial numbers of the sub-packages, so as to obtain the sub-package of the application.
  • Complete installation package for example, whether it is the first subpackage or the second subpackage
  • the installation package of the application is divided into multiple sub-packages, and the sub-packages of the application can be stored in the cloud and the electronic device that has downloaded the application. Therefore, when the first electronic device needs to download the application, the first electronic device can download each subpackage of the application from the cloud and the electronic device that has downloaded the application at the same time, so as to reduce the time for the first electronic device to download the installation package of the application , improving the download speed of the first electronic device to improve user experience.
  • the installation package of any application may include a first sub-package and a second sub-package respectively corresponding to each type of electronic device.
  • the first electronic device when an application in a certain electronic device (hereinafter referred to as the first electronic device) satisfies the preset aging condition, the first electronic device can respectively determine the download time corresponding to each sub-package of the application, and The application is aged according to the download time corresponding to each subpackage.
  • the preset aging condition may be that the unused continuous time reaches a preset time threshold (for example, 30 days), or may be that a deletion or uninstallation instruction is received.
  • the subpackage of the application may include a first subpackage of the application and a second subpackage corresponding to the first electronic device.
  • the download time corresponding to any subpackage is the time required for the first electronic device to download the subpackage again.
  • the first electronic device may determine whether each second electronic device has the subpackage A i .
  • the second electronic device is an electronic device communicatively connected with the first electronic device.
  • the first electronic device can determine the first time to download the subpackage A i from the cloud, and download the subpackage A i from the second electronic device respectively (for convenience of description, hereinafter
  • the second electronic device having the subpackage A i is referred to as the third electronic device) to download each second time of the subpackage A i , and the minimum value of the first time and each second time can be determined as the subpackage A i Corresponding download time Value(A i ).
  • the first electronic device may determine the first time and the second time according to the following formula:
  • T i,j t j,delay +max(sizeof(A i )–volume j ,0)/v j,max ;
  • T i,c is the first time to download the sub-package Ai from the cloud
  • t c,delay is the time required for the first electronic device to reach a stable speed v c,max in the download of the sub-package Ai from the cloud
  • volume c is the size of the subpackage downloaded from the cloud by the first electronic device at time t c,delay
  • sizeof(A i ) is the size of the subpackage A i
  • T i,j is the subpackage A downloaded from the jth third electronic device
  • the second time of i , t j,delay is the time required for the first electronic device to reach a stable speed v j,max in the subpackage A i downloaded from the jth third electronic device
  • volume j is the time required for the first electronic device to reach a stable speed v j,max at t j,delay time, the size of the subpacket downloaded by the first electronic device from the jth third electronic device
  • each second electronic device does not have the sub-package A i , it means that only the cloud stores the sub-package A i , that is, the first electronic device can only download the sub-package A i from the cloud.
  • the first electronic device can retain the M sub-packages with the longest download time, and age the other sub-packages of the application, that is, to download some sub-packages with a slower download speed. The package is retained, so that when the application is launched again, the download time of the application can be reduced.
  • M can be customized by the user, and can also be specifically determined by the first electronic device according to actual conditions.
  • the first electronic device retaining a certain subpackage may be retaining the subpackage for a preset time. That is to say, after determining the download time corresponding to each sub-package, the first electronic device may retain the M sub-packages with the longest download time, and age the other sub-packages of the application. Subsequently, after a preset period of time, if the first electronic device still uses the application, the first electronic device may age one or more of the reserved M subpackages. Wherein, the preset time may be specifically set by technicians according to actual scenarios.
  • the first electronic device may arrange the sub-packages in descending order according to the download time corresponding to each sub-package to obtain an array. Subsequently, the first electronic device may determine M according to the maximum amount of residual data allowed by the first electronic device and the arrays arranged in descending order when the application is uninstalled, specifically:
  • maxSize is the maximum amount of residual data allowed by the first electronic device when the application is uninstalled, is the size of the lth subpackage in the array, and N is the number of subpackages.
  • the maximum amount of remaining data allowed by the first electronic device may be set by the user, or may be set by default by the first electronic device, which is not specifically limited in this embodiment.
  • the first electronic device may age all the subpackages of the application.
  • FIG. 10 shows a schematic diagram of an application scenario of the application aging method provided in this embodiment.
  • the application scenario may include a mobile phone 1010 , a smart watch 1020 , a tablet computer 1030 and a cloud 1040 .
  • the mobile phone 1010 communicates with the smart watch 1020 , the tablet computer 1030 , and the cloud 1040 respectively through a communication network.
  • the mobile phone 1010 has a calling application downloaded, and the calling application may include a first subpackage ⁇ R 1 , R 2 , R 3 , R 4 ⁇ , and a second subpackage ⁇ A 1 , A 2 , A 3 ⁇ corresponding to the mobile phone 1010 ⁇ .
  • the mobile phone 1010 can determine that the call application meets the preset aging condition, that is, it is determined that the call application needs to be aged.
  • the mobile phone 1010 can determine the first subpackage R 1 corresponds to the download time T R1 , the download time T R2 corresponding to the first subpackage R 2 , the download time T R3 corresponding to the first subpackage R 3 , the download time T R4 corresponding to the first subpackage R 4 , the download time T R4 corresponding to the second subpackage
  • the mobile phone 1010 determines that the smart watch 1020 and the tablet computer 1030 both have the first subpackage R 1 , the first subpackage R 2 and the first subpackage R 3 , and the smart watch 1020 has the first subpackage R 4 and the second subpackage A 1 .
  • the mobile phone 1010 can obtain the time TC R1 of downloading the first subpackage R 1 from the cloud 1040 , the time TI R1 of downloading the first subpackage R 1 from the smart watch 1020 , and the downloading time of the first subpackage R 1 from the tablet 1030 .
  • the installation package of the application is divided into multiple sub-packages.
  • the first electronic device can determine the time to download each sub-package of the application again, and Part of the subpackages of the application is aged at the download time, and some subpackages of the application are reserved, so that when the application needs to be used next time, the first electronic device only needs to download part of the subpackages of the application, and does not need to download the subpackages of the application.
  • the entire installation package can reduce the download time of the application, increase the speed of the application restart, and improve the user experience.
  • each module of the application downloading and installing device can correspond to implement the application downloading and installing method in the first embodiment various steps.
  • the embodiment of the present application further provides an application aging device, and each module of the application aging device can correspond to each step of the application aging method in the second embodiment.
  • An embodiment of the present application also provides an electronic device, the electronic device includes at least one memory, at least one processor, and a computer program stored in the at least one memory and operable on the at least one processor, the When the processor executes the computer program, the electronic device is enabled to implement the steps in any of the foregoing method embodiments.
  • the structure of the electronic device may be as shown in FIG. 1 .
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the computer implements the steps in any of the above method embodiments .
  • An embodiment of the present application provides a computer program product, which enables the electronic device to implement the steps in any of the foregoing method embodiments when the computer program product is run on the electronic device.
  • the integrated unit is realized in the form of software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the procedures in the methods of the above embodiments in the present application can be completed by instructing related hardware through computer programs, and the computer programs can be stored in a computer-readable storage medium.
  • the computer program When executed by a processor, the steps in the above-mentioned various method embodiments can be realized.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable storage medium may include at least: any entity or device capable of carrying computer program codes to the device/electronic device, recording medium, computer memory, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), electrical carrier signals, telecommunication signals, and software distribution media.
  • entity or device capable of carrying computer program codes to the device/electronic device
  • recording medium computer memory
  • read-only memory read-only memory, ROM
  • random access memory random access memory
  • electrical carrier signals telecommunication signals
  • software distribution media such as U disk, mobile hard disk, magnetic disk or optical disk, etc.
  • computer readable storage media may not be electrical carrier signals and telecommunication signals based on legislation and patent practice.
  • the disclosed device/electronic equipment and method can be implemented in other ways.
  • the device/electronic device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请适用于终端技术领域,尤其涉及应用下载安装方法、应用老化方法及电子设备。该应用下载安装方法中,第一应用至少包括第一部分和第二部分,第一部分包括第一子包,第二部分包括第二子包。当第一电子设备检测到下载第一应用的触发事件时,第一电子设备可以从第二设备获取第一子包,并从第三设备获取所第二子包,以根据第一部分和第二部分,安装第一应用。其中,第二设备与第三设备不同,以通过从不同设备分布式获取第一应用的不同子包,减少第一电子设备下载安装第一应用的时间,提高下载安装第一应用的速度,提升用户体验。

Description

应用下载安装方法、应用老化方法及电子设备
本申请要求于2021年10月30日提交国家知识产权局、申请号为202111280483.1、申请名称为“应用下载安装方法、应用老化方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于终端技术领域,尤其涉及应用下载安装方法、应用老化方法、电子设备及计算机可读存储介质。
背景技术
随着电子设备和互联网技术的发展,电子设备的功能越来越强大,极大地丰富、便利了人们的日常生活。其中,电子设备的强大功能依赖于电子设备中下载的应用。目前,电子设备主要是从云端下载安装包来进行应用的安装使用。而由于受网络带宽和网络传输速率的影响,从云端下载安装包的方式,存在下载速度较慢的问题。
发明内容
本申请实施例提供了一种应用下载安装方法、应用老化方法、电子设备及计算机可读存储介质,可以解决现有技术中应用的下载速度较慢的问题。
第一方面,本申请实施例提供了一种应用下载安装方法,应用于第一电子设备,所述方法可以包括:
所述第一电子设备检测到下载第一应用的触发事件,所述第一应用至少包括第一部分和第二部分,所述第一部分包括第一子包,所述第二部分包括第二子包;
所述第一电子设备从第二设备获取所述第一子包,并从第三设备获取所述第二子包;所述第二设备与所述第三设备不同;
所述第一电子设备根据所述第一部分和所述第二部分,安装所述第一应用。
在上述的应用下载安装方法中,可以将第一应用的安装包拆分成第一部分和第二部分,第一部分可以包括第一子包,第二部分可以包括第二子包。当第一电子设备检测到下载第一应用的触发事件时,第一电子设备可以从第二设备获取第一子包,并可以同时从第三设备获取第二子包,以通过从不同的设备分布式获取第一应用的不同子包,可以减少第一电子设备下载安装第一应用的时间,提高第一电子设备下载安装第一应用的速度,从而提升用户体验。
其中,第一应用可以为任一应用。示例性的,第一应用可以为特性能力(feature ability,FA),触发事件可以为对未安装的FA的点击或触摸操作等。例如当用户打开第一电子设备的服务中心,并点击服务中心的某一个未安装的FA时,第一电子设备可以将该FA确定为第一应用,并可以确定检测到下载该FA的触发事件。或者,第一应用可以为应用市场中某一个未安装的应用,触发事件可以为对该应用对应的安装或下载按钮的点击或触摸操作等。例如当用户打开第一电子设备中的应用市场,并点击短信息应用对应的安装或者下载按钮时,第一电子设备可以将短信息应用确定为第一应用,并可以确定检测到下载短信息应用的触发事件。
可以理解的是,第二设备可以为用户的第二电子设备,第三设备可以为用户的第三电子设备或服务器。也就是说,第一电子设备可以从第二电子设备获取第一子包,并从第三电子设备获取第二子包;或者,第一电子设备可以从第二电子设备获取第一子包,并从服务器获取第二子包。
示例性的,第一电子设备获取的第一子包可以是第二电子设备中存储的;或者,可以是第二电子设备获取的,例如可以是第二电子设备从服务器中获取的,或者可以是第二电子设备从存储有第一子包的其他 电子设备中获取的。也就是说,当第二设备为用户的第二电子设备时,若第二电子设备中存储有第一子包,第一电子设备可以获取第二电子设备中存储的第一子包;若第二电子设备中未存储第一子包,第一电子设备可以向第二电子设备发送获取请求,请求第二电子设备从服务器或者从其他存储有第一子包的电子设备中获取第一子包,并将获取的第一子包发送给第一电子设备。
示例性的,当第三设备为用户的第三电子设备时,第一电子设备获取的第二子包可以是第三电子设备中存储的;或者,可以是第三电子设备获取的,例如可以是第三电子设备从服务器中获取的,或者可以是第三电子设备从存储有第二子包的其他电子设备中获取的。其中,其他电子设备也可以为用户的第二电子设备。
在一种可能的实现方式中,第一部分还可以包括第三子包,第一电子设备可以从第四设备获取第三子包,第四设备为用户的第四电子设备或服务器。其中,第四电子设备与第二电子设备可以为同一电子设备。或者,第四电子设备与第三电子设备可以为同一电子设备。当然,第四电子设备也可以为除第二电子设备和第三电子设备以外的电子设备。
在另一种可能的实现方式中,第二部分还可以包括第四子包,第一电子设备可以从第五设备获取第四子包。其中,第五设备可以为用户的第五电子设备或服务器。应理解,第五电子设备与第二电子设备可以为同一电子设备,或者第五电子设备与第三电子设备可以为同一电子设备,或者第五电子设备与第四电子设备可以为同一电子设备。当然,第五电子设备也可以为除第二电子设备、第三电子设备和第四电子设备以外的电子设备。
可以理解的是,第一部分是第一应用的基础部分;第二部分为特性部分,第二部分与第一电子设备的属性相关;或者,第一部分是特性部分,第二部分是基础部分。
在一种可能的实现方式中,在所述第一电子设备从第二设备获取所述第一子包,并从第三设备获取所述第二子包之前,所述方法还可以包括:
所述第一电子设备确定下载所述第一子包的第一下载时间,以及下载所述第二子包的第二下载时间;
所述第一电子设备根据所述第一下载时间和所述第二下载时间确定下载策略,所述下载策略包括:所述第一电子设备从第二设备获取所述第一子包,并从第三设备获取所述第二子包。
在该实现方式提供的应用下载安装方法中,第一电子设备可以根据下载第一子包的第一下载时间和下载第二子包的第二下载时间确定下载策略,以根据下载时间来确定第二设备和第三设备,确保第一电子设备获取第一应用的时间较短,提高第一电子设备的下载速度,提升用户体验。
应理解,第一子包的第一下载时间可以为第一电子设备从任一存储有第一子包的第六设备中获取第一子包的时间,或者可以为用户的某一电子设备从任一存储有第一子包的第六设备中下载第一子包的时间与该电子设备将所下载的第一子包传输给第一电子设备的时间之和。类似的,第二子包的第二下载时间可以为第一电子设备从任一存储有第二子包的设备中获取第二子包的时间,或者可以为用户的某一电子设备从任一存储有第二子包的设备中下载第二子包的时间与该电子设备将所下载的第二子包传输给第一电子设备的时间之和。
在一种可能的实现方式中,第一电子设备可以根据第一下载时间与第二下载时间之和最短来确定下载策略,使得第一电子设备获取第一应用的时间最短,提高应用的下载速度,提升用户体验。
在另一种可能的实现方式中,第一电子设备也可以获取第一下载时间和第二下载时间之和小于或等于预设时间阈值的下载策略,并从这些下载策略中确定最终的目标下载策略。在一个示例中,第一电子设备可以根据这些下载策略所对应的设备的使用情况和/或设备性能来确定目标下载策略。在另一个示例中,第一电子设备可以根据用户的选择操作来确定目标下载策略,即用户可以从这些下载策略中自行选择目标下 载策略。其中,预设时间阈值可以由第一电子设备默认设置,也可以由用户自定义设置,例如用户可以根据自身所能接受的最大下载时间来设置预设时间阈值。
示例性的,所述第一电子设备确定下载所述第一子包的第一下载时间,可以包括:
所述第一电子设备获取所述第一子包的大小和所述第一子包对应的第一速度,所述第一子包对应的第一速度包括所述第一电子设备从存储有所述第一子包的第六设备下载所述第一子包的速度,或者包括第七设备下载所述第一子包的速度和所述第七设备将所述第一子包传输给所述第一电子设备的速度;
所述第一电子设备根据所述第一子包的大小和所述第一速度确定下载所述第一子包的第一下载时间。
应理解,当第一子包的第一下载时间为第一电子设备从任一存储有第一子包的第六设备中获取第一子包的时间时,第一子包对应的第一速度可以为第一电子设备从第六设备下载第一子包的速度。假设,存储有第一子包的第六设备包括多个,第一电子设备从第j个第六设备下载第一子包时,需经过时间t j,delay1达到稳定速度v j,max1(即第一速度),那么第一子包对应的第j个第一下载时间(即第一电子设备从第j个第六设备下载第一子包的时间)T j1=t j,delay1+max(volume 1–volume 1’,0)/v j,max1,volume 1为第一子包的大小,volume 1’为在时间t j,delay1内,第一电子设备从第六设备下载的子包大小。
类似的,当第一子包的第一下载时间为第七设备从任一存储有第一子包的第六设备中下载第一子包的时间与第七设备将所下载的第一子包传输给第一电子设备的时间之和时,第一子包对应的第一速度可以包括第七设备从第六设备中下载第一子包的速度和第七设备将所下载的第一子包传输给第一电子设备的速度。此时,第一电子设备可以根据第七设备从第六设备中下载第一子包的速度与第一子包的大小,确定第七设备从第六设备中下载第一子包的时间,并可以根据第七设备将第一子包传输给第一电子设备的速度和第一子包的大小,确定第七设备将第一子包传输给第一电子设备的时间。其中,第七设备可以为用户的电子设备。时间的具体确定方式可以参照前述T j1的确定方式。
在一种可能的实现方式中,在所述第一电子设备根据所述第一部分和所述第二部分,安装所述第一应用之后,所述方法还可以包括:
所述第一电子设备确定下载所述第一子包的第三下载时间和下载所述第二子包的第四下载时间;
所述第一电子设备根据所述第三下载时间和所述第四下载时间确定待老化的目标子包,并对所述目标子包进行老化,所述目标子包为所述第一子包,或者所述目标子包为所述第二子包,所述对所述目标子包进行老化包括删除所述目标子包或者卸载所述目标子包。
应理解,第三下载时间和第四下载时间的获取方式可以与前述第一下载时间和第二下载时间的获取方式相同。示例性的,第一电子设备也可以直接将第一下载时间作为第三下载时间,和/或将第二下载时间作为第四下载时间。例如,在第一电子设备下载安装第一应用之后,若存储第一子包的设备没有发生改变,第一电子设备可以直接将第一下载时间确定为第二下载时间,以减少下载时间的确定过程,提升老化效率。类似的,在第一电子设备下载安装第一应用之后,若存储第二子包的设备没有发生改变,第一电子设备可以直接将第二下载时间确定为第四下载时间,以减少下载时间的确定过程。
示例性的,当所述目标子包为所述第一子包时,所述第一电子设备对所述目标子包进行老化,可以包括:
所述第一电子设备对所述第一子包进行老化,并保留所述第二子包;
当所述目标子包为所述第二子包时,所述第一电子设备对所述目标子包进行老化,可以包括:
所述第一电子设备对所述第二子包进行老化,并保留所述第一子包。
在该实现方式提供的应用下载安装方法中,在第一电子设备需要对已下载安装的第一应用进行老化时,第一电子设备可以确定再次下载第一应用的各个子包的时间,并可以根据各个子包分别对应的下载时间对 第一应用进行老化,以保留第一应用的部分子包,从而使得在下一次需要使用第一应用时,第一电子设备仅需要下载第一应用的部分子包,而不需要下载第一应用的整个安装包,可以减少第一应用的下载时间,提高再次启动第一应用的速度,提升用户体验。
示例性的,第一电子设备可以保留下载时间最长的子包,并可以将第一应用的其他子包进行老化,即可以将下载速度较慢的部分子包进行保留,使得再次启动第一应用时,可以减少第一应用的下载时间。应理解,对目标子包进行老化可以是指卸载目标子包,也可以是指删除目标子包。
第二方面,本申请实施例提供了一种应用老化方法,应用于第一电子设备,所述方法可以包括:
所述第一电子设备确定第一应用,所述第一应用包括第一子包和第二子包;
所述第一电子设备对所述第一子包和所述第二子包进行不同的处理,所述第一电子设备对所述第一子包和所述第二子包进行不同的处理包括:所述第一电子设备对所述第一子包进行老化,并保留所述第二子包;或者,所述第一电子设备在第一时间对所述第一子包进行老化,并在第二时间对所述第二子包进行老化;所述第一电子设备对所述第一子包进行老化包括所述第一电子设备删除所述第一子包或者卸载所述第一子包。
在一种可能的实现方式中,所述第一电子设备对所述第一子包和所述第二子包进行不同的处理,所述方法还可以包括:
所述第一电子设备获取第一子包的第一下载时间,以及获取第二子包的第二下载时间;
所述第一电子设备根据所述第一下载时间和所述第二下载时间确定待老化的目标子包,并对所述目标子包进行老化,所述目标子包为所述第一子包,或者所述目标子包为所述第二子包。
示例性的,当所述目标子包为所述第一子包时,所述第一电子设备对所述目标子包进行老化,可以包括:
所述第一电子设备对所述第一子包进行老化,并保留所述第二子包;
当所述目标子包为所述第二子包时,所述第一电子设备对所述目标子包进行老化,可以包括:
所述第一电子设备对所述第二子包进行老化,并保留所述第一子包。
在上述的应用老化方法中,可以将应用的安装包拆分成第一子包和第二子包。当第一电子设备需要对已下载安装的应用进行老化时,第一电子设备可以确定再次下载该应用的各个子包的时间,并可以根据各个子包分别对应的下载时间对该应用进行老化,以保留该应用的部分子包,从而使得在下一次需要使用该应用时,第一电子设备仅需要下载该应用的部分子包,而不需要下载该应用的整个安装包,可以减少应用的下载时间,提高再次启动应用的速度,提升用户体验。
示例性的,第一电子设备可以保留下载时间最长的子包,并可以将该应用的其他子包进行老化,即将下载速度较慢的部分子包进行保留,使得再次启动该应用时,可以减少该应用的下载时间。
可以理解的是,所述第一电子设备确定第一应用,可以包括:
所述第一电子设备获取第二应用的第一时长,所述第一时长为所述第二应用未被使用的连续时长,所述第二应用为所述第一电子设备中的任一应用;
当所述第一时长大于或等于预设时长阈值时,所述第一电子设备确定所述第二应用为所述第一应用。
示例性的,所述第一电子设备获取第一子包的第一下载时间,可以包括:
所述第一电子设备获取所述第一子包的大小和所述第一子包对应的第一速度,所述第一子包对应的第一速度包括所述第一电子设备从存储有所述第一子包的第二设备下载所述第一子包的速度,或者包括第三设备下载所述第一子包的速度和所述第三设备将所述第一子包传输给所述第一电子设备的速度;
所述第一电子设备根据所述第一子包的大小和所述第一速度确定所述第一子包的第一下载时间。
第三方面,本申请实施例提供了一种应用下载安装装置,应用于第一电子设备,所述装置可以包括:
触发事件检测模块,用于检测到下载第一应用的触发事件,所述第一应用至少包括第一部分和第二部分,所述第一部分包括第一子包,所述第二部分包括第二子包;
第一子包获取模块,用于从第二设备获取所述第一子包,并从第三设备获取所述第二子包;所述第二设备与所述第三设备不同;
应用安装模块,用于根据所述第一部分和所述第二部分,安装所述第一应用。
示例性的,所述第二设备为用户的第二电子设备,所述第三设备为用户的第三电子设备或服务器。
在一种可能的实现方式中,所述第一电子设备获取的第一子包是所述第二电子设备中存储的,或者,所述第一电子设备获取的第一子包是所述第二电子设备获取的。
在另一种可能的实现方式中,当所述第三设备为用户的第三电子设备时,所述第一电子设备获取的第二子包是所述第三电子设备中存储的,或者,所述第一电子设备获取的第二子包是所述第三电子设备获取的。
示例性的,所述第一部分还包括第三子包,所述装置还可以包括:
第三子包获取模块,用于从第四设备获取所述第三子包,所述第四设备为用户的第四电子设备或服务器。
示例性的,所述第二部分还包括第四子包,所述装置还可以包括:
第四子包获取模块,用于从第五设备获取所述第四子包。
可以理解的是,所述第一部分是所述第一应用的基础部分;所述第二部分为特性部分,所述第二部分与所述第一电子设备的属性相关;或者,所述第一部分是特性部分,第二部分是基础部分。
在一种可能的实现方式中,所述装置还可以包括:
第一下载时间确定模块,用于确定下载所述第一子包的第一下载时间,以及下载所述第二子包的第二下载时间;
下载策略确定模块,用于根据所述第一下载时间和所述第二下载时间确定下载策略,所述下载策略包括:所述第一电子设备从第二设备获取所述第一子包,并从第三设备获取所述第二子包。
示例性的,所述第一下载时间确定模块,可以包括:
第一速度获取单元,用于获取所述第一子包的大小和所述第一子包对应的第一速度,所述第一子包对应的第一速度包括所述第一电子设备从存储有所述第一子包的第六设备下载所述第一子包的速度,或者包括第七设备下载所述第一子包的速度和所述第七设备将所述第一子包传输给所述第一电子设备的速度;
第一下载时间确定单元,用于根据所述第一子包的大小和所述第一速度确定下载所述第一子包的第一下载时间。
在另一种可能的实现方式中,所述装置还可以包括:
第三下载时间确定模块,用于确定下载所述第一子包的第三下载时间和下载所述第二子包的第四下载时间;
目标子包老化模块,用于根据所述第三下载时间和所述第四下载时间确定待老化的目标子包,并对所述目标子包进行老化,所述目标子包为所述第一子包,或者所述目标子包为所述第二子包,所述对所述目标子包进行老化包括删除所述目标子包或者卸载所述目标子包。
示例性的,当所述目标子包为所述第一子包时,所述目标子包老化模块,具体用于对所述第一子包进行老化,并保留所述第二子包;
当所述目标子包为所述第二子包时,所述目标子包老化模块,具体用于对所述第二子包进行老化,并 保留所述第一子包。
第四方面,本申请实施例提供了一种应用老化装置,应用于第一电子设备,所述装置可以包括:
第一应用确定模块,用于确定第一应用,所述第一应用包括第一子包和第二子包;
子包处理模块,用于对所述第一子包和所述第二子包进行不同的处理,所述第一电子设备对所述第一子包和所述第二子包进行不同的处理包括:所述第一电子设备对所述第一子包进行老化,并保留所述第二子包;或者,所述第一电子设备在第一时间对所述第一子包进行老化,并在第二时间对所述第二子包进行老化;所述第一电子设备对所述第一子包进行老化包括所述第一电子设备删除所述第一子包或者卸载所述第一子包。
在一种可能的实现方式中,所述子包处理模块,可以包括:
下载时间获取单元,用于获取第一子包的第一下载时间,以及获取第二子包的第二下载时间;
目标子包老化单元,用于根据所述第一下载时间和所述第二下载时间确定待老化的目标子包,并对所述目标子包进行老化,所述目标子包为所述第一子包,或者所述目标子包为所述第二子包。
示例性的,当所述目标子包为所述第一子包时,所述目标子包老化单元,具体用于对所述第一子包进行老化,并保留所述第二子包;
当所述目标子包为所述第二子包时,所述目标子包老化单元,具体用于对所述第二子包进行老化,并保留所述第一子包。
在一种可能的实现方式中,所述第一应用确定模块,可以包括:
时长获取单元,用于获取第二应用的第一时长,所述第一时长为所述第二应用未被使用的连续时长,所述第二应用为所述第一电子设备中的任一应用;
第一应用确定单元,用于当所述第一时长大于或等于预设时长阈值时,所述第一电子设备确定所述第二应用为所述第一应用。
示例性的,所述下载时间获取单元,可以包括:
第一速度确定分单元,用于获取所述第一子包的大小和所述第一子包对应的第一速度,所述第一子包对应的第一速度包括所述第一电子设备从存储有所述第一子包的第二设备下载所述第一子包的速度,或者包括第三设备下载所述第一子包的速度和所述第三设备将所述第一子包传输给所述第一电子设备的速度;
下载时间确定分单元,用于根据所述第一子包的大小和所述第一速度确定所述第一子包的第一下载时间。
第五方面,本申请实施例提供了一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,使所述电子设备实现上述第一方面中任一项所述的应用下载安装方法,或实现上述第二方面中任一项所述的应用老化方法。
第六方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被计算机执行时,使所述计算机实现上述第一方面中任一项所述的应用下载安装方法,或实现上述第二方面中任一项所述的应用老化方法。
第七方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第一方面中任一项所述的应用下载安装方法,或者执行上述第二方面中任一项所述的应用老化方法。
可以理解的是,上述第三方面的有益效果可以参见上述第一方面中的相关描述,上述第四方面的有益效果可以参见上述第二方面中的相关描述,上述第五方面至第七方面的有益效果可以参见上述第一方面或第二方面中的相关描述,在此不再赘述。
附图说明
图1是本申请一实施例提供的应用下载安装方法所适用于的电子设备的结构示意图;
图2是本申请一实施例提供的应用下载安装方法所适用于的软件架构示意图;
图3是本申请实施例一提供的应用下载安装方法所应用的系统结构图;
图4和图5是本申请实施例一提供的应用场景示意图一;
图6是本申请实施例一提供的应用场景示意图二;
图7是本申请实施例一提供的应用场景示意图三;
图8是本申请实施例一提供的应用场景示意图四;
图9是本申请实施例一提供的应用下载安装方法的流程示意图;
图10是本申请实施例二提供的应用老化方法的应用场景示意图。
具体实施方式
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
此外,本申请实施例中提到的“多个”应当被解释为两个或两个以上。
本申请实施例中提供的应用下载安装方法和应用老化方法中所涉及到的步骤仅仅作为示例,并非所有的步骤均是必须执行的步骤,或者并非各个信息或消息中的内容均是必选的,在使用过程中可以根据需要酌情增加或减少。本申请实施例中同一个步骤或者具有相同功能的步骤或者消息在不同实施例之间可以互相参考借鉴。
本申请实施例描述的业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
随着电子设备和互联网技术的发展,手机、电脑、平板电脑、智慧大屏、可穿戴设备等电子设备成为了人们日常生活中必不可少的部分,电子设备的功能也越来越强大,极大地丰富、便利了人们的日常生活。其中,电子设备的强大功能依赖于电子设备中下载的应用。因此,如何快速下载安装应用成为本领域关注的重点。目前,电子设备主要是从云端下载应用的安装包来进行应用的安装使用。而由于受网络带宽和网 络传输速率的影响,从云端下载安装包的方式,存在下载速度较慢的问题。
另外,为降低电子设备的资源占用,提高电子设备的处理性能,电子设备需要对电子设备中的应用进行老化处理。其中,老化处理是指对应用进行删除或者卸载处理。目前,在确定应用达到预设老化条件(例如应用长时间未被使用)时,电子设备即对该应用的整个安装包进行老化处理,即删除或卸载该应用的全部安装包。这种老化处理的方式,导致用户在下一次想要使用该应用时,需要重新下载该应用的全部安装包,极大地降低了应用再次启动的速度,降低了用户体验。
为解决上述问题,本申请实施例提供了一种应用下载安装方法,该方法将应用的安装包拆分成多个子包,云端和已下载该应用的电子设备可以存储有该应用的子包。当第一电子设备检测到下载该应用的触发事件时,第一电子设备可以同时从第二设备和第三设备下载该应用的部分子包,以减少第一电子设备下载该应用的安装包的时间,提高第一电子设备下载应用的速度,提升用户体验。
另外,本申请实施例还提供了一种应用老化方法,该方法将应用的安装包拆分成多个子包。在第一电子设备需要对应用进行老化时,第一电子设备可以确定再次下载该应用的各个子包的时间,并根据各个子包的下载时间对该应用进行老化,以保留该应用的部分子包,使得在下一次需要使用该应用时,第一电子设备仅需要下载该应用的部分子包,而不需要下载该应用的整个安装包,可以减少应用的下载时间,提高应用再次启动的速度,提升用户体验。
本申请实施例提供的应用下载安装方法和应用老化方法可以应用于电子设备,电子设备可以为手机、平板电脑、可穿戴设备(如智能手表、智能眼镜、智能耳机等)、智慧大屏、车载设备、智能音箱、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、桌上型计算机等,本申请实施例对电子设备的具体类型不作任何限制。
以下首先介绍本申请实施例涉及的电子设备。请参阅图1,图1示出了电子设备100的一种结构示意图。
如图1所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方 式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple  access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比 如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一 些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通 知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图2是本申请实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,智能健身等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及 垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
【实施例一】
以下将结合附图和具体应用场景对本申请实施例一提供的应用下载安装方法进行详细说明。
本申请实施例中,可以将应用的安装包拆分成多个子包。当某一电子设备需下载安装该应用时,该电子设备需要下载该应用的全部子包,以根据全部子包来安装得到该应用。而当该电子设备仅获取该应用的部分子包时,该电子设备将无法安装得到该应用,或者安装得到的应用会存在全部或者部分功能无法使用的问题。
本申请实施例中,开发人员可以分别对各个子包进行开发,从而可以提高应用开发的便利性。例如,在免安装的应用(即无需显式安装,由系统程序框架后台安装后即可使用的应用,如原子化服务、特性能力(feature ability,FA)中,开发人员可以按照功能将应用的安装包拆分成一个或者多个鸿蒙能力包(harmonyos ability package,hap),一个hap对应一个ability,ability是应用所具备能力的抽象,是应用的重要组成部分。每一个ability均可独立运行,可完成一个特定的功能,一个或者多个功能可完成一个特定的便捷服务。以下将以免安装的应用为例对本实施例提供的应用下载安装方法进行示例性说明。
对于每一个免安装的应用,由于该应用往往需要应用于不同类型的电子设备,因此,开发人员需要针对不同类型的电子设备来开发该应用的各个安装包。本实施例中,开发人员可以按照功能将该应用的每一个安装包划分成一个或多个子包,并分别对各子包进行开发,得到各个安装包对应的子包。然后,开发人员可以将各个安装包对应的子包发送给云端(也可以称为服务器)。云端接收到各个安装包对应的子包后,可以将安装包至少划分为第一部分和第二部分,第一部分可以包括第一子包,第二部分可以包括第二子包。其中,第一子包和第二子包均可以包括一个或者多个。第一子包可以为应用的基础部分,即可以为该应用的各个安装包中均具有的子包,也就是说,第一子包为可以在不同类型的电子设备中共用的数据包。第二子包可以为特性部分,即第二子包可以为某一安装包所特有的子包,也就是说,第二子包为与某一类型的电子设备的特性(或属性)所对应的数据包。或者,开发人员开发得到各个安装包对应的子包后,可以先自行将子包划分为第一部分和第二部分,然后可以将第一部分和第二部分发送给云端。因此,对于任一应用,云端可以存储该应用的第一子包以及分别与各类型的电子设备对应的各第二子包,以减少云端针对各应用所存储的数据包的数量,减少云端的存储负担。
可以理解的是,上述描述的第一部分为基础部分,第二部分为特性部分,仅作示意性解释,不应理解为对本申请实施例的限制,本申请实施例中,也可以是第一部分为特性部分,第二部分为共有部分。以下将以第一部分为基础部分,第二部分为特性部分为例进行示例性说明。
请参阅图3,图3示出了本实施例提供的应用下载安装方法所应用的系统结构图。如图3所示,该系统可以包括云端300、第一电子设备110和至少一个第二电子设备120。其中,第一电子设备110为需进行应用下载的电子设备,第二电子设备120为通过通信网络与第一电子设备110通信连接的电子设备。第 一电子设备110还可以通过通信网络与云端300通信连接,云端300存储有可以应用于第一电子设备110的各应用的第一子包和第二子包。如图3中的(a)所示,第一电子设备110与第二电子设备120(图3中的(a)中以一个为例进行示例性说明)可以为同类型的电子设备,例如均可以为手机,此时云端300可以存储有可以应用于手机的各应用的第一子包和各第二子包。例如,在通话应用和音乐应用可以应用于手机时,云端300可以存储有该通话应用的第一子包R和第二子包A,以及存储有该音乐应用的第一子包S和第二子包B。
应理解,当第一电子设备110与第二电子设备120为同类型的电子设备,但具有不同的特性时,也就是说,当第一电子设备110和第二电子设备120为同类型的电子设备,但具有不同的第二子包时,可以将第一电子设备110作为与第二电子设备120不同类型的电子设备来进行应用的下载安装。
其中,第一电子设备110可以根据是否检测到下载第一应用的触发事件,来确定是否需进行第一应用的下载。应理解,第一应用可以为任一应用。示例性的,第一应用可以为FA,触发事件可以为对未安装的FA的点击或者触摸操作等。或者,第一应用可以为应用市场中某一个未安装的应用,触发事件可以为对该应用对应的安装或下载按钮的点击或者触摸操作等。
或者,如图3中的(b)所示,第一电子设备110与第二电子设备120(图3中的(b)中以四个为例进行示例性说明)也可以为不同类型的电子设备,例如第一电子设备110可以为手机,第二电子设备120可以分别为智能手表、电脑、平板电脑和智慧大屏,此时云端300可以存储有可以应用于第一电子设备110的各应用的第一子包和第二子包。其中,可以应用于第一电子设备110的各应用也可以应用于至少一种类型的第二电子设备120,因此,各应用的第二子包至少可以包括与第一电子设备110对应的第二子包以及与至少一种类型的第二电子设备120对应的第二子包。例如,在通话应用可以应用于手机、智能手表、电脑、平板电脑和智慧大屏时,云端300可以存储有该通话应用的第一子包R,以及与手机对应的第二子包A、与智能手表对应的第二子包B、与电脑对应的第二子包C、与平板电脑对应的第二子包D、与智慧大屏对应的第二子包E;例如,在音乐应用可以应用于手机、电脑、平板电脑和智慧大屏时,云端300还可以存储有该音乐应用的第一子包S,以及与手机对应的第二子包F、与电脑对应的第二子包G、与平板电脑对应的第二子包H、与智慧大屏对应的第二子包I;例如,在智能健身应用可以应用于手机、智能手表和智慧大屏时,云端300还可以存储有该智能健身应用的第一子包T,以及与手机对应的第二子包J、与智能手表对应的第二子包K、与智慧大屏对应的第二子包L,等等。
在此,通信网络可以是蓝牙、WiFi、紫蜂(ZigBee)或者NFC等局域网,也可以是2G、3G、4G、5G、未来演进的公共陆地移动网络(public land mobile network,PLMN)或者因特网等广域网。
下面以应用的第一子包以及与各类型的电子设备对应的第二子包分别包括多个为例,对第一电子设备110下载应用的过程进行详细说明。
可以理解的是,在第一电子设备110需要下载某一应用时,各第二电子设备120是否已下载该应用会使得第一电子设备110下载该应用的过程有所不同。下面从各第二电子设备120均未下载该应用和存在第二电子设备120已下载该应用两个方面来对第一电子设备110下载该应用的过程进行详细说明。
一、各第二电子设备120均未下载该应用
本实施例中,在第一电子设备110需要下载某一个应用时,第一电子设备110可以先确定各第二电子设备120是否已下载该应用。当各第二电子设备120均未下载该应用时,表明只有云端300存储有该应用的第一子包和各第二子包,此时,第一电子设备110可以从云端300下载该应用的第一子包以及与第一电子设备110对应的第二子包。例如,在图3中的(b)所示的应用场景中,在手机需要下载通话应用时,若智能手表、电脑、平板电脑和智慧大屏均未下载该通话应用,表明只有云端300存储有该通话应用的第 一子包R和各第二子包(即A、B、C、D、E),此时手机可以从云端300下载该通话应用的第一子包R以及与手机对应的第二子包A。
示例性的,第一电子设备110可以根据各第二电子设备120中该应用的子包信息来确定各第二电子设备120是否已下载该应用。具体地,在需要下载该应用时,第一电子设备110可以向云端300发送第一查询请求,以请求查询该应用的子包信息,例如第一电子设备110可以调用pagequery接口,向云端300发送第一查询请求。云端300接收到第一查询请求之后,可以查询该应用的子包信息,并可以将所查询到的子包信息以数组形式(例如{子包1、子包2、……、子包n})返回给第一电子设备110。随后,第一电子设备110可以分别向各第二电子设备120发送第二查询请求,以请求查询各第二电子设备120中该应用的子包信息,例如第一电子设备110可以调用queryDevicesFa接口,分别向各第二电子设备120发送第二查询请求。各第二电子设备120接收到第二查询请求之后,可以查询各第二电子设备120中该应用的相关信息,并可以将查询结果发送给第一电子设备110。然后,第一电子设备110可以根据各第二电子设备120返回的查询结果和云端300返回的子包信息确定各第二电子设备120是否已下载该应用。
需要说明的是,一般只有该应用可以应用的电子设备才会下载该应用,因此在第一电子设备110需要下载该应用时,第一电子设备110可以先确定该应用可以应用的电子设备的类型。然后,第一电子设备110可以确定这些类型的第二电子设备120是否已下载该应用。即第一电子设备110只需要向这些类型的第二电子设备120发送第二查询请求来查询该应用的相关信息,而不需要向每一个第二电子设备120发送第二查询请求,减少查询数量,提高查询效率,提高第一电子设备110的应用下载速度。
例如,在图3中的(b)所示的应用场景中,在手机需要下载智能健身应用时,手机可以先确定该智能健身应用可以应用的电子设备的类型,假定该智能健身应用可以应用的电子设备的类型为手机、智能手表和智慧大屏,此时,手机可以仅分别向智能手表和智慧大屏发送第二查询请求,以请求查询智能手表和智慧大屏中是否具有该智能健身应用的相关信息。当确定智能手表中具有该智能健身应用的相关信息,而智慧大屏中不具有该智能健身应用的相关信息时,手机可以确定智能手表已下载该智能健身应用,智慧大屏并未下载该智能健身应用。
可以理解的是,开发人员在将某一应用的安装包上传至云端300时,可以同时上传该应用可以应用的电子设备的类型;或者云端300获取某一应用的安装包后,可以根据该应用的安装包(例如该安装包中的各第二子包)来确定该应用可以应用的电子设备的类型。即云端300可以存储有各应用可以应用的电子设备的类型。因此,第一电子设备110可以直接向云端300发送类型查询请求,来查询该应用可以应用的电子设备的类型。
请参阅图4和图5,图4和图5示出了本实施例提供的应用场景示意图一。如图4和图5所示,在该应用场景中,当各第二电子设备120均未下载该应用时,第一电子设备110可以向至少一个第二电子设备120发送下载指令,该下载指令用于指示该至少一个第二电子设备120从云端300下载该应用的第一子包和/或下载与第一电子设备110对应的第二子包,并将所下载的第一子包和/或第二子包发送给第一电子设备110。
在一个示例中,第一电子设备110可以指示某一第二电子设备120从云端300下载与第一电子设备110对应的完整安装包(即该应用的第一子包以及与第一电子设备110对应的第二子包)。具体地,第一电子设备110可以先确定各第二电子设备120从云端300下载该完整安装包的第一时间以及各第二电子设备120将该完整安装包发送给第一电子设备110的第二时间。然后,第一电子设备110可以将第一时间和第二时间之和最短的第二电子设备120确定为最终从云端300下载该完整安装包的第二电子设备120,并向所确定的第二电子设备120发送下载指令,以指示其从云端300下载该应用的第一子包以及与第一电子设备110 对应的第二子包,并将所下载的第一子包和第二子包发送给第一电子设备110,即通过性能较好的第二电子设备来进行应用的下载,可以减少第一电子设备110下载应用的时间,提高第一电子设备110的下载速度,提升用户体验。
例如,在图3中的(b)所示的应用场景中,在手机需要下载音乐应用,且智能手表、电脑、平板电脑以及智慧大屏均未下载该音乐应用时,手机可以先确定智能手表从云端300下载该音乐应用的第一子包S以及与手机对应的第二子包F的第一时间TW 1以及将第一子包S和第二子包F发送给手机的第二时间TW 2,电脑从云端300下载第一子包S和第二子包F的第一时间TC 1以及将第一子包S和第二子包F发送给手机的第二时间TC 2,平板电脑从云端300下载第一子包S和第二子包F的第一时间TP 1以及将第一子包S和第二子包F发送给手机的第二时间TP 2,智慧大屏从云端300下载第一子包S和第二子包F的第一时间TS 1以及将第一子包S和第二子包F发送给手机的第二时间TS 2。假设手机确定(TP 1+TP 2)<(TW 1+TW 2)<(TC 1+TC 2)<(TS 1+TS 2),手机可以将平板电脑确定为从云端300下载第一子包S和第二子包F的第二电子设备,此时,如图4中的(a)所示,手机可以向平板电脑发送下载指令,以指示平板电脑从云端300下载该音乐应用的第一子包S和第二子包F,并将所下载的第一子包S和第二子包F发送给手机。平板电脑接收到下载指令时,可以向云端300发送下载请求,以请求下载第一子包S和第二子包F。
本实施例中,任一第二电子设备120从云端300下载该完整安装包的第一时间可以根据第二电子设备120与云端300之间的网络传输速度和该完整安装包的大小volume all确定。假设第j个第二电子设备120从云端300下载该完整安装包时,需经过时间t j,delay1达到稳定速度v j,max1,那么第j个第二电子设备120从云端300下载该完整安装包的第一时间T j1=t j,delay1+max(volume all–volume 1,0)/vj,max1,volume 1为在时间t j,delay1内,第二电子设备120从云端300下载的安装包的大小。
类似的,第二电子设备120将该完整安装包发送给第一电子设备110的第二时间可以根据第二电子设备120与第一电子设备110之间的网络传输速度和该完整安装包的大小volume all确定。假设第j个第二电子设备120将该完整安装包传输给第一电子设备110时,需经过时间t j,delay2达到稳定速度v j,max2,那么第j个第二电子设备120将该完整安装包发送给第一电子设备110的第二时间T j2=t j,delay2+max(volume all-volume 2,0)/v j,max2,volume 2为在时间t j,delay2内,第二电子设备120传输给第一电子设备110的安装包的大小。
其中,第二电子设备120与云端300之间的网络传输速度是指第一电子设备110请求下载该应用时,第二电子设备120与云端300之间所连接网络的传输速度。同样的,第二电子设备120与第一电子设备110之间的网络传输速度是指第一电子设备110请求下载该应用时,第二电子设备120与第一电子设备110之间所连接网络的传输速度。可以理解的是,第二电子设备120与云端300之间的网络传输速度,以及第二电子设备120与第一电子设备110之间的网络传输速度可以根据实际情况确定。
需要说明的是,上述将第一时间和第二时间之和最短的第二电子设备确定为最终从云端300下载该完整安装包的第二电子设备120仅作示意性解释,不应理解为对本申请实施例的限制。本申请实施例中,第一电子设备110也可以获取第一时间和第二时间之和小于或等于预设时间阈值的第二电子设备,并从这些第二电子设备中确定最终从云端300下载该完整安装包的电子设备。
示例性的,第一电子设备110可以根据这些第二电子设备当前的使用情况和/或设备性能来确定最终从云端300下载该完整安装包的电子设备,例如可以将当前处于空闲状态的第二电子设备确定为最终云端300下载该完整安装包的电子设备。
示例性的,第一电子设备110可以根据用户的选择操作来确定最终从云端300下载该完整安装包的电 子设备,即用户可以自行从这些第二电子设备中选择最终从云端300下载该完整安装包的电子设备。
其中,预设时间阈值可以由第一电子设备110默认设置,也可以由用户自定义设置,例如用户可以根据自身所能接受的最大下载时间来设置预设时间阈值,如将预设时间阈值自定义设置为40秒、60秒或80秒,等等。
类似的,后续将第三时间和第四时间(或第五时间和第六时间)之和最短的第二电子设备确定为最终从云端300下载第一子包或第二子包的第二电子设备120也仅作示意性解释,不应理解为对本申请实施例的限制。
在另一个示例中,第一电子设备110可以指示某一第二电子设备120从云端300下载该应用的全部第一子包,同时第一电子设备110可以从云端300下载与第一电子设备110对应的全部第二子包;或者,第一电子设备110可以指示某一第二电子设备120从云端300下载与第一电子设备110对应的全部第二子包,同时第一电子设备110可以从云端300下载该应用的全部第一子包;或者,第一电子设备110可以指示某一第二电子设备120从云端300下载该应用的全部第一子包,同时指示另一第二电子设备120从云端300下载与第一电子设备110对应的全部第二子包,以通过第一电子设备110和第二电子设备120,或者多个第二电子设备120分布式下载该应用的安装包,减少第一电子设备110下载应用的时间,提高第一电子设备110的下载速度。
在一种可能的实现方式中,第一电子设备110可以确定各第二电子设备120从云端300下载全部第一子包的第三时间以及将所下载的第一子包发送给第一电子设备110的第四时间。然后,第一电子设备110可以将第三时间和第四时间之和最短的第二电子设备120确定为最终从云端300下载全部第一子包的第二电子设备120,并向所确定的第二电子设备120发送下载指令,以指示其从云端300下载该应用的全部第一子包,并可以将所下载的第一子包发送给第一电子设备110,同时第一电子设备110可以从云端300下载与第一电子设备110对应的全部第二子包。
例如,在图3中的(b)所示的应用场景中,当手机需要下载通话应用,且智能手表、电脑、平板电脑以及智慧大屏均未下载该通话应用时,手机可以先确定智能手表从云端300下载该通话应用的第一子包R的第三时间TW 13以及将第一子包R发送给手机的第四时间TW 14,电脑从云端300下载第一子包R的第三时间TC 13以及将第一子包R发送给手机的第四时间TC 14,平板电脑从云端300下载第一子包R的第三时间TP 13以及将第一子包R发送给手机的第四时间TP 14,智慧大屏从云端300下载第一子包R的第三时间TS 13以及将第一子包R发送给手机的第四时间TS 14。假设手机确定(TC 13+TC 14)<(TP 13+TP 14)<(TS 13+TS 14)<(TW 13+TW 14),手机可以将电脑确定为从云端300下载第一子包R的第二电子设备,此时,如图4中的(b)所示,手机可以向电脑发送下载指令,以指示电脑从云端300下载该通话应用的第一子包R,并将所下载的第一子包R发送给手机。电脑接收到下载指令时,可以向云端300发送第一下载请求,以请求下载第一子包R。同时,手机可以向云端300发送第二下载请求,以请求下载与手机对应的第二子包A。
在另一种可能的实现方式中,第一电子设备110可以确定各第二电子设备120从云端300下载与第一电子设备110对应的全部第二子包的第三时间以及将所下载的第二子包发送给第一电子设备110的第四时间。然后,第一电子设备110可以将第三时间和第四时间之和最短的第二电子设备120确定为最终从云端300下载第二子包的第二电子设备120,并向所确定的第二电子设备120发送下载指令,以指示其从云端300下载与第一电子设备110对应的全部第二子包,并将所下载的第二子包发送给第一电子设备110,同时第一电子设备110可以从云端300下载该应用的第一子包。
例如,在图3中的(b)所示的应用场景中,当手机需要下载通话应用,且智能手表、电脑、平板电 脑以及智慧大屏均未下载该通话应用时,手机可以先确定智能手表从云端300下载与第一电子设备110对应的第二子包A的第三时间TW 23以及将第二子包A发送给手机的第四时间TW 24,电脑从云端300下载第二子包A的第三时间TC 23以及将第二子包A发送给手机的第四时间TC 24,平板电脑从云端300下载第二子包A的第三时间TP 23以及将第二子包A发送给手机的第四时间TP 24,智慧大屏从云端300下载第二子包A的第三时间TS 23以及将第二子包A发送给手机的第四时间TS 24。假设,手机确定(TS 23+TS 24)<(TC 23+TC 24)<(TP 23+TP 24)<(TW 23+TW 24),手机可以将智慧大屏确定为从云端300下载第二子包A的第二电子设备,此时,如图5中的(a)所示,手机可以向智慧大屏发送下载指令,以指示智慧大屏从云端300下载该通话应用的第二子包A,并将所下载的第二子包A发送给手机。智慧大屏接收到下载指令时,可以向云端300发送第一下载请求,以请求下载第二子包A。同时,手机可以向云端300发送第二下载请求,以请求下载该通话应用的第一子包R。
在另一种可能的实现方式中,第一电子设备120可以确定各第二电子设备120从云端300下载该应用的全部第一子包的第三时间以及将所下载的第一子包发送给第一电子设备110的第四时间,并确定各第二电子设备120从云端300下载与第一电子设备110对应的全部第二子包的第五时间以及将所下载的第二子包发送给第一电子设备110的第六时间。然后,第一电子设备110可以将第三时间与第四时间之和最短的第二电子设备a确定为从云端300下载该应用的全部第一子包的电子设备,并可以将第五时间与第六时间之和最短的第二电子设备b确定为从云端300下载与第一电子设备110对应的第二子包的电子设备。此时,第一电子设备110可以向第二电子设备a发送第一下载指令,并同时向第二电子设备b发送第二下载指令,第一下载指令用于指示下载该应用的全部第一子包,并将所下载的第一子包发送给第一电子设备110,第二下载指令用于指示下载与第一电子设备110对应的全部第二子包,并将所下载的第二子包发送给第一电子设备110。
例如,在图3中的(b)所示的应用场景中,当手机需要下载通话应用,且智能手表、电脑、平板电脑以及智慧大屏均未下载该通话应用时,手机可以先确定智能手表从云端300下载该通话应用的全部第一子包R的第三时间TW 13以及将第一子包R发送给手机的第四时间TW 14,电脑从云端300下载第一子包R的第三时间TC 13以及将第一子包R发送给手机的第四时间TC 14,平板电脑从云端300下载第一子包R的第三时间TP 13以及将第一子包R发送给手机的第四时间TP 14,智慧大屏从云端300下载第一子包R的第三时间TS 13以及将第一子包R发送给手机的第四时间TS 14。同时,第一电子设备110还可以确定智能手表从云端300下载与第一电子设备110对应的第二子包A的第五时间TW 25以及将第二子包A发送给手机的第六时间TW 26,电脑从云端300下载第二子包A的第五时间TC 25以及将第二子包A发送给手机的第六时间TC 26,平板电脑从云端300下载第二子包A的第五时间TP 25以及将第二子包A发送给手机的第六时间TP 26,智慧大屏从云端300下载第二子包A的第五时间TS 25以及将第二子包A发送给手机的第六时间TS 26。假设手机确定(TC 13+TC 14)<(TS 13+TS 14)<(TP 13+TP 14)<(TW 13+TW 14),且(TS 25+TS 26)<(TC 25+TC 26)<(TP 25+TP 26)<(TW 25+TW 26),手机可以将电脑确定为从云端300下载第一子包R的第二电子设备,并将智慧大屏确定为从云端300下载第二子包A的第二电子设备,如图5中的(b)所示,手机可以向电脑发送第一下载指令,以指示电脑从云端300下载第一子包R,并将所下载的第一子包R发送给手机,同时,手机可以向智慧大屏发送第二下载指令,以指示智慧大屏从云端300下载第二子包A,并将所下载的第二子包A发送给手机。电脑接收到第一下载指令时,可以向云端300发送第一下载请求,以请求下载第一子包R。智慧大屏接收到第二下载指令时,可以向云端300发送第二下载请求,以请求下载第二子包A。
其中,上述的第三时间、第四时间、第五时间以及第六时间的确定方式与前述的第一时间或第二时间 的确定方式相类似,原理基本相同,具体内容可以参照前述描述,在此不再赘述。
需要说明的是,当第二电子设备a与第二电子设备b为同一电子设备时,第一电子设备110可以获取第三时间与第四时间之和仅大于T a的第二电子设备c,并获取第五时间与第六时间之和仅大于T b的第二电子设备d。其中,T a为第二电子设备a对应的第三时间与第四时间之和,T b为第二电子设备b对应的第五时间和第六时间之和。以下将第二电子设备c对应的第三时间与第四时间之和表示为T c,将第二电子设备d对应的第五时间与第六时间之和表示为T d。同时,第一电子设备110可以确定第二电子设备a下载全部第一子包以及与第一电子设备110对应的全部第二子包的时间T a’。随后,第一电子设备110确定T c与T d中的较小值,并根据该较小值、T a、T b以及T a’来进行该应用的下载。
例如,当T c<T d,且(T b+T c)<T a’时,第一电子设备110可以确定由第二电子设备c下载该应用的全部第一子包,同时由第二电子设备b下载与第一电子设备110对应的全部第二子包。当T c>T d,且(T a+T d)<T a’时,第一电子设备110可以确定由第二电子设备a下载该应用的全部第一子包,同时由第二电子设备d下载与第一电子设备110对应的全部第二子包。当T c<T d,且(T b+T c)>T a’时,或者当T c>T d,且(T a+T d)>T a’时,第一电子设备110可以确定由第二电子设备a下载该应用的全部第一子包以及与第一电子设备110对应的全部第二子包。
在另一个示例中,第一电子设备110可以指示第一电子设备110与第二电子设备120中的至少两个电子设备分布式下载该应用的第一子包。或者,第一电子设备110可以指示第一电子设备110与第二电子设备120中的至少两个电子设备分布式下载与第一电子设备110对应的第二子包。或者,第一电子设备110可以指示第一电子设备110与第二电子设备120中的至少两个电子设备分布式下载该应用的安装包(即第一子包以及与第一电子设备110对应的第二子包)。即通过多电子设备分布式下载该应用的安装包,可以减少安装包的下载时间,提高第一电子设备110下载应用的速度。
下面将以第一电子设备110指示第一电子设备110与第二电子设备120中的至少两个电子设备分布式下载该应用的第一子包为例进行示例性说明。其中,分布式下载与第一电子设备110对应的第二子包以及分布式下载该应用的安装包,可以参照分布式下载该应用的第一子包的相关内容。
具体地,第一电子设备110可以根据第二电子设备120的数量确定对该应用的第一子包进行分组的所有可能的分组方式,并根据各分组方式分别对该应用的第一子包进行分组,得到各分组方式对应的各子包组。随后,对于每一种分组方式,第一电子设备110可以确定该分组方式对应的所有可能的分布式下载方式。然后,第一电子设备110可以确定各分布式下载方式对应的下载时间,并可以根据下载时间最短的分布式下载方式,确定该应用对应的下载策略,下载策略可以包括下载该应用的第一子包的各电子设备以及各电子设备所需下载的子包。其中,各子包组可以包括一个或者多个第一子包,各分组方式对应的子包组的数量s∈[2,1+n],n为第二电子设备120的数量。
请参阅图6,图6示出了本实施例提供的应用场景示意图二。如图6所示,该应用场景中,第一电子设备110可以为手机,第二电子设备120可以包括智能手表和平板电脑。手机、智能手表和平板电脑分别通过通信网络与云端300通信连接。云端300存储有可应用于手机的通话应用,该通话应用的第一子包R可以包括{R 1,R 2,R 3,R 4,R 5,R 6},且智能手表和平板电脑均未下载该通话应用。
当手机需要下载该通话应用时,手机可以根据第二电子设备120的数量确定对第一子包R进行分组的所有可能的分组方式,并可以根据各分组方式分别对第一子包R进行分组,得到各分组方式对应的各子包组。例如,手机可以根据将第一子包R划分为两个子包组的方式得到分组方式A、分组方式B和分组方式C等,以及根据将第一子包R划分为三个子包组的方式得到分组方式D、分组方式E和分组方式F等。示例性的,分组方式A对应的子包组可以包括{R 1,R 2,R 3,R 4,R 5}和{R 6},分组方式B对应的子包组可以 包括{R 1,R 3,R 5,R 6}和{R 2,R 4},分组方式C对应的子包组可以包括{R 1,R 3,R 4}和{R 2,R 5,R 6},分组方式D对应的子包组可以包括{R 1,R 2}、{R 3,R 4}和{R 5,R 6},分组方式E对应的子包组可以包括{R 1,R 2,R 3}、{R 4,R 5}和{R 6},分组方式F对应的子包组可以包括{R 1,R 3,R 4,R 6}、{R 2}和{R 5},等等。
对于每一种分组方式,手机可以确定该分组方式对应的所有可能的分布式下载方式,并确定各分布式下载方式对应的下载时间。例如,对于上述的分组方式C,手机可以确定分布式下载方式一为:手机下载子包组{R 1,R 3,R 4},智能手表下载子包组{R 2,R 5,R 6};分布式下载方式二为;手机下载子包组{R 1,R 3,R 4},平板电脑下载子包组{R 2,R 5,R 6};分布式下载方式三为:手机下载子包组{R 2,R 5,R 6},智能手表下载{R 1,R 3,R 4};分布式下载方式四为:手机下载子包组{R 2,R 5,R 6},平板电脑下载子包组{R 1,R 3,R 4};分布式下载方式五为:智能手表下载子包组{R 1,R 3,R 4},平板电脑下载子包组{R 2,R 5,R 6};分布式下载方式六为:智能手表下载子包组{R 2,R 5,R 6},平板电脑下载子包组{R 1,R 3,R 4}。具体地,分布式下载方式一对应的下载时间T 1=max(TI 11,TW 12+TW 13),TI 11为手机从云端300下载第一子包{R 1,R 3,R 4}的时间,TW 12为智能手表从云端300下载第一子包{R 2,R 5,R 6}的时间,TW 13为智能手表将第一子包{R 2,R 5,R 6}传输给手机的时间。分布式下载方式五对应的下载时间T 5=max(TW 51+TW 52,TP 53+TP 54),TW 51为智能手表从云端300下载第一子包{R 1,R 3,R 4}的时间,TW 52为智能手表将第一子包{R 1,R 3,R 4}传输给手机的时间,TP 53为平板电脑从云端300下载第一子包{R 2,R 5,R 6}的时间,TP 54为平板电脑将第一子包{R 2,R 5,R 6}传输给手机的时间。其中,分布式下载方式二对应的下载时间、分布式下载方式三对应的下载时间、分布式下载方式四对应的下载时间与分布式下载方式一对应的下载时间的确定原理相同,分布式下载方式五对应的下载时间与分布式下载方式六对应的下载时间的确定原理相同,在此不再赘述。
随后,手机可以获取下载时间最短的分布式下载方式,并根据该分布式下载方式来进行第一子包的下载。假设,在所有的分布式下载方式中,上述的分布式下载方式四对应的下载时间最短,则手机可以确定由手机从云端300下载第一子包{R 2,R 5,R 6},同时由平板电脑从云端300下载第一子包{R 1,R 3,R 4}。此时,手机可以向平板电脑发送下载指令,以指示平板电脑从云端300下载该应用的第一子包R 1、第一子包R 3和第一子包R 4,并将所下载的第一子包R 1、第一子包R 3和第一子包R 4发送给手机。平板电脑接收到下载指令时,可以向云端300发送第一下载请求,以请求下载第一子包R 1、第一子包R 3和第一子包R 4。同时,手机自己可以向云端300发送第二下载请求,以请求下载该应用的第一子包R 2、第一子包R 5和第一子包R 6
由于第一子包的大小差异较大,且各电子设备的下载速度一般需要一定的缓存时间才能达到最优的稳定速度,为保证下载稳定性,可以对第一子包进行分级分配下载。即本实施例中,在对该应用的第一子包进行分组之前,第一电子设备110可以先根据第一子包的大小对第一子包进行分级,即将第一子包划分为预设层级,每一层级中可以包括一个或者多个第一子包。然后,第一电子设备110可以将每一个层级中的所有第一子包作为一个整体来进行第一子包的分组,得到各分组方式对应的各子包组,各子包组可以包括至少一个层级中的所有第一子包。对于每一种分组方式,第一电子设备110可以确定该分组方式对应的所有可能的分布式下载方式。随后,第一电子设备110可以确定各分布式下载方式对应的下载时间,并根据下载时间最短的分布式下载方式,确定该应用对应的下载策略,即确定下载该应用的第一子包的各电子设备以及各电子设备所需下载的子包。
可以理解的是,第一电子设备110可以根据实际情况来进行预设层级的确定,例如,第一电子设备110可以按照(0,volume],(volume,10*volume]和(10*volume,∞]将该应用的第一子包划分为三个层级,volume可以为第一电子设备110达到最优的稳定速度时,已下载的子包大小。
需要说明的是,第一电子设备110在确定分布式下载方式对应的下载时间后,可以获取第一电子设备 110直接下载该应用的第一子包所需的下载时间,以及指示一个第二电子设备120下载第一子包所需的最短的下载时间,并可以根据这多个下载时间来确定最终下载第一子包的电子设备。例如,第一电子设备可以根据这多个下载时间中的最短时间,来确定最终下载第一子包的电子设备。
二、存在第二电子设备120已下载该应用
本实施例中,当存在第二电子设备120已下载该应用(为方便描述,下面将已下载该应用的第二电子设备120称为第三电子设备)时,第一电子设备110可以根据第三电子设备所下载的安装包是否包括与第一电子设备110对应的第二子包来进行该应用的下载。
(一)第三电子设备所下载的安装包中不包括与第一电子设备110对应的第二子包
具体地,各电子设备下载应用时,可以仅下载该应用的第一子包以及与该电子设备对应的第二子包。因此,当第一电子设备110下载该应用时,若存在第三电子设备,表明第三电子设备具有该应用的第一子包。也就是说,云端300具有与第一电子设备110对应的第二子包,第三电子设备和云端300均具有该应用的第一子包。此时,第一电子设备110可以从云端300下载与第一电子设备110对应的第二子包,并可以从云端300和/或第三电子设备下载该应用的第一子包。其中,第一电子设备110仅从云端300下载该应用的第一子包以及与第一电子设备110对应的第二子包的内容可以参照前述第一电子设备110从云端300下载该应用的完整安装包的描述。
示例性的,第一电子设备110可以从第三电子设备下载该应用的第一子包,并可以同时从云端300下载与第一电子设备110对应的第二子包。在此,当第三电子设备为一个时,第一电子设备110可以从这一个第三电子设备下载第一子包。当第三电子设备为多个时,第一电子设备110可以确定下载时间最短的第三电子设备,并从下载时间最短的第三电子设备下载第一子包。此时的下载时间是指第一电子设备110从第三电子设备下载全部第一子包所需的时间。其中,此时的下载时间以及后续所述的下载时间均可以参照前述第一时间的确定方式确定,在此不再赘述。
或者,第一电子设备110可以从云端300下载与第一电子设备110对应的第二子包,并可以从云端300和第三电子设备分布式下载该应用的第一子包。具体地,第一电子设备110可以根据第三电子设备的数量确定对第一子包进行分组的所有可能的分组方式,并可以根据各分组方式分别对第一子包进行分组,得到各分组方式对应的各子包组。其中,各分组方式对应的子包组的数量s∈[2,1+n],n为第三电子设备的数量。对于每一种分组方式,第一电子设备110可以确定该分组方式对应的所有可能的分布式下载方式。然后,第一电子设备110可以确定各分布式下载方式对应的下载时间,并根据下载时间最短的分布式下载方式来进行该应用的下载。
类似的,第一电子设备110在确定分布式下载方式对应的下载时间后,可以获取第一电子设备110直接下载该应用的第二子包所需的下载时间,以及指示一个第二电子设备120下载第二子包所需的最短的下载时间,并可以根据这多个下载时间来确定最终下载第二子包的电子设备。例如,第一电子设备可以根据这多个下载时间中的最短时间,来确定最终下载第二子包的电子设备。
其中,参照前述描述可知,分布式下载方式对应的下载时间为第一电子设备110从该分布式下载方式涉及的设备分别下载部分第一子包所需时间的最大值。由于,第一电子设备110需要从云端300下载与第一电子设备110对应的第二子包,因此,当分布式下载方式中涉及从云端300下载第一子包时,第一电子设备110从云端300下载第一子包的时间可以包括第一电子设备110从云端300下载与第一电子设备110对应的第二子包的时间和从云端300下载部分第一子包的时间。
请参阅图7,图7示出了本实施例提供的应用场景示意图三。在该应用场景中,手机需要下载通话应用,该通话应用的第一子包R可以包括{R 1,R 2,R 3,R 4,R 5,R 6},且手机确定智能手表和平板电脑均已 下载该通话应用。即智能手表中具有该通话应用的第一子包{R 1,R 2,R 3,R 4,R 5,R 6}和第二子包B,平板电脑中具有该通话应用的第一子包{R 1,R 2,R 3,R 4,R 5,R 6}和第二子包D。
此时,手机可以确定从智能手表下载第一子包{R 1,R 2,R 3,R 4,R 5,R 6}的时间TW和从平板电脑下载第一子包{R 1,R 2,R 3,R 4,R 5,R 6}的时间TP,假设手机确定TW<TP,如图7中的(a)所示,手机可以向云端300发送第一下载请求,以请求下载与手机对应的第二子包A。同时,手机可以向从智能手表发送第二下载请求,以请求下载第一子包{R 1,R 2,R 3,R 4,R 5,R 6}。
或者,手机可以确定对第一子包进行分组的所有可能的分组方式,并根据各分组方式分别对第一子包{R 1,R 2,R 3,R 4,R 5,R 6}进行分组,得到各分组方式对应的各子包组。例如手机根据将第一子包{R 1,R 2,R 3,R 4,R 5,R 6}划分为两个子包组的方式,可以得到分组方式d和分组方式e等,根据将第一子包{R 1,R 2,R 3,R 4,R 5,R 6}划分为三个子包组的方式,可以得到分组方式f和分组方式g等。其中,分组方式d对应的子包组可以包括{R 1,R 2,R 4}和{R 3,R 5,R 6},分组方式e对应的子包组可以包括{R 1,R 4,R 5,R 6}和{R 2,R 3},分组方式f对应的子包组可以包括{R 1,R 2,R 3}、{R 4,R 5}和{R 6},分组方式g对应的子包组可以包括{R 2,R 3}、{R 1,R 5}和{R 4,R 6}。
对于每一种分组方式,手机可以确定该分组方式对应的所有可能的分布式下载方式,并确定各分布式下载方式对应的下载时间。例如,对于分组方式d,手机确定分布式下载方式一可以为:手机从智能手表下载子包组{R 1,R 2,R 4},并同时从平板电脑下载{R 3,R 5,R 6};分布式下载方式二可以为:手机从智能手表下载{R 3,R 5,R 6},并同时从平板电脑下载{R 1,R 2,R 4};分布式下载方式三可以为:手机从云端下载子包组{R 1,R 2,R 4},并同时从智能手表下载{R 3,R 5,R 6};分布式下载方式四可以为:手机从云端下载{R 3,R 5,R 6},并同时从平板电脑下载{R 1,R 2,R 4}。其中,分布式下载方式一对应的下载时间=max(TW,TP),此时TW为手机从智能手表下载第一子包{R 1,R 2,R 4}的时间,TP为手机从平板电脑下载第一子包{R 3,R 5,R 6}的时间。分布式下载方式三对应的下载时间=max(TC,TW),此时TC为手机从云端下载第一子包{R 1,R 2,R 4}和第二子包A的时间,TW为手机从智能手表下载第一子包{R 3,R 5,R 6}的时间。应理解,分布式下载方式二对应的下载时间与分布式下载方式一对应的下载时间的确定原理相同,分布式下载方式四对应的下载时间与分布式下载方式三对应的下载时间的确定原理相同。
然后,手机可以根据下载时间最短的分布式下载方式来进行该应用的下载。假设手机确定上述的分布式下载方式二对应的下载时间最短,此时,如图7中的(b)所示,手机可以向云端300发送第一下载请求,以请求下载第二子包A。同时,手机可以向智能手表发送第二下载请求,以请求下载第一子包{R 3,R 5,R 6},以及可以向平板电脑发送第三下载请求,以请求下载第一子包{R 1,R 2,R 4}。
(二)第三电子设备所下载的安装包中包括与第一电子设备110对应的第二子包
在此,当第三电子设备与第一电子设备110为同类型且特性相同的电子设备,或者当各电子设备下载该应用时,可以下载该应用的全部安装包(即该应用的第一子包以及与各类型的电子设备对应的第二子包)时,若存在第三电子设备,表明第三电子设备和云端300均具有该应用的第一子包以及与第一电子设备110对应的第二子包。此时,第一电子设备110可以从云端300和/或第三电子设备下载该应用的第一子包,并可以从云端300和/或第三电子设备下载与第一电子设备110对应的第二子包。
其中,第一电子设备110从云端300或第三电子设备下载该应用的第一子包,并从云端300和第三电子设备分布式下载与第一电子设备110对应的第二子包,以及第一电子设备110从云端300和第三电子设备分布式下载该应用的第一子包,并从云端300或第三电子设备下载与第一电子设备110对应的第二子包的原理与前述第一电子设备110从云端300下载与第一电子设备110对应的第二子包,并从云端300和第三电子设备分布式下载该应用的第一子包的原理基本相同,具体内容可以参照前述描述。
以下结合具体应用场景对第一电子设备110从云端300和第三电子设备分布式下载与第一电子设备110对应的第二子包,并从云端300和第三电子设备分布式下载该应用的第一子包的过程进行示例性说明。
请参阅图8,图8示出了本实施例提供的应用场景示意图四。在该应用场景中,手机需要下载通话应用,该通话应用的第一子包R可以包括{R 1,R 2,R 3,R 4,R 5,R 6},与手机对应的第二子包可以包括{A 1,A 2,A 3,A 4},且手机确定智能手表、平板电脑和智慧大屏均已下载该通话应用,即智能手表、平板电脑和智慧大屏中均具有该通话应用的第一子包{R 1,R 2,R 3,R 4,R 5,R 6}和第二子包{A 1,A 2,A 3,A 4}。
此时,手机可以确定对该通话应用的全部子包{R 1,R 2,R 3,R 4,R 5,R 6,A 1,A 2,A 3,A 4}进行分组的所有可能的分组方式,并可以根据各分组方式分别对该应用的全部子包{R 1,R 2,R 3,R 4,R 5,R 6,A 1,A 2,A 3,A 4}进行分组,得到各分组方式对应的各子包组。
例如,手机根据将全部子包{R 1,R 2,R 3,R 4,R 5,R 6,A 1,A 2,A 3,A 4}划分为两个子包组的方式,可以得到分组方式F1和第一分组方式F2,等等,划分为三个子包组的方式,可以得到分组方式F3和分组方式F4,等等,以及划分为四个子包组的方式,可以得到分组方式F5和分组方式F6,等等。假设,分组方式F1对应的子包组可以包括{R 1,R 2,R 3,A 1,A 2}和{R 4,R 5,R 6,A 3,A 4},分组方式F2对应的子包组可以包括{R 1,R 2,R 3,R 4}和{R 5,R 6,A 1,A 2,A 3,A 4},分组方式F3对应的子包组可以包括{R 1,R 2,A 1,A 2}、{R 3,R 4,A 3}和{R 5,R 6,A 4},分组方式F4对应的子包组可以包括{R 1,R 2,R 3}、{R 4,R 5,R 6}和{A 1,A 2,A 3,A 4},分组方式F5对应的子包组可以包括{R 1,R 2,A 2}、{R 3,R 4}、{R 5,R 6}和{A 1,A 3,A 4},分组方式F6对应的子包组包括{R 1,R 2,R 3}、{R 4,R 5,R 6}、{A 1,A 2}和{A 3,A 4}。
对于每一种分组方式,第一电子设备110可以确定分组方式对应的所有可能的分布式下载方式,并确定各分布式下载方式对应的下载时间。例如,对于分组方式F6,手机可以确定分布式下载方式一可以为:手机从云端下载{R 1,R 2,R 3},从智能手表下载{R 4,R 5,R 6},从平板电脑下载{A 1,A 2}以及从智慧大屏下载{A 3,A 4};分布式下载方式二可以为:手机从智能手表下载{R 1,R 2,R 3},从平板电脑下载{R 4,R 5,R 6},从云端下载{A 1,A 2}以及从智慧大屏下载{A 3,A 4};分布式下载方式三可以为:手机从云端下载{R 1,R 2,R 3},从平板电脑下载{R 4,R 5,R 6},从智慧大屏下载{A 1,A 2}以及从智能手表下载{A 3,A 4};分布式下载方式四可以为:手机从智慧大屏下载{R 1,R 2,R 3},从云端下载{R 4,R 5,R 6},从平板电脑下载{A 1,A 2}以及从智能手表下载{A 3,A 4},等等。其中,分布式下载方式一对应的下载时间=max(TC,TW,TP,TS),此时TC为手机从云端下载{R 1,R 2,R 3}{的时间,TW为手机从智能手表下载{R 4,R 5,R 6}的时间,TP为手机从平板电脑下载{A 1,A 2}的时间,TS为手机从智慧大屏下载{A 3,A 4}的时间。应理解,分布式下载方式二、三、四对应的下载时间的确定与之类似。
然后,手机可以根据下载时间最短的分布式下载方式来进行该应用的下载。假设手机确定上述的分布式下载方式四对应的下载时间最短,此时,如图8所示,手机可以向智慧大屏发送第一下载请求,以请求下载{R 1,R 2,R 3}。同时,手机可以向云端300发送第二下载请求,以请求下载{R 4,R 5,R 6},以及向平板电脑发送第三下载请求,以请求下载{A 1,A 2},以及向智能手表发送第四下载请求,以请求下载{A 3,A 4}。
需要说明的是,第一电子设备110在确定分布式下载方式对应的下载时间后,可以获取第一电子设备110直接从云端300或任一第三电子设备下载该应用的全部安装包所需的下载时间,并可以根据这多个下载时间来确定最终下载的下载方式。例如,第一电子设备可以根据这多个下载时间中的最短时间,来确定最终下载的下载方式。
可以理解的是,在存在第三电子设备时,第一电子设备110也可以指示至少一个第二电子设备120从云端300和/或第三电子设备下载该应用的第一子包和/或第二子包,并将所下载的第一子包和/或第二子包 发送给第一电子设备110。其中,第一电子设备110指示第二电子设备120从云端300和/或第三电子设备下载该应用的第一子包和/或第二子包的内容可以参照前述描述,在此不再赘述。
下面将对本实施例提供的应用下载安装方法进行示例性说明。请参阅图9,图9示出了本实施例提供的应用分包下载方法的示意性流程图。如图9所示,当第一电子设备110需要下载某一应用时,第一电子设备110可以向云端300发送第一查询请求,以请求查询该应用的子包信息,例如第一电子设备110可以调用pagequery接口,向云端300发送第一查询请求。云端300接收到第一查询请求之后,可以查询该应用的子包信息,并将所查询到的子包信息以数组形式(即{子包1、子包2、……、子包n})返回第一电子设备110。同时,第一电子设备110可以向各第二电子设备120发送第二查询请求,以请求查询各第二电子设备120中该应用的相关信息,例如第一电子设备110可以调用queryDevicesFa接口,向各第二电子设备120发送第二查询请求。各第二电子设备120接收到第二查询请求之后,可以查询各第二电子设备中该应用的相关信息,并将查询结果返回给第一电子设备110。随后,第一电子设备110可以根据各第二电子设备120返回的查询结果以及云端300返回的子包信息,确定该应用的下载策略,并根据该下载策略来进行该应用的下载。其中,下载策略指示第一电子设备110如何下载该应用的第一子包以及如何下载与第一电子设备110对应的第二子包。例如,下载策略可以为第一电子设备110从云端300下载与第一电子设备110对应的第二子包,并同时从第二电子设备120下载该应用的第一子包。
示例性的,第一电子设备110中设置有服务中心,服务中心可以包括服务管理模块、端侧数据管理模块以及策略调用模块。当第一电子设备110需要下载某一应用时,服务管理模块可以调用pagequery接口向云端300发送第一查询请求,并接收云端300所返回的子包信息。同时,服务管理模块还可以调用端侧数据管理模块中的queryDevicesFa接口向各第二电子设备120发送第二查询请求。端侧数据管理模块可以存储各第二电子设备120返回的查询结果。另外,服务管理模块还可以指示策略调用模块根据端侧数据管理模块中的查询结果以及服务管理模块中的子包信息确定该应用的下载策略,并将所确定的下载策略发送给服务管理模块。服务管理模块还可以根据该应用的下载策略来进行该应用的下载。
本实施例中,第一子包和第二子包的结构均可以为包头、序号以及具体内容。其中,包头中记录有该子包的类型(例如是第一子包,还是第二子包)和所属的应用。因此,第一电子设备110获取各子包后,可以根据包头中的信息找到该应用所对应的所有子包,并根据子包的序号对该应用的所有子包进行拼接,从而得到该应用的完整安装包。
本实施例中,将应用的安装包拆分成多个子包,云端和已下载该应用的电子设备可以存储有该应用的子包。因此,当第一电子设备需要下载应用时,第一电子设备可以同时从云端和已下载该应用的电子设备下载该应用的各子包,以减少第一电子设备下载该应用的安装包的时间,提高第一电子设备下载应用的速度,提升用户体验。
【实施例二】
以下将结合具体应用场景对本申请实施例二提供的应用老化方法进行详细说明。与实施例一相同,本实施例中,任一应用的安装包可以包括第一子包以及分别与各类型的电子设备对应的第二子包。
本实施例中,当某一电子设备(以下称为第一电子设备)中的某一应用满足预设老化条件时,第一电子设备可以分别确定该应用的各个子包对应的下载时间,并根据各个子包对应的下载时间对该应用进行老化。其中,预设老化条件可以为未被使用的连续时长达到预设时长阈值(例如30天),或者可以为接收到删除或卸载指令。该应用的子包可以包括该应用的第一子包以及与第一电子设备对应的第二子包。任一子包对应的下载时间为第一电子设备再次下载该子包所需的时间。
对于任一子包A i,第一电子设备可以确定各第二电子设备是否具有子包A i。其中,第二电子设备为与 第一电子设备通信连接的电子设备。当存在第二电子设备具有子包A i时,第一电子设备可以确定从云端下载子包A i的第一时间,以及分别从具有子包A i的第二电子设备(为描述方便,以下将具有子包A i的第二电子设备称为第三电子设备)下载子包A i的各第二时间,并可以将第一时间与各第二时间中的最小值确定为子包A i对应的下载时间Value(A i)。具体地,第一电子设备可以根据下述公式确定第一时间和第二时间:
T i,c=t c,delay+max(sizeof(A i)–volume c,0)/v c,max
T i,j=t j,delay+max(sizeof(A i)–volume j,0)/v j,max
其中,T i,c为从云端下载子包Ai的第一时间,t c,delay为从云端下载子包A i中,第一电子设备达到稳定速度v c,max所需的时间,volume c为在t c,delay时间,第一电子设备从云端下载的子包大小,sizeof(A i)为子包A i的大小,T i,j为从第j个第三电子设备下载子包A i的第二时间,t j,delay为从第j个第三电子设备下载子包A i中,第一电子设备达到稳定速度v j,max所需的时间,volume j为在t j,delay时间,第一电子设备从第j个第三电子设备下载的子包大小,1≤j≤L,L为第三电子设备的数量。
当各第二电子设备均不具有子包A i时,表明只有云端存储有子包A i,即第一电子设备只能从云端下载子包A i。此时,第一电子设备可以将从云端下载子包A i的第一时间确定为子包A i对应的下载时间Value(A i),即Value(A i)=T i,c=t c,delay+max(sizeof(A i)–volume c,0)/v c,max
本实施例中,在确定各个子包对应的下载时间之后,第一电子设备可以保留下载时间最长的M个子包,并将该应用的其他子包进行老化,即将下载速度较慢的部分子包进行保留,使得再次启动该应用时,可以减少该应用的下载时间。其中,M可以由用户自定义设置,也可以由第一电子设备根据实际情况具体确定。
在一种可能的实现方式中,第一电子设备保留某一子包可以是将该子包保留预设时间。也就是说,在确定各个子包对应的下载时间之后,第一电子设备可以保留下载时间最长的M个子包,并将该应用的其他子包进行老化。后续,经过预设时间后,若第一电子设备仍为使用该应用,第一电子设备则可以将保留的M个子包中的一个或者多个进行老化。其中,预设时间可以由技术人员根据实际场景具体设置。
示例性的,第一电子设备可以根据各个子包对应的下载时间对子包进行降序排列,得到排列数组。随后,第一电子设备可以根据卸载应用时,第一电子设备所允许残留的最大数据量和降序排列后的数组来确定M,具体地:
Figure PCTCN2022114539-appb-000001
其中,maxSize为卸载应用时,第一电子设备所允许残留的最大数据量,
Figure PCTCN2022114539-appb-000002
为排列数组中的第l个子包的大小,N为子包的数量。卸载应用时,第一电子设备所允许残留的最大数据量可以由用户自定义设置,也可以由第一电子设备默认设置,本实施例对此不作具体限定。
可以理解的是,当M不存在时,即当该应用的各子包均大于maxSize时,第一电子设备则可以老化该应用的所有子包。
请参阅图10,图10示出了本实施例提供的应用老化方法的应用场景示意图。该应用场景中可以包括手机1010、智能手表1020、平板电脑1030和云端1040。其中,手机1010分别通过通信网络与智能手表1020、平板电脑1030、云端1040通信连接。手机1010下载有通话应用,该通话应用可以包括的第一子包{R 1,R 2,R 3,R 4},以及与手机1010对应的第二子包{A 1,A 2,A 3}。
当手机1010确定该通话应用连续30天未被使用时,手机1010可以确定该通话应用满足预设老化条件,即确定需要对该通话应用进行老化,此时,手机1010可确定第一子包R 1对应的下载时间T R1,第一子包R 2对应的下载时间T R2,第一子包R 3对应的下载时间T R3,第一子包R 4对应的下载时间T R4,第二子包A 1对应的下载时间T A1,第二子包A 2对应的下载时间T A2以及第二子包A 3对应的下载时间T A3。假设手机1010确定智能手表1020和平板电脑1030均具有第一子包R 1、第一子包R 2和第一子包R 3,智能手 表1020具有第一子包R 4和第二子包A 1
对于第一子包R 1,手机1010可以获取从云端1040下载第一子包R 1的时间TC R1、从智能手表1020下载第一子包R 1的时间TI R1,以及从平板电脑1030下载第一子包R 1的时间TP R1,假设手机1010确定TC R1<TP R1<TI R1,则手机1010可以确定第一子包R 1对应的下载时间T R1=TC R1
对于第一子包R 4,手机1010可以获取从云端300下载第一子包R 4的时间TC R4和从智能手表1020下载第一子包R 4的时间TI R4,假设手机确定TI R4<TC R4,则手机1010可以确定第一子包R 4对应的下载时间T R4=TI R4
对于第二子包A 2,手机1010可以获取从云端300下载第二子包A 2的时间TC A2,并可以确定第二子包A 2对应的下载时间T A2=TC A2
假设手机1010确定T R1>T R3>T A1>T R2>T A3>T A2>T R4,且M=3时,手机1010可以仅老化第一子包R 2、第一子包R 4、第二子包A 2和第二子包A 3,以保留第一子包R 1、第一子包R 3和第二子包A 1
本实施例中,将应用的安装包拆分成多个子包,在第一电子设备需要老化应用时,第一电子设备可以确定再次下载该应用的各个子包的时间,并根据各个子包的下载时间对该应用的部分子包进行老化,保留该应用的部分子包,使得在下一次需要使用该应用时,第一电子设备仅需要下载该应用的部分子包,而不需要下载该应用的整个安装包,可以减少应用的下载时间,提高应用再次启动的速度,提升用户体验。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
对应于上文实施例一所述的应用下载安装方法,本申请实施例还提供了一种应用下载安装装置,该应用下载安装装置的各个模块可以对应实现实施例一中的应用下载安装方法的各个步骤。
对应于上文实施例二所述的应用老化方法,本申请实施例还提供了一种应用老化装置,该应用老化装置的各个模块可以对应实现实施例二中的应用老化方法的各个步骤。
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
本申请实施例还提供了一种电子设备,所述电子设备包括至少一个存储器、至少一个处理器以及存储在所述至少一个存储器中并可在所述至少一个处理器上运行的计算机程序,所述处理器执行所述计算机程序时,使所述电子设备实现上述任意各个方法实施例中的步骤。示例性的,所述电子设备的结构可以如图1所示。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被计算机执行时,使所述计算机实现上述任意各个方法实施例中的步骤。
本申请实施例提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备实现上述任意各个方法实施例中的步骤。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计 算机可读存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质至少可以包括:能够将计算机程序代码携带到装置/电子设备的任何实体或装置、记录介质、计算机存储器、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读存储介质不可以是电载波信号和电信信号。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置/电子设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/电子设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (18)

  1. 一种应用下载安装方法,其特征在于,应用于第一电子设备,所述方法包括:
    所述第一电子设备检测到下载第一应用的触发事件,所述第一应用至少包括第一部分和第二部分,所述第一部分包括第一子包,所述第二部分包括第二子包;
    所述第一电子设备从第二设备获取所述第一子包,并从第三设备获取所述第二子包;所述第二设备与所述第三设备不同;
    所述第一电子设备根据所述第一部分和所述第二部分,安装所述第一应用。
  2. 根据权利要求1所述的方法,其特征在于,所述第二设备为用户的第二电子设备,所述第三设备为用户的第三电子设备或服务器。
  3. 根据权利要求2所述的方法,其特征在于,所述第一电子设备获取的第一子包是所述第二电子设备中存储的,或者,所述第一电子设备获取的第一子包是所述第二电子设备获取的。
  4. 根据权利要求2或3所述的方法,其特征在于,当所述第三设备为用户的第三电子设备时,所述第一电子设备获取的第二子包是所述第三电子设备中存储的,或者,所述第一电子设备获取的第二子包是所述第三电子设备获取的。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一部分还包括第三子包,所述方法还包括:
    所述第一电子设备从第四设备获取所述第三子包,所述第四设备为用户的第四电子设备或服务器。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述第二部分还包括第四子包,所述方法还包括:
    所述第一电子设备从第五设备获取所述第四子包。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一部分是所述第一应用的基础部分;所述第二部分为特性部分,所述第二部分与所述第一电子设备的属性相关;或者,所述第一部分是特性部分,第二部分是基础部分。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,在所述第一电子设备从第二设备获取所述第一子包,并从第三设备获取所述第二子包之前,所述方法还包括:
    所述第一电子设备确定下载所述第一子包的第一下载时间,以及下载所述第二子包的第二下载时间;
    所述第一电子设备根据所述第一下载时间和所述第二下载时间确定下载策略,所述下载策略包括:所述第一电子设备从第二设备获取所述第一子包,并从第三设备获取所述第二子包。
  9. 根据权利要求8所述的方法,其特征在于,所述第一电子设备确定下载所述第一子包的第一下载时间,包括:
    所述第一电子设备获取所述第一子包的大小和所述第一子包对应的第一速度,所述第一子包对应的第一速度包括所述第一电子设备从存储有所述第一子包的第六设备下载所述第一子包的速度,或者包括第七设备下载所述第一子包的速度和所述第七设备将所述第一子包传输给所述第一电子设备的速度;
    所述第一电子设备根据所述第一子包的大小和所述第一速度确定下载所述第一子包的第一下载时间。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,在所述第一电子设备根据所述第一部分和所述第二部分,安装所述第一应用之后,所述方法还包括:
    所述第一电子设备确定下载所述第一子包的第三下载时间和下载所述第二子包的第四下载时间;
    所述第一电子设备根据所述第三下载时间和所述第四下载时间确定待老化的目标子包,并对所述目标子包进行老化,所述目标子包为所述第一子包,或者所述目标子包为所述第二子包,所述对所述目标子包 进行老化包括删除所述目标子包或者卸载所述目标子包。
  11. 根据权利要求10所述的方法,其特征在于,当所述目标子包为所述第一子包时,所述第一电子设备对所述目标子包进行老化,包括:
    所述第一电子设备对所述第一子包进行老化,并保留所述第二子包;
    当所述目标子包为所述第二子包时,所述第一电子设备对所述目标子包进行老化,包括:
    所述第一电子设备对所述第二子包进行老化,并保留所述第一子包。
  12. 一种应用老化方法,其特征在于,应用于第一电子设备,所述方法包括:
    所述第一电子设备确定第一应用,所述第一应用包括第一子包和第二子包;
    所述第一电子设备对所述第一子包和所述第二子包进行不同的处理,所述第一电子设备对所述第一子包和所述第二子包进行不同的处理包括:所述第一电子设备对所述第一子包进行老化,并保留所述第二子包;或者,所述第一电子设备在第一时间对所述第一子包进行老化,并在第二时间对所述第二子包进行老化;所述第一电子设备对所述第一子包进行老化包括所述第一电子设备删除所述第一子包或者卸载所述第一子包。
  13. 根据权利要求12所述的方法,其特征在于,所述第一电子设备对所述第一子包和所述第二子包进行不同的处理,包括:
    所述第一电子设备获取所述第一子包的第一下载时间,以及获取所述第二子包的第二下载时间;
    所述第一电子设备根据所述第一下载时间和所述第二下载时间确定待老化的目标子包,并对所述目标子包进行老化,所述目标子包为所述第一子包,或者所述目标子包为所述第二子包。
  14. 根据权利要求13所述的方法,其特征在于,当所述目标子包为所述第一子包时,所述第一电子设备对所述目标子包进行老化,包括:
    所述第一电子设备对所述第一子包进行老化,并保留所述第二子包;
    当所述目标子包为所述第二子包时,所述第一电子设备对所述目标子包进行老化,包括:
    所述第一电子设备对所述第二子包进行老化,并保留所述第一子包。
  15. 根据权利要求13或14所述的方法,其特征在于,所述第一电子设备获取第一子包的第一下载时间,包括:
    所述第一电子设备获取所述第一子包的大小和所述第一子包对应的第一速度,所述第一子包对应的第一速度包括所述第一电子设备从存储有所述第一子包的第二设备下载所述第一子包的速度,或者包括第三设备下载所述第一子包的速度和所述第三设备将所述第一子包传输给所述第一电子设备的速度;
    所述第一电子设备根据所述第一子包的大小和所述第一速度确定所述第一子包的第一下载时间。
  16. 根据权利要求12至15中任一项所述的方法,其特征在于,所述第一电子设备确定第一应用包括:
    所述第一电子设备获取第二应用的第一时长,所述第一时长为所述第二应用未被使用的连续时长,所述第二应用为所述第一电子设备中的任一应用;
    当所述第一时长大于或等于预设时长阈值时,所述第一电子设备确定所述第二应用为所述第一应用。
  17. 一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时,使所述电子设备实现如权利要求1至11中任一项所述的应用下载安装方法,或实现如权利要求12至16中任一项所述的应用老化方法。
  18. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被计算机执行时,使所述计算机实现如权利要求1至11中任一项所述的应用下载安装方法,或实现如权利要求12至16中任一项所述的应用老化方法。
PCT/CN2022/114539 2021-10-30 2022-08-24 应用下载安装方法、应用老化方法及电子设备 WO2023071472A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111280483.1A CN116074305A (zh) 2021-10-30 2021-10-30 应用下载安装方法、应用老化方法及电子设备
CN202111280483.1 2021-10-30

Publications (1)

Publication Number Publication Date
WO2023071472A1 true WO2023071472A1 (zh) 2023-05-04

Family

ID=86160138

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/114539 WO2023071472A1 (zh) 2021-10-30 2022-08-24 应用下载安装方法、应用老化方法及电子设备

Country Status (2)

Country Link
CN (1) CN116074305A (zh)
WO (1) WO2023071472A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1305154A (zh) * 1999-11-17 2001-07-25 国际商业机器公司 透明的基于时间的选择软件再生的方法和系统
US20060271926A1 (en) * 2005-05-31 2006-11-30 Microsoft Corporation Split download for electronic software downloads
CN101038564A (zh) * 2006-11-21 2007-09-19 西安交通大学 应用服务器分级再生方法
CN102750162A (zh) * 2011-04-21 2012-10-24 株式会社吉恩网络 将已安装在旧移动终端上的应用安装到新移动终端的方法
CN107608722A (zh) * 2017-09-19 2018-01-19 北京安博通科技股份有限公司 应用程序下载方法及装置
CN110166543A (zh) * 2019-05-16 2019-08-23 腾讯科技(深圳)有限公司 应用程序处理方法、装置和计算机设备
CN110780887A (zh) * 2019-09-23 2020-02-11 连尚(新昌)网络科技有限公司 一种提供应用安装包的方法与设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1305154A (zh) * 1999-11-17 2001-07-25 国际商业机器公司 透明的基于时间的选择软件再生的方法和系统
US20060271926A1 (en) * 2005-05-31 2006-11-30 Microsoft Corporation Split download for electronic software downloads
CN101038564A (zh) * 2006-11-21 2007-09-19 西安交通大学 应用服务器分级再生方法
CN102750162A (zh) * 2011-04-21 2012-10-24 株式会社吉恩网络 将已安装在旧移动终端上的应用安装到新移动终端的方法
CN107608722A (zh) * 2017-09-19 2018-01-19 北京安博通科技股份有限公司 应用程序下载方法及装置
CN110166543A (zh) * 2019-05-16 2019-08-23 腾讯科技(深圳)有限公司 应用程序处理方法、装置和计算机设备
CN110780887A (zh) * 2019-09-23 2020-02-11 连尚(新昌)网络科技有限公司 一种提供应用安装包的方法与设备

Also Published As

Publication number Publication date
CN116074305A (zh) 2023-05-05

Similar Documents

Publication Publication Date Title
WO2020103764A1 (zh) 一种语音控制方法及电子设备
WO2021159746A1 (zh) 文件共享方法、系统及相关设备
CN111316199B (zh) 一种信息处理方法及电子设备
WO2021043046A1 (zh) 一种资源管控方法及设备
WO2021258814A1 (zh) 视频合成方法、装置、电子设备及存储介质
WO2022033320A1 (zh) 蓝牙通信方法、终端设备及计算机可读存储介质
CN110636554B (zh) 数据传输方法及装置
WO2022017474A1 (zh) 任务处理方法及相关装置
WO2021218429A1 (zh) 应用窗口的管理方法、终端设备及计算机可读存储介质
WO2022042637A1 (zh) 一种蓝牙数据传输方法及相关装置
WO2023056795A1 (zh) 快速拍照方法、电子设备及计算机可读存储介质
CN113805797A (zh) 网络资源的处理方法、电子设备及计算机可读存储介质
WO2022228180A1 (zh) 一种应用的管理方法和电子设备
CN113438366A (zh) 信息通知的交互方法、电子设备和存储介质
WO2022242412A1 (zh) 杀应用的方法及相关设备
WO2022206764A1 (zh) 一种显示方法、电子设备和系统
CN113590346B (zh) 处理业务请求的方法和电子设备
WO2022062902A1 (zh) 一种文件传输方法和电子设备
WO2022033355A1 (zh) 一种邮件处理方法及电子设备
CN114828098B (zh) 数据传输方法和电子设备
WO2023071472A1 (zh) 应用下载安装方法、应用老化方法及电子设备
CN114398108A (zh) 电子设备及其驱动加载方法、介质
CN114003241A (zh) 应用程序的界面适配显示方法、系统、电子设备和介质
WO2024078315A1 (zh) 一种应用控制方法、电子设备和系统
WO2024093703A1 (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: 22885371

Country of ref document: EP

Kind code of ref document: A1