CN117440365B - Method for downloading resource package and electronic equipment - Google Patents

Method for downloading resource package and electronic equipment Download PDF

Info

Publication number
CN117440365B
CN117440365B CN202311731844.9A CN202311731844A CN117440365B CN 117440365 B CN117440365 B CN 117440365B CN 202311731844 A CN202311731844 A CN 202311731844A CN 117440365 B CN117440365 B CN 117440365B
Authority
CN
China
Prior art keywords
electronic device
resource
download
downloading
package
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202311731844.9A
Other languages
Chinese (zh)
Other versions
CN117440365A (en
Inventor
李前国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311731844.9A priority Critical patent/CN117440365B/en
Publication of CN117440365A publication Critical patent/CN117440365A/en
Application granted granted Critical
Publication of CN117440365B publication Critical patent/CN117440365B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • H04W8/245Transfer of terminal data from a network towards a terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application relates to the technical field of terminals, in particular to a method for downloading a resource package and electronic equipment, which can shorten the waiting time of downloading the resource package by a user. The method is applied to a first electronic device, and comprises the following steps: the first electronic equipment is connected with M second electronic equipment, wherein M is an integer greater than or equal to 1; the method comprises the steps that first electronic equipment obtains the downloading success rate of each first resource package in N first resource packages to be downloaded, wherein N is an integer greater than 1; the download success rate is the success rate of the first electronic device for downloading the first resource package predicted by the first electronic device; the N first resource packages to be downloaded comprise: n second resource packets with higher downloading success rate and N-N third resource packets with lower downloading success rate; the first electronic device downloads n second resource packages; the first electronic device instructs M second electronic devices to download N-N third resource packages; or the first electronic device downloads the N-N third resource packages from the M second electronic devices.

Description

Method for downloading resource package and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a method for downloading a resource package and electronic equipment.
Background
The electronic device may obtain a resource package from a server to upgrade a version of an Application (APP) in the electronic device or install the APP in the electronic device. The resource package may be a software installation package of the APP or a software upgrade package of the APP. For example, the electronic device displays an application installation interface of the application store APP, and in response to the user clicking an installation button of the target APP, the electronic device may send a request one to a server located on the cloud side, the request one being for requesting a software installation package for acquiring the target APP. In response to receiving the request one, the server located on the cloud side may send the mobile phone a download address of the software installation package of the target APP. The download address corresponds to a content delivery network server (Content Delivery Network, CDN). After receiving the download address sent by the cloud side server, the electronic device can download the software installation package of the target APP from the corresponding CDN server through the download address.
It was found that the time period for the electronic device to download the software installation package or the software upgrade package is 70% or more of the time period for the electronic device to install the application or the electronic device upgrade application, because the data amount of the software installation package or the software upgrade package is too large. The resource package downloading time is longer, so that the waiting time of the user is longer, and the use experience of the user is reduced.
Disclosure of Invention
The embodiment of the application provides a method for downloading a resource package and electronic equipment, which can shorten the waiting time of a user for downloading the resource package and improve the satisfaction degree of the user.
In order to achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
in a first aspect, a method for downloading a resource package is provided and is applied to a first electronic device. The method comprises the following steps: the first electronic equipment is connected with M second electronic equipment, wherein M is an integer greater than or equal to 1; the method comprises the steps that first electronic equipment obtains the downloading success rate of each first resource package in N first resource packages to be downloaded, wherein N is an integer greater than 1; the download success rate is the success rate of the first electronic device for downloading the first resource package predicted by the first electronic device; the N first resource packages to be downloaded include: n second resource packets with the download success rate greater than or equal to the first threshold value, and N-N third resource packets with the download success rate less than the first threshold value except for the N second resource packets; the first electronic device downloads n second resource packages; the first electronic device instructs M second electronic devices to download N-N third resource packages; or the first electronic device downloads the N-N third resource packages from the M second electronic devices.
The method for downloading the resource package is applied to the first electronic device, and the first electronic device can be connected with M second electronic devices. After the first electronic device and the M second electronic devices are connected, a high-speed transmission channel is established between the first electronic device and the M second electronic devices. For N first resource packages to be downloaded, the first electronic equipment predicts the downloading success rate of each first resource package when the first electronic equipment downloads the N first resource packages. And then, the first electronic equipment downloads a second resource packet with high download success rate from the N first resource packets, and the M second electronic equipment cooperatively downloads a third resource packet with low download success rate from the N first resource packets. Or the first electronic device downloads a second resource package with high download success rate from the N first resource packages, and the first electronic device and the M second electronic devices cooperatively download a third resource package with low download success rate from the N first resource packages.
In the embodiment of the application, the first electronic device can reasonably allocate the downloading task according to the downloading success rate of the first resource package, and fully utilize the downloading capability of the electronic device (including the first electronic device and the second electronic device). And the first electronic equipment downloads the second resource packet with high success rate, so that the downloading time of the second resource packet is shortened. The first electronic equipment cooperates with M second electronic equipment to download the third resource package in parallel, so that the downloading time of the second resource package is shortened. And further, the waiting time for downloading N first resource packages by the user is shortened, so that the satisfaction degree of the user is improved.
In another possible implementation manner of the first aspect, M < N-N, and the M second electronic devices download N-N third resource packages. Specific: the first electronic device instructs the M second electronic devices to download M third resource packages in the N-N third resource packages; wherein each of the M second electronic devices downloads one of the M third resource packages. And then, the first electronic device instructs the third electronic device to download one of the N-N-M third resource packages except the M third resource packages until the downloading of the N-N-M third resource packages is completed. The third electronic device is a second electronic device which is the first to finish the downloading task indicated by the first electronic device in the M second electronic devices.
In another possible implementation manner of the first aspect, m+.n—n, the first electronic device may instruct M second electronic devices to download N-N third resource packages. Specifically, the first electronic device instructs N-N second electronic devices among the M second electronic devices to download N-N third resource packages; and each of the N-N second electronic devices downloads one of the N-N third resource packages.
In another possible implementation manner of the first aspect, M < N-N, and the first electronic device downloads N-N third resource packages from the M second electronic devices. Specific: the first electronic device instructs the M second electronic devices to download M third resource packages in the N-N third resource packages; wherein each of the M second electronic devices downloads one of the M third resource packages. And then, the first electronic device instructs the third electronic device to download one of the N-N-M third resource packages except the M third resource packages until the downloading of the N-N-M third resource packages is completed. The third electronic device is the first electronic device to complete the downloading task indicated by the first electronic device in the M second electronic devices and the first electronic device.
In another possible implementation manner of the first aspect, the first electronic device downloads the n second resource packages sequentially in order of time consuming downloading of the n second resource packages from small to large.
In another possible implementation manner of the first aspect, the first electronic device instructs the M second electronic devices to download the first M third resource packages in order of from small to large when the N-N third resource packages are downloaded.
In another possible implementation manner of the first aspect, the first electronic device instructs the third electronic device to sequentially download the N-M third resource packages in order of from small to large when the downloading of the N-M third resource packages is time-consuming, until the downloading of the N-M third resource packages is completed.
In another possible implementation manner of the first aspect, the type of the first resource packet is at least one of an installation packet, a differential packet, a small installation packet of the APP stored in the packet, and a small differential packet of the APP stored in the packet.
In another possible implementation manner of the first aspect, the first electronic device obtains a download success rate of the first resource package according to an expected download duration of the first resource package. Specifically, the first electronic device obtains an estimated download duration of each first resource package in the N first resource packages to be downloaded; the first electronic equipment obtains the shown downloading success rate of each first resource package according to the expected downloading duration and the fuzzy prediction model; the fuzzy prediction model has the capability of outputting the downloading success rate of the first resource packet according to the predicted downloading time length of the first resource packet.
In another possible implementation manner of the first aspect, the first electronic device blurs the expected download duration based on the first mapping relationship to obtain a blurry expected download duration, where the blurry expected download duration is a first blur matrix; multiplying the first fuzzy matrix by the fuzzy relation matrix by the first electronic equipment to obtain a second fuzzy matrix; the fuzzy relation matrix indicates a fuzzy relation between the expected downloading time length and the downloading success rate; and the first electronic equipment deblurs the second fuzzy matrix to obtain the downloading success rate.
In a second aspect, an electronic device is provided. An electronic device includes: a memory, a wireless communication module, and one or more processors. The wireless communication module receives and transmits data according to the control of the processor so as to realize communication between the electronic equipment and other electronic equipment. The memory is coupled to the processor. Wherein the memory is for storing computer program code, the computer program code comprising computer instructions. The computer instructions, when executed by a processor, cause an electronic device to perform the method according to the first aspect.
In a third aspect, the present application provides a chip system that may be applied to an electronic device including a memory. The system-on-chip includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a wire. The interface circuit is configured to receive signals from the memory and to send the signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device performs the method as in the first aspect and any one of its possible designs.
In a fourth aspect, the present application provides a computer-readable storage medium comprising computer instructions. When executed on an electronic device, the computer instructions cause the electronic device to perform a method as in the first aspect and any one of its possible designs.
In a fifth aspect, the present application provides a computer program product for, when run on a computer, causing the computer to perform the method as in the first aspect and any one of its possible designs.
It will be appreciated that the benefits achieved by the electronic device according to the second aspect to the computer program product according to the fifth aspect may be referred to as benefits in any of the possible designs of the first aspect and any of them, and will not be described here again.
Drawings
FIG. 1 is a schematic diagram of a resource package downloading system according to the related art;
FIG. 2 is a schematic diagram of a resource package downloading system according to the related art;
fig. 3 is a flow chart of a method for downloading a resource package according to the related art;
fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic diagram of a software and hardware architecture of an electronic device according to an embodiment of the present application;
fig. 6 is a flowchart of a method for downloading a resource package according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating another method for downloading a resource package according to an embodiment of the present disclosure;
FIG. 8 is a flowchart illustrating another method for downloading a resource package according to an embodiment of the present disclosure;
Fig. 9 is a schematic flow chart of collaborative downloading of a mobile phone, a personal computer and a tablet computer according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a fuzzy prediction model according to an embodiment of the present disclosure;
fig. 11 is a schematic diagram of membership provided in an embodiment of the present application.
Detailed Description
The electronic device may obtain an update package or an installation package from a server to upgrade or install an Application (APP). The APP in the electronic equipment can comprise a system APP carried by the electronic equipment and a third party APP downloaded to the electronic equipment by a user, and the system APP can comprise a contact APP, a setting APP and the like; the third party APP may include: social APP, banking APP, video APP, etc.
Illustratively, the installation package is in a format such as An Zhuo application package (AAB). AAB is a new APP installation package format, and an installation package in AAB format is composed of a base package (base. Apk), a configuration package, and a function package. Wherein the foundation bag is used for providing basic functions. The configuration package generates corresponding different APK files for different CPU architectures, different languages and different display screen resolutions. The user may download and install the corresponding configuration package. The feature pack is an option. The APP to which the installation package in AAB format corresponds is typically a game or a large APP.
The process of updating the APP by the mobile phone is described below by taking an AAB installation package as an example. Fig. 1 is a schematic diagram of a related art resource package downloading system. The update package download system may include a server on the cloud side, an electronic device (e.g., a cell phone), and a content delivery network server (Content Delivery Network, CDN). The cloud-side server may be connected to a plurality of CDN servers. The CDN servers can be servers deployed on a plurality of nodes of the Internet, and the servers on the cloud side automatically select the node of the CDN server closest to the user as a downloading node according to the geographic position and the network condition of the user when the user accesses the website, so that rapid content distribution and access acceleration are realized.
As shown in fig. 1, the mobile phone may receive a first operation of a user, where the first operation is used to trigger the mobile phone to send a query request to the server. For example, the first operation may be, for example, the user clicking on the update button of APP1 at the application marketplace APP. As shown in fig. 1, the mobile phone displays a first interface, which may be an application update interface of the application marketplace APP. The first interface displays icons of a plurality of APPs, and names of APPs. Illustratively, after the developer uploads the latest installation package of the APP to the server, the server may push a notification message to the handset, the notification message including the APP name. The handset generates an update hint in response to receiving the notification message, the update hint being displayable in the first interface. In other embodiments, the main interface (also referred to as desktop) of the mobile phone may include icons of a plurality of APPs, the server may notify the mobile phone when a version of an APP is updated, and the mobile phone may display an update flag on the icon of the corresponding APP. For example, the mobile phone system may display an update flag on an icon of the setup application when there is an update. The handset may request an update to the system in response to a user's related operation to the setup application.
It should be appreciated that the handset may also automatically send a query request to the server. For example, when the user sets the mobile phone to automatically update the APP after connecting with the Wi-Fi, the mobile phone may automatically send a query request to the server after connecting with the Wi-Fi. Or when the user sets the mobile phone to automatically update the APP at the fixed time, the mobile phone can automatically send a query request to the server at the fixed time.
As shown in fig. 2, the server on the cloud side may include a resource service module and a distribution service module, and the server on the cloud side may be connected to a database or deployed with a database. In fig. 2, typically, after the developer uploads the latest installation package of the APP to the resource service module in the server, the operator can review the latest installation package of the APP uploaded by the developer. After the audit is passed, a differential service module in the server may generate differential packets. The server may store information of the differential packets and the full packets in a database, and the information may include version information, name information, download address, and the like of the differential packets and the installation packets. The server may store the differential packets and the full packets on CDN servers deployed in the respective internet nodes.
As shown in fig. 2, in response to a first operation of a user, a receiving module in the mobile phone receives the first operation of the user, where the first operation is used to trigger the mobile phone to send a query request to a server. The query request is used for requesting installation package information of the AAB installation package, and the installation package information comprises: the storage addresses of the base, configuration, and function packages, and the latest versions of the base, configuration, and function packages. The query module in the mobile phone sends a query request to the server. In response to receiving the query request, the distribution service module in the server may obtain the installation package information of the AAB installation package requested by the query request, and send the installation package information to the mobile phone. The computing module in the mobile phone can identify the resource package to be downloaded based on the latest version of the basic package, the configuration package and the function package and the existing version of the basic package, the configuration package and the function package in the mobile phone. For example, the existing version of the configuration package in the handset is already the latest version, and the handset does not need to download the configuration package. The download module in the mobile phone can send a download request to the CND server corresponding to the download address. And responding to the received downloading request, and sending the latest version of basic package and the latest version of functional package to the mobile phone by the CND server. The synthesis module in the mobile phone can combine the latest version of basic package, the existing configuration package and the latest version of functional package into an AAB application package of a to-be-installed version, and then the installation updating module can install the AAB application package to complete the updating of the APP.
Optionally, when the mobile phone is used for installing the application, a complete full-quantity installation package can be obtained from the server. When the mobile phone updates the application, the mobile phone can acquire the full-quantity installation package of the latest edition from the server, and update the application by using the full-quantity installation package. Alternatively, the handset may obtain an incremental package from the server, and update the application using the incremental package. The increment package comprises difference data between a current installation package and a latest installation package in the mobile phone. That is, the mobile phone may obtain a resource packet from the server, where the resource packet may be a full-size installation packet, an incremental packet, also called a differential packet, or a partial data packet in the full-size installation packet, such as any data packet in the basic packet, the configuration packet, and the function packet in the AAB application packet.
In short, the flow of the mobile phone when installing an application or updating an application can be shown in fig. 3.
S301, the mobile phone sends a query request to the server.
The query request is used for requesting to acquire a storage address of a resource package to be downloaded.
S302, responding to the query request, and returning the download address of the resource package to the mobile phone by the server.
S303, responding to the received download address of the resource packet, and sending a download request to the CDN server corresponding to the download address by the mobile phone. The download request is for requesting to download a resource package of the first APP stored in the CDN server.
S304, the CDN server sends a resource packet of the first APP to the mobile phone.
S305, in response to receiving the resource package of the first APP, the mobile phone installs or updates the first APP by using the resource package.
In general, the resource packages are large, especially the resource packages of game APP and the resource packages of large applications, and the resource package downloading takes 70% of the time for the whole application to be installed or updated. The time consumption of the user is very long, the user experience is reduced, the user can interrupt the current downloading task with high probability, for example, the user can scratch the current downloading interface, and the success rate of downloading the resource package is low and the user experience is poor. Especially when the mobile phone needs to download a plurality of resource packages, the waiting time of the user is longer. The investigation shows that the resource package is downloaded in [0,20] seconds, and the success rate of the resource package downloading is 95%. And the resource package is downloaded in [20,30] seconds, so that the success rate of the resource package downloading is 85%. The resource package is downloaded in [30,60] seconds, and the success rate of the resource package download is 50%. The resource package is downloaded in 60,90 seconds, and the success rate of the resource package is 35%.
In order to shorten the downloading time of the resource package and improve the user experience, the embodiment of the application provides a method for downloading the resource package, which is applied to first electronic equipment. The first electronic device may establish a connection with M second electronic devices. After the first electronic device and the M second electronic devices are connected, a high-speed transmission channel is established between the first electronic device and the M second electronic devices.
For N first resource packages to be downloaded, the first electronic equipment predicts the downloading success rate of each first resource package when the first electronic equipment downloads the N first resource packages. And then, the first electronic equipment downloads a second resource packet with high download success rate from the N first resource packets, and the M second electronic equipment cooperatively downloads a third resource packet with low download success rate from the N first resource packets. Or the first electronic device downloads a second resource package with high download success rate from the N first resource packages, and the first electronic device and the M second electronic devices cooperatively download a third resource package with low download success rate from the N first resource packages.
Therefore, in the embodiment of the application, the first electronic device can reasonably allocate the downloading task according to the downloading success rate of the first resource package, and fully utilize the downloading capability of the electronic device (including the first electronic device and the second electronic device). And the first electronic equipment downloads the second resource packet with high success rate, so that the downloading time of the second resource packet is shortened. And the third resource package is downloaded in parallel by cooperating with M second electronic devices, so that the downloading time of the second resource package is shortened. And further, the waiting time for downloading N first resource packages by the user is shortened, so that the satisfaction degree of the user is improved.
The method provided by the embodiment of the application can be applied to the first electronic equipment with the data processing capability. The first electronic device and the second electronic device may include a server, a mobile phone, a tablet computer, a notebook computer, a personal computer (personal computer, PC), an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a handheld computer, a netbook, an intelligent home device (e.g., an intelligent television, an intelligent screen, a large screen, an intelligent speaker, an intelligent air conditioner, etc.), a personal digital assistant (personal digital assistant, a PDA), a wearable device (e.g., an intelligent watch, an intelligent bracelet, etc.), a vehicle-mounted device, a virtual reality device, etc., to which the embodiments of the present application do not make any limitation. In the embodiment of the application, the first electronic device and the second electronic device are electronic devices capable of running an operating system and installing application programs. Optionally, the operating systems operated by the first electronic device and the second electronic device may be An Zhuo systems, windows cube systems, iOS cube systems, and the like.
For example, please refer to fig. 4, which illustrates a schematic structure of an electronic device 400. The electronic device 400 may include a processor 410, an external memory interface 420, an internal memory 421, an audio module 430, a speaker 430A, a microphone 430B, a display 440, a wireless communication module 450, a power module 460, an input device 470, a sensor module 480, an antenna 1, an antenna 2, and so forth. The sensor module 480 may include, among other things, a pressure sensor, a touch sensor, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 400. In other embodiments of the present application, electronic device 400 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 410 may include one or more processing units. For example: the processor 410 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate components or may be integrated in one or more processors. In some embodiments, electronic device 400 may also include one or more processors 410.
Wherein the controller is the neural and command center of the electronic device 400. The operation control signal can be generated according to the instruction operation code and the time sequence signal to finish the control of instruction fetching and instruction execution.
An operating system of the electronic device 400 may be run on the application processor for managing hardware and software resources of the electronic device 400. Such as managing and configuring memory, prioritizing system resources, controlling input and output devices, operating networks, managing file systems, managing drivers, etc. The operating system may also be used to provide an operating page for a user to interact with the system. Various types of software, such as drivers, applications (apps), etc., may be installed in the operating system.
A memory may also be provided in the processor 410 for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. The memory may hold instructions or data that the processor 410 has just used or recycled. If the processor 410 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided, reducing the latency of the processor 410 and thus improving the efficiency of the system.
In some embodiments, processor 410 may include one or more interfaces. The interfaces may include inter-integrated circuit (inter-integrated circuit, I2C) interfaces, inter-integrated circuit audio (integrated circuit sound, I2S) interfaces, pulse code modulation (pulse code modulation, PCM) interfaces, universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interfaces, mobile industry processor interfaces (mobile industry processor interface, MIPI), general-purpose input/output (GPIO) interfaces, SIM card interfaces, and/or USB interfaces, among others.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the electronic device 400. In other embodiments of the present application, the electronic device 400 may also use different interfacing manners, or a combination of multiple interfacing manners, as in the above embodiments.
The external memory interface 420 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 400. The external memory card communicates with the processor 410 through an external memory interface 420 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 421 may be used to store one or more computer programs, including instructions. The processor 410 may cause the electronic device 400 to execute the application running methods provided in some embodiments of the present application, as well as various applications, data management, and the like, by executing the above-described instructions stored in the internal memory 421. The internal memory 421 may include a code storage area and a data storage area. Wherein the data storage area may store data created during use of the electronic device 400, etc. In addition, the internal memory 421 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage units, flash memory units, universal flash memory (universal flash storage, UFS), and the like. In some embodiments, the processor 410 may cause the electronic device 400 to perform the application running methods provided in the embodiments of the present application, as well as other applications and data management, by executing instructions stored in the internal memory 421, and/or instructions stored in a memory provided in the processor 410.
Electronic device 400 may implement audio functionality through audio module 430, speaker 430A, microphone 430B, and an application processor, among others. Such as music playing, recording, etc. The audio module 430 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 430 may also be used to encode and decode audio signals. In some embodiments, the audio module 430 may be disposed in the processor 410, or some functional modules of the audio module 430 may be disposed in the processor 410.
Speaker 430A, also referred to as a "horn," is used to convert audio electrical signals into sound signals.
Microphone 430B, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. The user may sound near microphone 430B through the mouth, inputting a sound signal to microphone 430B.
The communication function of the electronic device 400 can be realized by the antenna 1, the antenna 2, the wireless communication module 450, and the like.
The wireless communication module 450 may provide a solution for wireless communication including cellular, wi-Fi, bluetooth (BT), wireless data transfer modules (e.g., 433mhz,868mhz,915 mhz), etc., as applied to the electronic device 400. The wireless communication module 450 may be one or more devices that integrate at least one communication processing module. The wireless communication module 450 receives electromagnetic waves via the antenna 1 or the antenna 2, filters and frequency-modulates the electromagnetic wave signals, and transmits the processed signals to the processor 410. The wireless communication module 450 may also receive a signal to be transmitted from the processor 410, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 1 or the antenna 2. In this embodiment, the wireless communication module 450 may establish one or more of Wi-Fi, bluetooth, NFC, wi-Fi point-to-point P2P connections with the wireless communication module of the second electronic device. The wireless communication module 450 may also send signals to the electronic device that has established the connection.
The electronic device 400 implements display functions through a GPU, a display screen 440, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 440 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 410 may include one or more GPUs that execute program instructions to generate or change display information.
The display 440 is used to display images, videos, and the like. The display 440 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a Miniled, a micr OLED, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, electronic device 400 may include 1 or N displays 440, N being a positive integer greater than 1. In the embodiment of the application, the display screen 440 may be used to display a UI and receive an operation of the UI by a user. For example, in the embodiment of the present application, the display screen 440 may display an interface of the APP, and after detecting the operation of the user on the interface of the APP, the sensor in the display screen may trigger the method flow for downloading the resource package provided in the embodiment of the present application.
In some embodiments, a pressure sensor, touch sensor, etc. is provided on the display screen 440. The pressure sensor is used for sensing a pressure signal and can convert the pressure signal into an electric signal. When a touch operation is applied to the display 440, the electronic device 400 detects the intensity of the touch operation according to the pressure sensor. The electronic device 400 may also calculate the location of the touch based on the detection signal of the pressure sensor. A touch sensor, also referred to as a "touch panel," may form a touch screen, also referred to as a "touch screen," with the display screen 440. The touch sensor is used to detect a touch operation acting on or near it. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may also be provided through the display 440.
The power module 460 may be used to power various components included in the electronic device 400. In some embodiments, the power module 460 may be a battery, such as a rechargeable battery.
Input device 470 may include a keyboard, mouse, etc. The keyboard is used to input english alphabets, numerals, punctuation marks, etc. into the electronic device 400, thereby giving commands, inputting data, etc. to the electronic device 400. The mouse is a pointer for the electronic device 400 to display the system aspect coordinate positioning, and is used for inputting instructions and the like to the electronic device 400. The input device 470 may be connected to the electronic apparatus 400 through a wired connection, for example, the input device 470 is connected to the electronic apparatus 400 through a GPIO interface, a USB interface, or the like. The input device 470 may also be connected to the electronic apparatus 400 by wireless means, for example, the input device 470 may be connected to the electronic apparatus 400 by bluetooth, infrared, etc.
Taking the electronic device 400 as an example, a mobile phone is used. The software system of the electronic device 400 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the invention, taking an Android system with a layered architecture as an example, a software structure of the electronic device 400 is illustrated.
Fig. 5 is a block diagram of the hardware and software architecture of an electronic device 400 according to an embodiment of the invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into five layers, namely an application program layer, an application program framework layer, an Zhuoyun rows (Android run time) (not shown in the figure), a system library (not shown in the figure), a hardware abstraction layer (not shown in the figure), a kernel layer and hardware from top to bottom.
The application layer may include a series of application packages.
The application package may include applications for cameras, gallery, calendar, talk, map, navigation, WLAN, bluetooth, music, video, short messages, desktop launcher, etc. As shown in FIG. 5, in an embodiment of the present application, the application layer may include an application marketplace.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 5, the application framework layer may include an input system, a query module, a download module, a composition module, an incremental calculation module, an install update module, and an allocation module.
The input system is used for monitoring an input module (such as a touch screen driver) of the electronic device 400, converting parameters input by the input module into usable events, and transmitting the usable events to an upper related module. For example, the input system is configured to monitor a touch screen of the electronic device 400 through a touch screen driver, and convert touch parameters generated by a touch operation input by the touch screen into usable events, and transmit the usable events to an APP at an upper layer. The details of the query module, the download module, the synthesis module, the increment calculation module and the installation update module are described in the foregoing, and are not repeated here. The distribution module is used for distributing the plurality of first resource packages according to the downloading success rate of the plurality of first resource packages.
The kernel layer is a layer between hardware and software. The kernel layer may contain touch screen drivers, display drivers, audio drivers, sensor drivers, etc.
The hardware comprises a touch screen and a wireless communication module.
The following describes a method for downloading a resource package and an electronic device according to an embodiment of the present application with reference to the accompanying drawings. Fig. 6 is a flowchart of a method for downloading a resource package according to an embodiment of the present application.
S601, the first electronic device establishes connection with M second electronic devices.
Wherein M is an integer of 1 or more. I.e. the first electronic device establishes a connection with at least one second electronic device.
The connection may be a short-range communication connection. The connection may be a wired connection or a wireless connection. For example, the first electronic device establishes wired connection with the M second electronic devices through a universal serial bus (universal serial bus, USB). For another example, after the first electronic device and the M second electronic devices turn on the bluetooth switch, the distance between the electronic devices is within a preset distance, the first electronic device and the M second electronic devices may establish a bluetooth network, and the first electronic device and the M second electronic devices establish bluetooth connection. Or after the first electronic device and the M second electronic devices turn on a wireless local area network (wireless local area network, WLAN) switch, the distance between the first electronic device and the M second electronic devices is within a preset distance, and a WLAN direct connection, also called Wi-Fi peer-to-peer (Wi-Fi P2P), can be established between the first electronic device and the M second electronic devices. Or after the first electronic device and the M second electronic devices are accessed to the same local area network, the data can be synchronized through the local area network, so that the coordination among the devices can be realized. Alternatively, the first electronic device and the M second electronic devices may establish a near field communication (near field communication, NFC) connection, an infrared (infrared radiation, IR) connection, or the like.
The connection may be, for example, one or more of a bluetooth connection, a USB connection, an NFC connection, an infrared IRC connection, a Wi-Fi connection. A Wi-Fi connection is understood to mean that a second electronic device establishes a communication connection with one or more first electronic devices via an AP.
Optionally, the first electronic device and the M second electronic devices may be electronic devices in the same trust ring. The first electronic device and the M second electronic devices can establish trust relationship through trusted authentication to form a trust ring. There are various ways in which the first electronic device and the M second electronic devices may form a trust ring. For example, the first electronic device logs in the same account with the M second electronic devices, and the multiple electronic devices under the same account trust each other to form a trust ring. For another example, the first electronic device and the M second electronic devices do not log in the same account, the first electronic device and the M second electronic devices perform trusted authentication through a protocol, a trust relationship is established, and a trust ring is formed.
After the first electronic device establishes connection with the M second electronic devices, the first electronic device may instruct some or all of the M second electronic devices to assist in downloading the resource packages based on the number N of resource packages to be downloaded, so as to save the downloading duration.
The method provided by the embodiment of the application is suitable for one-key installation of the APP or one-key update of the APP. For example, a first interface as shown in fig. 1 may display an APP recommending updates, and in response to a user clicking on a one-touch update on the first interface, the handset may execute S602. For another example, a second interface as shown in fig. 1 may display an APP recommending installation, and the handset may execute S602 in response to the user clicking on the one-click installation at the second interface. As another example, when the user sets the APP to be automatically updated after the Wi-Fi connection, the mobile phone may automatically execute the one-key installation APP or the one-key update APP after the Wi-Fi connection, triggering the mobile phone to execute S602. Or when the user sets the mobile phone to automatically update the APP at the fixed time, the mobile phone can automatically execute one-key installation APP or one-key update APP at the fixed time, and the mobile phone is triggered to execute S602. In the one-key installation scene, N first resource packages are N APP installation packages. In a one-key upgrade scene, if the to-be-updated APP is updated in an incremental upgrade mode, the N first resource packages are N APP differential packages. If the partial APP adopts incremental upgrade and the partial APP adopts full upgrade, the N first resource packages comprise an installation package of the partial APP and a differential package of the partial APP.
Further, the APP installation package may be divided into a plurality of small installation packages, which may be stored separately in a plurality of CDN servers. The installation package in the AAB format as before may include a plurality of base packages, configuration packages, and function packages. Also, the differential packets of the APP may be divided into a plurality of small differential packets, which may be separately stored in the CDN server. For example, in a one-touch installation scenario, the N first resource packages may include N small installation packages. Alternatively, the N first resource packages may include small installation packages of the APP that are subcontracting, and installation packages of the APP that are not subcontracting. In a one-key upgrade scenario, if the APP to be updated upgrades the APP in an incremental upgrade manner, the N first resource packages may include small differential packages of the APP stored in a sub-package manner and differential packages of the APP stored in an un-sub-package manner. If the partial APP is updated in an increment and the partial APP is updated in a full quantity, the N first resource packages comprise an installation package for the partial non-sub-package storage APP, a differential package for the partial non-sub-package storage APP, a small installation package for the partial sub-package storage APP, and a small differential package for the partial sub-package storage APP.
The method provided by the embodiment of the application is also suitable for the installation scene or the update scene of the single APP. Exemplary embodiments. Responding to the installation operation of a user on the first APP, the first electronic equipment acquires the downloading success rate of each first resource package in the N first resource packages to be downloaded. The N first resource packages are N small installation packages of the first APP. And responding to the upgrade operation of the user on the first APP, and acquiring the download success rate of each first resource package in the N first resource packages to be downloaded by the first electronic equipment. The N first resource packets are N small difference packets of the first APP.
That is, the first resource packet is at least one of an installation packet of the APP, a differential packet of the APP, a small installation packet of the APP stored in a packet, and a small differential packet of the APP stored in a packet. The N first resource packages to be downloaded comprise one or more of an installation package of the APP, a differential package of the APP, a small installation package of the APP stored in a sub-package mode and a small differential package of the APP stored in a sub-package mode.
The method provided by the embodiment of the application also comprises a plurality of installation scenes or update scenes of the APP. For example, the first interface shown in fig. 1 may display an APP recommending update, and the mobile phone executes S602 in response to the user continuously upgrading the first APP, the second APP, and the nth APP on the first interface. The time interval between the upgrading operation of the user on the first interface to the first APP and the upgrading operation of the user on the first interface to the second APP is smaller than a first time threshold.
Alternatively, the first electronic device may perform S602a before performing S602.
S602a, the first electronic device sends a query request to the server.
The query request is used for acquiring the download addresses of the N first resource packages to be downloaded.
S602b, the server returns the download addresses of the N first resource packages to be downloaded to the first electronic device.
The download address corresponds to a CDN server, and the first electronic device may download the first resource packet from the CDN server corresponding to the download address.
S602, the first electronic device obtains the downloading success rate of each first resource package in N first resource packages to be downloaded.
Wherein N is an integer greater than 1.
The download success rate is the success rate of the first electronic device when predicting the first resource package to be downloaded by the first electronic device. Before downloading the first resource package, the first electronic device may estimate a success rate of downloading the first resource package if the first electronic device downloads the first resource package. The downloading success rate of the first resource package is related to the downloading time of the first resource package, the longer the downloading time of the first resource package is, the longer the waiting time of the user is, the greater the possibility that the user finishes downloading is, and the lower the downloading success rate of the first resource package is.
The first electronic device may use the ratio of the first resource package to the first electronic device as the estimated download duration of the first resource package. The first electronic device may obtain a size of the first resource package from the server. That is, in S602a, the query request is also used to obtain the size of N first resource packages to be downloaded. Or, the first electronic device stores the sizes of N first resource packages to be downloaded, and the first electronic device may read the size of each first resource package.
The first electronic device may first obtain an estimated download duration of each first download resource packet of the N resource packets to be downloaded. For each first resource package, the downloading time is the sum of the downloading time and the waiting time. Where download time = first resource packet size/network speed. Illustratively, the download time period t1 of the first resource packet 1=the first resource packet 1 size/network speed, the download time period t2 of the first resource packet 2=the first resource packet 1 size/network speed, … …, and the download time period tN of the first resource packet n=the first resource packet N size/network speed. Then, the first electronic device consumes the acquired N downloadAnd then sequentially ordering from small to large. Among the ordered N downloading time periods, the first downloading time period is the shortest time period, and the Nth downloading time period is the longest time period. And the waiting time consumption of the first resource package corresponding to the first downloading time consumption in the ordered N downloading time periods is zero. The download time length of the rest N-1 first resource packages is the sum of the download time consumption of the first resource packages arranged before the first resource packages. Thus, the expected download duration of the remaining first resource packages is the sum of the download time of the first resource package and the download duration of the first resource package before the first resource package. I.e. the download duration of the ith first resource package . Wherein i is in [1,2, … …, N]Sequentially taking values.
Illustratively, the time period of downloading the second first resource packet after ordering=the time period of downloading the first resource packet+the time period of downloading the second first resource packet. The time length of downloading the third first resource package after sequencing = the time consumption of downloading the first resource package + the time consumption of downloading the second first resource package + the time consumption of downloading the third first resource package. For example, assume that there are 6 first resource packages to be downloaded. The first electronic device calculates that the downloading time of the 6 first resource packages is 30 seconds, 50 seconds, 10 seconds, 40 seconds and 70 seconds in sequence based on the size of the first resource package and the network speed of the first electronic device. The time consumption of ordered downloading is as follows: 10 seconds, 30 seconds, 40 seconds, 50 seconds, 70 seconds. The first electronic device calculates the downloading duration of the 6 first resource packages as follows in sequence: 10 seconds, 40 seconds (10+30), 80 seconds (40+30+10), 130 seconds (50+40+30+10), 200 seconds (70+50+40+30+10).
After obtaining N downloading time durations of the N first resource packages, the first electronic device estimates the success rate of downloading the first resource packages based on the downloading time duration of each first resource package.
The first electronic device may estimate a download success rate of each first resource packet based on a mapping relationship between the download success rate and a download duration. The first electronic device stores a mapping relationship between the download success rate and the download duration, where the mapping relationship may be obtained by the first electronic device according to statistics of past download data of the user. For example, if the resource packet is downloaded within [0,20] seconds, the resource packet download success rate is 95%. And the resource package is downloaded in [20,30] seconds, so that the success rate of the resource package downloading is 85%. The resource package is downloaded in [30,60] seconds, and the success rate of the resource package download is 50%. The resource package is downloaded in 60,90 seconds, and the success rate of the resource package is 35%.
The first electronic device can also calculate the downloading success rate of each first resource packet, so that the obtained downloading success rate is more accurate. The method for the first electronic device to calculate the download success rate of each first resource packet will be described below with reference to the drawings and the embodiments, which are not repeated here.
After obtaining the next N success rates, the first electronic device may store N first resource packages and N corresponding download success rates. The first electronic device instructs some or all of the M second electronic devices to cooperatively download the first resource packages based on the download success rate of each first resource package. Alternatively, the first electronic device may perform S603.
S603, the first electronic device identifies a second resource packet with the download success rate greater than or equal to the first threshold value in the N first resource packets, and a third resource packet with the download success rate less than the first threshold value in the N first resource packets.
The first electronic device may identify, one by one, whether a success rate of each first resource packet is greater than or equal to a first threshold. The first threshold may be 80%. The downloading success rate is larger than or equal to a first threshold value, and the first electronic equipment is indicated to have higher success rate of downloading the first resource packet corresponding to the success rate. The success rate of downloading is smaller than a first threshold value, and the success rate of indicating the first electronic equipment to download the first resource packet corresponding to the success rate is lower. The second resource packet is a first resource packet with the downloading success rate being greater than or equal to a first threshold value. The third resource packet is a first resource packet with the downloading success rate smaller than the first threshold value.
Therefore, the second resource package can be downloaded by the first electronic device, and the third resource package can be downloaded by the second electronic device because the download success rate of the third resource package by the first electronic device is lower. The time period of downloading a first resource package by the second electronic device=the instruction time consumption between the first electronic device and the second electronic device+the downloading time consumption of the first resource package+the transferring time consumption of the first resource package between devices. Taking the example that the first electronic device and the second electronic device establish Wi-Fi connection, the first electronic device and the second electronic device access the same wireless local area network, and can establish communication through the same AP. Because the first electronic device and the second electronic device are high-speed local area networks, the instruction time consumption between the first electronic device and the second electronic device and the transmission time consumption of the first resource package between the devices are much smaller than the downloading time consumption of the first resource package, and can be ignored. The time for downloading the first resource package by the second electronic device is longer than the time for downloading the first resource package by the first electronic device because waiting time is not needed or is shorter. Continuing with the previous 6 first resource packages as an example, the downloading duration of the 6 first resource packages by the first electronic device is sequentially 10 seconds, 40 seconds (10+30), 80 seconds (40+30+10), 130 seconds (50+40+30+10), and 200 seconds (70+50+40+30+10). If the third first resource package is downloaded by the second electronic device, the downloading time is 40 seconds. If the last first resource package is downloaded by the second electronic device, the downloading time is 70 seconds. Therefore, the downloading of the first resource by the second electronic device can reduce the downloading time of the first resource package and improve the downloading success rate of the first resource package.
The first electronic device may instruct all or part of the M second electronic devices to download the third resource package based on the number of third resource packages and the number of second electronic devices. Illustratively, the first electronic device may perform S604.
S604, the first electronic device downloads n second resource packages.
S605, the first electronic device instructs the M second electronic devices to download the N-N third resource packages, or the first electronic device and the M second electronic devices download the N-N third resource packages.
The N first resource packages may include N second resource packages, and N-N third resource packages other than the N second resource packages. Wherein N is more than or equal to N > 1, and N is an integer. The following is a description of the case.
Case one: the number N-n=0 of the third resource packages, and the first electronic device downloads the N second resource packages, and the first electronic device does not instruct the second electronic device to download the second resource packages.
And a second case: the number of third resource packages is smaller than N-N and smaller than M. The first electronic device randomly instructs N-N second electronic devices in the M second electronic devices to download N-N third resource packages. And each of the N-N second electronic devices downloads a third resource package.
And a third case: the number N-N of third resource packages is equal to M. The first electronic device sequentially instructs the M second electronic devices to download M (N-N) third resource packages. And each of the M second electronic devices downloads a third resource package.
Case four: the number N-N of third resource packages is larger than M. And the M second electronic devices download the N-N third resource packages, or the first electronic device and the M second electronic devices download the N-N third resource packages.
Specifically, the first electronic device may instruct the M second electronic devices to download M third resource packages from the N-N third resource packages, where each of the M second electronic devices downloads one of the M third resource packages. Then, for N-M third resource packages other than the M third resource packages in the N-N third resource packages, the first electronic device may instruct the third electronic device to download one of the N-M third resource packages until the N-M third resource packages are downloaded. The third device is the second electronic device which is the first to finish the download task indicated by the first electronic device in the M second electronic devices.
Alternatively, the first electronic device may instruct the M second electronic devices to download M third resource packages of the N-N third resource packages, where each of the M second electronic devices downloads one of the M third resource packages. Then, for N-M third resource packages other than the M third resource packages in the N-N third resource packages, the first electronic device may instruct the third electronic device to download one of the N-M third resource packages until the N-M third resource packages are downloaded. The third device is the first electronic device to complete the download task indicated by the first electronic device in the M second electronic devices and the first electronic device.
As an example, S605 may include S701-S704, as shown in fig. 7.
S701, the first electronic device identifies whether M is less than N-N.
I.e. the first electronic device identifies whether the number of second electronic devices establishing short-range communication connections with the first electronic device is smaller than the number of third electronic devices to be downloaded.
S702, if M is greater than or equal to N-N, the first electronic device instructs M second electronic devices to download N-N third resource packages.
And S703, if M is smaller than N-N, the first electronic device instructs M second electronic devices to download M third resource packages.
If M is smaller than N-N, the number of second electronic devices establishing short-distance communication connection with the first electronic device is smaller than the number of third electronic devices to be downloaded, and the first electronic device may allocate one third electronic device to each of the M second electronic devices. Thereafter, the first electronic device may perform S704 for the remaining third electronic devices.
The first electronic device may send a download instruction to the third electronic device, the download instruction including a download address of the third resource package.
S704, the first electronic device indicates the third electronic device to download one third resource package in the N-N-M third resource packages until the downloading of the N-N-M third resource packages is completed, wherein the third electronic device is the second electronic device which firstly completes the downloading task indicated by the first electronic device in the M second electronic devices.
Alternatively, S704 may be: and the third electronic device indicates the third electronic device to download one third resource package in the N-N-M third resource packages until the downloading of the N-N-M third resource packages is completed, and the third electronic device is the electronic device which is the first to complete the downloading task indicated by the first electronic device in the M second electronic devices and the first electronic device.
That is, in this solution, N-M third resource packages may be downloaded by M second electronic devices, or N-M third resource packages may be downloaded by the first electronic device and the M second electronic devices. The first electronic device and the M second electronic devices download N-N-M third resource packages, and the scheme is described below.
For example, the first electronic device may continuously identify a third electronic device that is currently the first to download, which may be the first electronic device or one of the M second electronic devices. And then, the third electronic device can download one third resource package in the N-N-M third resource packages until the downloading of the N-N-M third resource packages is completed.
Specifically, the first electronic device may continuously acquire the downloading progress of the first electronic device and the downloading progress of each second electronic device. The second electronic device sends the current downloading progress to the first electronic device periodically in the downloading process. Or after the second electronic device finishes downloading, the second electronic device sends the current downloading progress to the first electronic device, wherein the current downloading progress is 100%. Alternatively, the second electronic device may send the current download progress to the first electronic device in response to the request of the first electronic device. The first electronic device may identify a third electronic device that currently completes downloading first according to the downloading progress of the first electronic device and the M second electronic devices. Illustratively, the first electronic device identifies the electronic device that first indicated a current download progress of 100% as the third electronic device. Or at the same time, the electronic device with the fastest downloading progress in the first electronic device and the M second electronic devices is the third electronic device.
The first electronic device may further obtain a duration of downloading n first resources by the first electronic device, and a duration of downloading a third resource package by each of the M second electronic devices, where the electronic device corresponding to the shortest downloading duration is currently the first third electronic device to complete downloading. For example, the first electronic device downloads the second resource package 1 and the second resource package 2, where the duration of downloading the two second resource packages by the first electronic device is 40 seconds, and the other 3 second electronic devices download one third resource package respectively, where the downloading durations are 30 seconds, 50 seconds, and 70 seconds. And the first electronic device identifies the second electronic device corresponding to the download duration of 30 seconds as a third electronic device.
After the first electronic device allocates a download task for the first electronic device (including the first electronic device and M second electronic devices), the first electronic device identifies the electronic device that is currently downloaded first, and allocates a next third resource package for the electronic device that is currently downloaded first. And then, the first electronic device again identifies the electronic device which is currently downloaded first and distributes a next third resource package for the electronic device. That is, after each time a download task is assigned to an electronic device, the first electronic device may identify the electronic device that is the first to complete download in the current electronic devices, and continuously assign a third resource package to the electronic device that is the first to complete download until the third resource package is assigned.
The first electronic device may send a download indication to the third electronic device instructing the second electronic device or the third electronic device to download the third resource package. The download indication may include a download address of the third resource packet and/or a size of the third resource packet. Optionally, the download indication may further include an identification of the third resource package, where the identification is used to uniquely mark one of the third resource packages.
Taking the second electronic device as an example, the second electronic device may calculate a download duration of the second electronic device for downloading the third resource package by using the size of the third resource package and the network speed of the second electronic device, and then, the second electronic device returns the download duration of the third resource package to the first electronic device. Or the download instruction only comprises the download address of the third resource packet, the second electronic device obtains the size of the third resource packet from the CDN server corresponding to the download address, and the download duration is calculated. Or the second electronic device may report the current network speed to the first electronic device, and the first electronic device calculates the download duration of the second electronic device.
And if the first electronic equipment downloads the completion packet at first, the first electronic equipment downloads one of the remaining third resource packets. If one of the M second electronic devices is downloaded in advance, the first electronic device instructs the second electronic device to download one of the remaining third resource packages.
After the third electronic device downloads one of the remaining third resource packages, the first electronic device may continuously identify the electronic device currently completing the downloading first, and then allocate the next third resource package to the third electronic device currently completing the downloading first until the third resource package is allocated.
That is, the first electronic device downloads N second resource packages first, and allocates N-N third resource packages to M second electronic devices, where one second electronic device downloads one third resource package. And if the unallocated third resource package exists, the first electronic device finishes downloading or any one of the M second electronic devices finishes downloading first, and then allocates a third resource package for the first electronic device. The first electronic device continuously acquires the downloading condition of each electronic device, and continuously distributes a third resource package for the electronic device with the first downloading until the third resource package is downloaded.
Optionally, in order to maximize the downloading capability of each electronic device, the downloading success rate of each resource package is increased as much as possible. The first electronic device can preferentially download the second resource packages with short time consumption according to the sequence that the time consumption of downloading the n second resource packages is from small to large, so that the waiting time of a user is shortened, and the success rate of downloading the second resource packages is improved. Similarly, when the third electronic device downloads the third resource packages, the third resource packages with short downloading time consumption can be downloaded preferentially according to the sequence of the downloading time consumption of the N-N-M third resource packages from small to large, so that the waiting time of a user is shortened, and the downloading success rate of the third resource packages is improved. For example, the first electronic device may sequence the n second resource packages from small to large in time consumption during downloading, and sequentially download the n second resources after the sequence. The first electronic device may sort the downloading time of the N-M third resource packages in order from small to large, and the third electronic device sequentially downloads the sorted N-M third resource packages. Or the first electronic device ranks the N first resource packages according to the time-consuming downloading size from small to large, wherein the first electronic device comprises N second resource packages after being ranked and N-N-M third resource packages after being ranked.
Illustratively, as shown in fig. 8, prior to S604, the method further comprises:
s801, the first electronic device ranks the N first resource packages according to the time-consuming downloading size from small to large.
The N first resource packets after sequencing include N second resource packets after sequencing and N-N third resource packets after sequencing. That is, the N second resource packages are also ordered from small to large in size, and the N-N third resource packages are also ordered from small to large in size.
As shown in fig. 8, S604 may be S802.
S802, the first electronic device downloads the second resource packages according to the sequence of the n second resource packages.
The first electronic device downloads the second resource package with the shortest time consumption in the n second resource packages preferentially, and finally downloads the second resource package with the longest time consumption in the n second resource packages.
As shown in fig. 8, S703 may be S803.
S803, the first electronic device instructs the M second electronic devices to preferentially download the first M third resource packages with the shortest downloading time in the N-N according to the sequence of the N-N third resource packages.
The first electronic device indicates the M second electronic devices to download the first M third resource packages in the third resource packages after sequencing.
Optionally, the first electronic device records a duration of downloading n second resource packages by the first electronic device, and a duration of downloading a third resource package by each of the M second electronic devices.
The duration of downloading the n second resource packages by the first electronic device may be a ratio of the size of the n second resource packages to the network speed of the first electronic device. The length of time for each second electronic device to download the third resource packet may be a ratio of the size of the third resource packet to the network speed of the second electronic device.
For example, the first electronic device may number the first electronic device and the M second electronic devices, where the number of the first electronic device may be 1, and the numbers of the remaining M second electronic devices may be 2,3, …, and M. The first electronic device may number the first resource package to be downloaded, which may be 1,2,3, …, N. After the first resource package is downloaded by the distributed electronic device (including the first electronic device and the M second electronic devices), the first electronic device may store a download duration of each of the first electronic device and the M second electronic devices. For example, the first electronic device may use ti j to represent the download status of each electronic device. Wherein i represents the ith device and j identifies the electronic device to download the jth resource package. A duration of 10 seconds for the first electronic device (first electronic device) to download the first resource package is indicated by 10[1 ]. 40[2] [1] means that the second electronic device downloads the first resource package for 40 seconds.
As shown in fig. 8, S704 may be S804.
S804, the first electronic device instructs the third electronic device to sequentially download the N-N-M third resource packages according to the sequence from small to large in time consumption of downloading the N-N-M third resource packages until the downloading of the N-N-M third resource packages is completed, wherein the third electronic device is the second electronic device which firstly completes the downloading task instructed by the first electronic device in the M second electronic devices.
Optionally, S804 may further be: the first electronic device indicates a third electronic device to download the N-N-M third resource packages in sequence from small to large according to the downloading time of the N-N-M third resource packages until the N-N-M third resource packages are downloaded, wherein the third electronic device is one of the M second electronic devices and the first electronic device which is the first to complete the downloading task indicated by the first electronic device.
The third electronic device may be the first electronic device or one of the M second electronic devices, and the third electronic device may download the m+a third resource package in the N-M third resource packages after sorting, where a sequentially takes values in [1, N-M ] until the downloading of the third resource package is completed.
Taking N-m=2 as an example, if the first electronic device is the third electronic device with the shortest current download duration, the first electronic device downloads the (m+1) th third resource packet in the third resource packets after sequencing. If one of the M second electronic devices downloads the electronic device with the shortest duration currently, the first electronic device indicates the second electronic device to download the (m+1) th third resource package in the sequenced third resource packages. And then, the first electronic device updates the downloading time of the third electronic device, and continuously identifies the electronic device with the shortest current downloading time. If the first electronic device is the electronic device with the shortest current downloading duration, the first electronic device downloads the (m+2) th third resource package in the sequenced third resource packages. If one of the M second electronic devices is the electronic device with the shortest current downloading duration, the first electronic device indicates the second electronic device to download the m+2th third resource package in the sequenced third resource packages.
After the first electronic device sorts the first resource packages according to the descending time consumption from small to large, when the first electronic device distributes the third resource packages, the first electronic device firstly finds the third electronic device with the shortest current downloading time length, and distributes the third resource packages with the shortest current downloading time consumption to the first idle third electronic device. The first electronic device updates the download duration of the third electronic device at the same time so as to be used in the next round.
Taking the number of the first resource packages to be downloaded as 7 as an example, the time for downloading the first resource packages after sequencing is sequentially 10 seconds, 30 seconds, 40 seconds, 50 seconds, 70 seconds and 75 seconds. Downloading the 7 first resource packages by the first electronic device takes 10 seconds, 40 seconds, 80 seconds, 130 seconds, 200 seconds and 275 seconds in sequence, and the success of downloading the 7 first resource packages by the first electronic device can be 90%, 70%, 50%, 40%, 30% and 28% in sequence. The first threshold may be 80%, so that the first electronic device downloads the ordered first resource package and instructs the 2 second electronic devices to download the ordered second first resource package and the ordered third first resource package. The first electronic device may record the download time consumption of the electronic device.
TABLE 1
The downloading time of the first electronic device is 10 seconds, the downloading time of the first second electronic device is 30 seconds, and the downloading time of the second electronic device is 40 seconds. The first electronic device identifies the electronic device with the shortest time consumption in the current downloading process as the first electronic device. Therefore, the first electronic device downloads the ordered fourth first resource package, and updates the download time consumption of the first electronic device to 50. As shown in table 1, the current download time of the updated electronic device is sequentially 50 seconds, 30 seconds, and 40 seconds. The first electronic device continues to identify the electronic device with the shortest downloading time in the current downloading process, and the electronic device with the shortest downloading time in the current downloading process is the second electronic device a. The first electronic device instructs the second electronic device a to download the fifth first resource package and updates the download time consumption of the second electronic device a to 70. As shown in table 1, the current download time of the updated electronic device is sequentially 50 seconds, 70 seconds, and 40 seconds. And then, the first electronic device continuously identifies the electronic device with the shortest downloading time in the current downloading process, and the electronic device with the shortest downloading time in the current downloading process is the second electronic device b. The first electronic device instructs the second electronic device b to download the sixth first resource package and updates the download time consumption of the second electronic device to 75.
In the embodiment of the application, the first electronic device sorts the N first resource packages to be downloaded according to the time consumption of downloading, and the first electronic device downloads the second resource package with the shortest time consumption in the N second resource packages preferentially, so that the waiting time of a user can be reduced, and the success rate of downloading the second resource packages by the first electronic device can be improved. And when the first electronic device allocates N-N third resource packages, the first electronic device preferentially instructs the M second electronic devices to download the first M third resource packages with the shortest time consumption in the N-N third resource packages after sequencing, so that the waiting time of the user is reduced. And when the first electronic device distributes the rest third resource packages, the third resource package with the shortest current downloading time consumption can be distributed to the electronic device which finishes downloading at first at present each time, so that the downloading capacity of each electronic device is utilized to the maximum, the downloading efficiency is improved, and the downloading time consumption is optimal.
There are various ways in which the first electronic device instructs the second electronic device to download the third resource package, and an example is given below.
For example, the first electronic device may send a download indication to the second electronic device, where the download indication may include a download address of the third resource package and/or a size of the third resource package. Optionally, the download indication may further include an identification of the third resource package, where the identification is used to uniquely mark one of the third resource packages. And responding to the received downloading instruction, and sending a downloading request to a CDN server corresponding to the downloading address of the third resource packet by the second electronic equipment. In response to the download request, the CDN server sends a third resource packet to the second electronic device.
Optionally, the download indication includes only an identification of the third resource package, and the second electronic device sends a query request to the server in response to receiving the download indication. In response to the query request, the server returns the download address of the third resource package to the second electronic device. After obtaining the download address of the third resource packet, the second electronic device sends a download request to the CDN server corresponding to the download address. In response to the download request, the CDN server sends a third resource packet to the second electronic device.
In the following, taking a mobile phone as a first electronic device and a PC and a tablet computer as a second electronic device, a method for downloading a resource package according to an embodiment of the present application is described with reference to fig. 9. In fig. 9, illustratively, n=5, n=1, m=2.
S901, a mobile phone is connected with a PC, and the mobile phone is connected with a tablet personal computer.
S902, the mobile phone responds to the operation of the user and sends a query request to the server.
The query request is used to obtain download addresses of the plurality of first resource packages. Taking an installation package of the first resource package in an AAB format as an example, a query request is used for obtaining the installation packages of the plurality of APPs in the AAB format.
S903, in response to receiving the query request, the server returns information of the installation packages in AAB format of the plurality of APP to the mobile phone.
The information includes a base package, a configuration package, and the latest version of the function package in each of the AAB-formatted installation packages of the plurality of APPs, and download addresses of the base package, the configuration package, and the function package.
S904, the mobile phone identifies 5 first resource packages to be downloaded based on the basic package, the configuration package and the current version of the function package in the AAB format installation package of each APP in the plurality of APPs.
For example, the current version of the basic package of APP1 is already in the latest version, and the handset only needs to download the configuration package and the function package of APP 1. The current version of the configuration package of APP2 is already in the latest version, and the mobile phone only needs to download the basic package and the function package of APP 1. That is, the type of the first resource package may be at least one of a basic package, a configuration package, and a function package.
S905, the mobile phone identifies the downloading success rate of each first resource package in the 5 first resource packages.
Suppose that the 5 first resource packets include 1 second resource packet and 4 third resource packets.
S906, the mobile phone sends a first downloading request to the CDN server.
The first downloading request is used for requesting to acquire 1 second resource packet in the 5 first resource packets, wherein the downloading success rate of the second resource packets is greater than or equal to a first threshold value.
S907, the CDN server returns a second resource package to the mobile phone.
S908, the mobile phone sends a first download instruction to the PC.
S909, the PC sends a second download request to the CDN server in response to the first download instruction.
S910, the mobile phone sends a second download instruction to the tablet computer.
S911, the tablet computer responds to the second download instruction and sends a second download request to the CDN server.
The first download instruction is used for instructing the PC to download one of the 4 third resource packages, such as third resource package 1, and the second download instruction is used for instructing the tablet computer to download one of the 4 third resource packages, such as third resource package 2. The download success rate of the third resource packet is smaller than the first threshold.
Since the current mobile phone finishes downloading, the mobile phone is an idle electronic device, and the mobile phone can download the third resource pack 3.
S912, the handset sends a third download request to the CDN server. The third download request is for requesting acquisition of a third resource package 3.
S913, the CDN server returns the third resource packet 1 to the PC.
S914, the PC sends a third resource package 1 to the mobile phone.
Since the current PC finishes downloading, the PC is an idle electronic device, and the mobile phone can instruct the PC to download the third resource package 4.
S915, the mobile phone sends a third download instruction to the PC. The third download instruction is for instructing the PC to download the third resource package 4.
S916, the PC sends a fourth download request to the CDN server in response to the third download instruction.
S917, the CDN server returns a third resource package 2 to the tablet computer.
S918, the tablet computer sends a third resource pack 2 to the mobile phone.
S919, the CDN server returns the third resource package 4 to the PC
S920, the PC sends a third resource packet 4 to the handset.
S921, the CDN server returns the third resource packet 3 to the handset.
It should be understood that the CDN servers in FIG. 9 may be different CDN servers or the same CDN server.
The mobile phone can update or install the corresponding APP after obtaining an installation package or differential package. When the mobile phone receives a plurality of small installation packages or small difference packages, the mobile phone can update or install the corresponding APP after the small installation packages or the small difference packages are completely installed after the mobile phone is obtained.
The foregoing indicates that the first electronic device may calculate the download success rate of each first resource package, and in particular, the first electronic device may calculate the download success rate of each first resource package based on the first calculation model. The first computing model has the capability of obtaining the download success rate of the first resource package according to the expected download duration of the first resource package. For example, the first computing model may be, for example, a neural network model, an input of which may be an estimated download duration of the first resource package, and an output of which may be a download success rate of the first resource package. For another example, the first computational model may also be a fuzzy predictive model.
The fuzzy prediction model is shown in fig. 10, the input of which is the predicted download duration of the first resource packet, and the output of which is the download success rate of the first resource packet. The fuzzy predictive model as shown in fig. 10 includes a fuzzy controller, also referred to as a fuzzy logic control, which is a language type controller. The fuzzy controller is mainly used for executing the following steps: and (5) parameter fuzzification, fuzzy reasoning and fuzzy solution.
The parameter fuzzification includes input parameter fuzzification and output parameter fuzzification. Due to individual differences, the tolerance of the user for the waiting period is inconsistent. During the process of downloading the first resource package, some users may consider the download time period to be acceptable when 60 seconds is required, and some users may consider the download time period to be acceptable when 40 seconds is required. Because of the ambiguity of the user to the download duration, the download duration can be obfuscated using membership functions.
Fuzzification is the process of converting a determined value into a responsive fuzzy language variable value. If a number A (x) ∈ [0,1] corresponds to any element x in the determined value U, then A is referred to as the fuzzy set on U, and A (x) is referred to as the membership of x to A. When x varies in U, A (x) is a function called the membership function of A. The closer the membership A (x) is to 1, the higher the degree that x belongs to A, and the closer A (x) is to 0, the lower the degree that x belongs to A.
Illustratively, the duration of the download after blurring may be as shown in table 2.
TABLE 2
As can be seen from table 2, the download time length is 60 seconds or longer, and the probability of the download time length being overlength is considered to be 1, the probability of the download time length being long is 0.5, and the probabilities of the download time length being extremely short, short and medium are all zero. When the download time length is greater than or equal to 40 seconds and less than 60 seconds, the download time length is considered to be the medium probability of 0.5, the download time length is 1, the download time length is the overlength probability of 0.5, and the download time length is extremely short and the short probability is zero. When the download duration is greater than or equal to 30 seconds and less than 40 seconds, the probability of the download duration being the middle is considered to be 0.5, the probability of the download duration being long is considered to be 1, the probability of the download duration being the overlength is considered to be 0.5, and the probabilities of the download duration being the extremely short, the short and the overlength are all zero. Similarly, it can be seen that when the download duration is greater than or equal to 20 seconds and less than 30 seconds, the download duration is respectively in the probabilities of extremely short, medium, long and ultralong, and when the download duration is greater than or equal to 10 seconds and less than 20 seconds, the download duration is respectively in the probabilities of extremely short, medium, long and ultralong.
That is, table 2 shows a first mapping relationship between the first preset download duration and the first fuzzy matrix. For example, the preset download duration is 60, and the corresponding first fuzzy matrix is [ 1.5.0.0.0 ] T . The first fuzzy matrix is a first preset downloading duration after fuzzification.
Illustratively, the membership of the obfuscated predicted download duration is shown in FIG. 11. In fig. 11, the estimated download time is 10 seconds or less, and the membership of the estimated download time for the extremely short PB is 1. The estimated download time period increases from 10 seconds to 20 seconds, and the membership of the estimated download time period for the extremely short PB decreases from 1 to 0.5. The expected download duration increases from 10 seconds to 30 seconds, and the membership of the short PS for the expected download duration increases from 0.5 to 1, and then decreases to 0.5. The estimated download time period increases from 20 seconds to 40 seconds, and the membership of M is increased from 0.5 to 1 and then decreased to 0.5. The estimated download time period increases from 30 seconds to 50 seconds, and the membership of the short NS for the estimated download time period increases from 0.5 to 1, and then decreases to 0.5. The estimated download time period increases from 40 seconds to 60 seconds, and the membership of the very short NB for this estimated download time period increases from 0.5 to 1.
Also, the download success rate may be obfuscated. The download success rate after blurring can be shown in table 3.
TABLE 3 Table 3
As can be seen from table 3, the download success rate is 90% or more, the probability of the download success rate being ultra-high is 1, the probability of the download success rate being high is 0.5, and the probabilities of the download success rate being medium, low and ultra-low are all zero. The probability of the download success rate being higher than or equal to 80% and lower than 90% is 0.5, the probability of the download success rate being higher is 1, the probability of the download success rate being middle is 0.5, and the probability of the download success rate being lower is zero. The download success rate is more than or equal to 70% and less than 80%, the probability of the download success rate being high is 0.5, the probability of the download success rate being medium is 1, the probability of the download success rate being low is 0.5, and the probability of the download success rate being ultrahigh and ultralow is zero. Similarly, it can be seen that when the download success rate is greater than or equal to 50% and less than 70%, the download success rate respectively belongs to the probabilities of ultrahigh, high, medium, low and ultralow, and when the download success rate is greater than or equal to 30% and less than 50%, the download success rate respectively belongs to the probabilities of ultrahigh, high, medium, low and ultralow. That is, table 2 shows a second mapping relationship between the download success rate and the second fuzzy matrix. For example, the preset download duration is 60, and the corresponding first fuzzy matrix is [ 1.5.0.0.0 ] T . The first fuzzy matrix is a first preset downloading duration after fuzzification.
The input parameters and the output parameters after blurring, such as table 2 and table 3, may be stored in the first electronic device in advance. For example, it may be stored in a knowledge base of the first electronic device.
After parameter blurring, a responsive module control rule may be set and a fuzzy relationship established according to the fuzzy control rule. The module control rule s may be described in such a way that a is B. For example, if the download duration is extremely short, the download success rate is extremely high, if the download duration is short, the download success rate is high, if the download duration is medium, the download success rate is low, if the download duration is long, the download success rate is extremely low. Exemplary, as shown in table 4.
TABLE 4 Table 4
Then, the ambiguity relation r= (pbtxpss) U (pstxps) U (MtXMs) U (NStXNSs) U (NBtXNBs). The specific calculation process is as follows:
the 5 intermediate fuzzy matrixes are obtained by merging to obtain a fuzzy relation matrix
The fuzzy relation matrix may be stored in the handset. That is, the mobile phone stores the blurred input parameters, the blurred output parameters, and the blurred relation matrix R.
The process of calculating the download success rate of each first resource packet by the mobile phone may be referred to as defuzzification. Taking a first resource package as an example, the mobile phone first obfuscates the expected download duration of the first resource package. Illustratively, the mobile phone obfuscates the estimated download duration of the first resource package based on the estimated download duration of the first resource package and the first mapping relationship. The first mapping relationship may be a mapping relationship as shown in table 1. By way of example, assuming that the first resource package is expected to be downloaded for 30 seconds, it can be seen from table 1 that the obfuscated expected download time after obfuscation is [0,0.5,1,0.5,0]. And then multiplying the fuzzy expected downloading time length by the fuzzy relation matrix R by the first electronic equipment to obtain the fuzzy downloading success rate. Illustratively, the fuzzified download success rate is equal to the fuzzified expected download time period multiplied by the fuzzified relationship matrix. The algorithm of the fuzzy matrix multiplication is as follows: assuming c= AoB, cij is equal to the number of columns a (number of rows B) obtained by taking the number of columns a (number of rows B) first, and then taking the number of columns a again.
Fuzzified download success = fuzzified estimated download time period multiplied by the fuzzified relationship matrix.
The success rate of the fuzzification download is as follows:
after obtaining the fuzzy download success rate, the fuzzy download success rate can be defuzzified. Deblurring, also known as defuzzification, is the conversion of inferred fuzzy values into well-defined numerical values. Deblurring is an important step in fuzzy inference. There are many methods of deblurring, the most common of which are the maximum membership method, the centroid method and the weighted average method.
Taking a weighted average method as an example, the weighted average method calculates a weighted average of all elements in the fuzzy output and the membership degrees corresponding to the elements. Output parametersWherein x is i To blur individual elements in output, k i And (5) each membership degree corresponding to the fuzzy output quantity. For example, the predicted download success rate= (0.5×90% +0.5×80% +1×70% +0.5×50% +0.5×30%)/(0.5+0.5+1+0.5+0.5) =65%. As can be seen, the first resource packet with a download duration of 30 seconds is expected to have a download success rate of 65%.
The embodiment of the application provides electronic equipment, which comprises: memory, a wireless communication module, and one or more processors. The wireless communication module receives and transmits data according to the control of the processor so as to realize communication between the electronic equipment and other electronic equipment. A memory coupled to the processor; wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed on an electronic device as described above (e.g., electronic device 400 shown in fig. 4), cause the electronic device to perform the functions or steps of the method embodiments described above.
Embodiments of the present application also provide a computer program product which, when run on a computer, causes the computer to perform the functions or steps of the method embodiments described above.
Embodiments of the present application also provide a chip system including at least one processor and at least one interface circuit. The processors and interface circuits may be interconnected by wires. For example, the interface circuit may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, the interface circuit may be used to send signals to other devices (e.g., processors). The interface circuit may, for example, read instructions stored in the memory and send the instructions to the processor. The instructions, when executed by the processor, may cause the electronic device to perform the various steps of the embodiments described above. Of course, the chip system may also include other discrete devices, which are not specifically limited in this embodiment of the present application.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A method of downloading a resource package, for use with a first electronic device, the method comprising:
the first electronic equipment is connected with M second electronic equipment, wherein M is an integer greater than or equal to 1;
the first electronic equipment acquires the downloading success rate of each first resource package in N first resource packages to be downloaded, wherein N is an integer greater than 1; the download success rate is the success rate of the first resource package downloaded by the first electronic device, which is predicted by the first electronic device; the N first resource packages to be downloaded include: n second resource packets with the download success rate greater than or equal to a first threshold value, and N-N third resource packets with the download success rate smaller than the first threshold value except for the N second resource packets;
the first electronic device downloads the n second resource packages;
the first electronic device instructs the M second electronic devices to download N-N third resource packages; or the first electronic device and the M second electronic devices download N-N third resource packages.
2. The method of claim 1, wherein M < N-N; the first electronic device instructs the M second electronic devices to download the N-N third resource packages, including:
The first electronic device instructs the M second electronic devices to download M third resource packages in the N-N third resource packages; each of the M second electronic devices downloads one of the M third resource packages;
the first electronic device instructs a third electronic device to download one of the N-M third resource packages except the M third resource packages until the downloading of the N-M third resource packages is completed; the third electronic device is a second electronic device which is the first to finish the downloading task indicated by the first electronic device in the M second electronic devices.
3. The method according to claim 1 or 2, wherein M is ≡n-N; the first electronic device instructs the M second electronic devices to download the N-N third resource packages, including:
the first electronic device instructs N-N second electronic devices in the M second electronic devices to download the N-N third resource packages; and each of the N-N second electronic devices downloads one third resource package of the N-N third resource packages.
4. The method of claim 1, wherein M < N-N; the first electronic device and the M second electronic devices download N-N third resource packages, including:
the first electronic device instructs the M second electronic devices to download M third resource packages in the N-N third resource packages; each of the M second electronic devices downloads one of the M third resource packages;
the first electronic device instructs a third electronic device to download one of the N-M third resource packages except the M third resource packages until the downloading of the N-M third resource packages is completed; the third electronic device is one of the M second electronic devices and the first electronic device that completes the download task indicated by the first electronic device first.
5. The method of any one of claims 1, 2, or 4, wherein the first electronic device downloads n second resource packages, comprising:
and the first electronic equipment downloads the n second resource packages in sequence according to the sequence from small to large in time consumption of downloading the n second resource packages.
6. The method of claim 2 or 4, wherein the first electronic device instructs the M second electronic devices to download M third resource packages of the N-N third resource packages, comprising:
and the first electronic equipment instructs the M second electronic equipment to download the first M third resource packages in the N-N third resource packages according to the sequence from small to large in time consumption of downloading the N-N third resource packages.
7. The method of claim 6, wherein the first electronic device instructs a third electronic device to download one of the N-M third resource packages other than the M third resource packages until the N-M third resource packages are downloaded, comprising:
the first electronic device indicates the third electronic device to download the N-N-M third resource packages in sequence from small to large according to the time consumption of downloading the N-N-M third resource packages until the downloading of the N-N-M third resource packages is completed.
8. The method of any one of claims 1, 2, or 4, wherein the type of the first resource package is at least one of an installation package, a differential package, a small installation package of a sub-package stored APP, a small differential package of a sub-package stored APP.
9. The method according to any one of claims 1, 2 or 4, wherein the first electronic device obtaining a download success rate of each of N first resource packages to be downloaded includes:
the first electronic device obtains the estimated downloading duration of each first resource package in N first resource packages to be downloaded;
the first electronic device obtains the downloading success rate of the first resource package according to the estimated downloading duration and the fuzzy prediction model; the fuzzy prediction model has the capability of outputting the downloading success rate of the first resource packet according to the predicted downloading time of the first resource packet.
10. The method of claim 9, wherein the obtaining, by the first electronic device, the download success rate of the first resource package according to the predicted download duration and the fuzzy prediction model comprises:
the first electronic device blurs the expected download duration based on a first mapping relation to obtain a blurry expected download duration, wherein the blurry expected download duration is a first blur matrix;
multiplying the first fuzzy matrix by a fuzzy relation matrix by the first electronic equipment to obtain a second fuzzy matrix; the fuzzy relation matrix indicates a fuzzy relation between the expected downloading time length and the downloading success rate;
And the first electronic equipment deblurs the second fuzzy matrix to obtain the downloading success rate.
11. An electronic device, the electronic device comprising: a memory, a wireless communication module, and one or more processors; the wireless communication module receives and transmits data according to the control of the processor so as to realize the communication between the electronic equipment and other electronic equipment; the memory and the processor are coupled; wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 1-10.
12. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-10.
CN202311731844.9A 2023-12-15 2023-12-15 Method for downloading resource package and electronic equipment Active CN117440365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311731844.9A CN117440365B (en) 2023-12-15 2023-12-15 Method for downloading resource package and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311731844.9A CN117440365B (en) 2023-12-15 2023-12-15 Method for downloading resource package and electronic equipment

Publications (2)

Publication Number Publication Date
CN117440365A CN117440365A (en) 2024-01-23
CN117440365B true CN117440365B (en) 2024-04-12

Family

ID=89555595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311731844.9A Active CN117440365B (en) 2023-12-15 2023-12-15 Method for downloading resource package and electronic equipment

Country Status (1)

Country Link
CN (1) CN117440365B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1439721A1 (en) * 2003-01-08 2004-07-21 Samsung Electronics Co., Ltd. IOTA software download via auxiliary device
KR20040064937A (en) * 2003-01-11 2004-07-21 삼성전자주식회사 Mobile communication apparatus and communication system with function for software download via auxiliary device and method therefor
CN116489143A (en) * 2023-04-23 2023-07-25 西安广和通无线软件有限公司 Data downloading method and related device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4711954B2 (en) * 2004-03-04 2011-06-29 株式会社Access Wireless communication terminal synchronization method, wireless communication system, wireless communication terminal, and server
US8065429B2 (en) * 2007-06-28 2011-11-22 Nokia Corporation System, apparatus and method for associating an anticipated success indication with data delivery
US10789057B2 (en) * 2018-07-16 2020-09-29 Dell Products L.P. Predicting a success rate of deploying a software bundle

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1439721A1 (en) * 2003-01-08 2004-07-21 Samsung Electronics Co., Ltd. IOTA software download via auxiliary device
KR20040064937A (en) * 2003-01-11 2004-07-21 삼성전자주식회사 Mobile communication apparatus and communication system with function for software download via auxiliary device and method therefor
CN116489143A (en) * 2023-04-23 2023-07-25 西安广和通无线软件有限公司 Data downloading method and related device

Also Published As

Publication number Publication date
CN117440365A (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN108984064B (en) Split screen display method and device, storage medium and electronic equipment
WO2015157937A1 (en) Software upgrade method and terminal
CN115454286B (en) Application data processing method and device and terminal equipment
US20220091905A1 (en) Method and device for providing application list by electronic device
CN108270870B (en) Prompt message pushing method and device
CN110879680B (en) Icon management method and electronic equipment
CN110780940A (en) Application program loading method, electronic device and storage medium
CN112597361B (en) Ordering processing method and device, electronic equipment and storage medium
CN112486444B (en) Screen projection method, device, equipment and readable storage medium
CN109395395A (en) Game running method and Related product
CN111338745A (en) Deployment method and device of virtual machine and intelligent equipment
CN111427648A (en) Page resource updating method and device, electronic equipment, server and storage medium
US11740681B2 (en) Electronic device and application managing method thereof
CN106528284B (en) application program configuration method and device and terminal equipment
CN114205365A (en) Application interface migration system and method and related equipment
CN110837404A (en) Shortcut operation processing method and device for internal function module and storage medium
CN111580883B (en) Application program starting method, device, computer system and medium
CN117440365B (en) Method for downloading resource package and electronic equipment
CN103631621A (en) Method and device for prompting information
CN112579191A (en) Component loading method, device and system
CN113313155A (en) Data processing method and related device
CN114285906A (en) Message processing method and device, electronic equipment and storage medium
CN111625283A (en) Hardware updating method, device, system and computer readable storage medium
CN117632211A (en) Application program updating method, electronic device and readable medium
CN113923254B (en) Method and device for determining connection state of equipment, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant