WO2021057503A1 - Method and apparatus for downloading data packet - Google Patents

Method and apparatus for downloading data packet Download PDF

Info

Publication number
WO2021057503A1
WO2021057503A1 PCT/CN2020/114597 CN2020114597W WO2021057503A1 WO 2021057503 A1 WO2021057503 A1 WO 2021057503A1 CN 2020114597 W CN2020114597 W CN 2020114597W WO 2021057503 A1 WO2021057503 A1 WO 2021057503A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
devices
capability information
fragment
download
Prior art date
Application number
PCT/CN2020/114597
Other languages
French (fr)
Chinese (zh)
Inventor
祁德春
张亮
鲁志军
郝庆涛
余亮
曾智
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021057503A1 publication Critical patent/WO2021057503A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • This application relates to the field of terminals, and in particular to a method and device for downloading data packets.
  • the device side issues a system upgrade application or the server side pushes the system upgrade request, the device side decides whether to upgrade the system to the latest version, and if it chooses to upgrade, it will establish a transmission with the server Connect to download the latest upgrade package.
  • OTA over-the-air
  • the size of the upgrade package becomes larger and larger with the version change, and is often calculated in GB. Therefore, the time to download the upgrade package takes up the absolute amount of the upgrade time. Most of the time.
  • the strategy of downloading the upgrade package in the background can be adopted when the device is in normal use, when the device fails to be used normally, the user experience will be affected due to the long download time of the all-inclusive image.
  • the server side will increase the number of servers and transmission bandwidth, it is still inevitable to adopt traffic control measures. Therefore, even if the device side adopts some optimization strategies (such as increasing network bandwidth, multi-threading or multi-process concurrency) Downloading, etc.) It is expected to increase the download speed of the upgrade package, and it may not necessarily be able to effectively increase the download speed, resulting in an excessively long download time of the upgrade package.
  • the embodiment of the present application provides a method and device for downloading a data package, which are used to solve the problem of too long download time of the upgrade package.
  • An embodiment of the present application provides a method for downloading a data packet.
  • the method includes: a first device sends a first request message to x second devices, respectively, and a second request message to Nx second devices, where all The first request message is used to request the x second devices to assist the first device in downloading data packets through a mobile network, and the second request message is used to request the Nx second devices to assist the Nx second devices through a wireless network.
  • the first device downloads a data packet, x ⁇ N, x and N are positive integers; the first device receives N pieces of capability information from the N second devices, and the N pieces of capability information are the same as the N pieces of capability information.
  • the second device has a one-to-one correspondence; the first device determines a fragmentation strategy based on the N pieces of capability information, and the fragmentation strategy indicates M data packet fragments in the data packet, and the M data packet fragments One-to-one correspondence with M second devices in the N second devices, M is a positive integer, and M ⁇ N; the first device sends corresponding messages to the M second devices based on the fragmentation strategy.
  • the fragment download request message of the i-th second device where the fragment download request message corresponding to the i-th second device indicates the data packet fragment corresponding to the i-th second device, i is a positive integer, i ⁇ M; the first device receives The M data packet fragments from the M second devices.
  • the first device can use the idle capabilities of the M second devices to implement fast downloading of data packets, which can effectively shorten the time for downloading data packets.
  • the i-th capability information includes the remaining storage space of the i-th second device, the network bandwidth of the i-th second device, and the network bandwidth of the i-th second device. At least one of processing capabilities.
  • the capability information may also include computing capability and stored I/O speed.
  • the network bandwidth in each capability information in the capability information corresponding to the M second devices is greater than or equal to a preset minimum network bandwidth threshold, and/or the remaining storage space is greater than or equal to a preset minimum Storage space threshold.
  • Adopting the above design can ensure that the second device that assists the first device to download the data packet has a relatively strong capability, thereby effectively improving the download speed of the data packet and shortening the download time of the data packet.
  • the M data packet fragments meet the following conditions:
  • the size of the data packet fragments downloaded by the first device is s 0 , s 1 , s 2 , ..., s M represents the M data packet fragments, and S 1 , S 2 , ..., SM represents The maximum remaining storage space corresponding to the M second devices, B 1 , B 2 , ..., B M represents the network bandwidth corresponding to the M second devices, S represents the size of the data packet, and B Represents the network bandwidth of the first device, and B ′ represents the average value of the transmission speeds of the M second devices respectively transmitting corresponding data packet fragments to the first device.
  • the optimal si value can be obtained iteratively through the above two constraint conditions, which can effectively increase the download speed of the data packet and shorten the download time of the data packet.
  • the method further includes: after the first device receives the N capability information from the N second devices, the first device displays the N capability information on a display screen; The first device receives a user instruction, and the user instruction indicates M second devices selected from the N second devices.
  • the user can independently select the second device.
  • the method further includes: after the first device receives the N pieces of capability information from the N second devices, the first device displays the M pieces of capability information on a display screen; the The M pieces of capability information are selected by the first device from the N pieces of capability information based on preset rules; the first device receives a user instruction, and the user instruction indicates that the M pieces of capability information selected by the first device are approved The second device, the M second devices correspond to the M capability information in a one-to-one correspondence.
  • the first device can provide users with an optimal second device combination.
  • the method further includes: the first device receiving a first notification message from the i-th second device, and the first notification message is used to notify the first device of the first notification message.
  • the first device can learn the current download progress of the second device in time through the first notification message, or learn the faulty second device in time through the second notification message.
  • the method further includes: after the first device receives the M data packet fragments from the M second devices, if the first device downloads the data packet fragments from the server, The first device combines the data packet fragments downloaded by the first device and the M data packet fragments into a data packet; if the first device does not download any data packet fragment of the data packet from the server, Then the first device combines the M data packet fragments into a data packet.
  • the first device can combine data packet fragments into data packets according to different scenarios.
  • the method further includes: after the first device synthesizes the data packet, the first device generates verification information based on the synthesized data packet, and sends the verification information to the server The first device receives a response message from the server, the response message indicating that the synthesized data packet passes the verification.
  • the first device can verify the version and integrity of the synthesized data packet.
  • an embodiment of the present application provides a method for downloading data packets, the method includes: a second device receives a first request message from a first device; the first request message is used to request the second device Assist the first device to download data packets through the mobile network; the second device sends the capability information of the second device to the first device; the second device receives the fragments from the first device A download request, where the fragment download request indicates a data packet fragment corresponding to the second device; the second device downloads the data packet fragment from a server through a mobile network, and transmits the data packet fragment to the first equipment.
  • the second device can assist the first device to accelerate the download of the data packet, and shorten the download time of the data packet.
  • it further includes: after the second device receives the first request message from the first device, the second device displays the first information on the display screen, and the first information is used to solicit the user The opinion is whether to agree with the first request message; the second device receives a first user instruction, and the first user instruction indicates agreement with the first request message.
  • the second device can be configured with a download assistance function, and the user's consent is obtained whether to enable the function.
  • the capability information of the second device includes at least one of the remaining storage space of the second device, the network bandwidth of the second device, and the processing capability of the second device.
  • the capability information may also include computing capability and stored I/O speed.
  • the method further includes: the second device sends a first notification message to the first device every preset duration, and the first notification message is used to notify the first device of the first notification message.
  • the second device can notify the first device of the current download progress in time.
  • the method further includes: if the second device determines that it cannot continue to download the data packet fragment during the process of downloading the data packet fragment, sending the second device to the first device A second notification message, where the second notification message is used to notify the first device that the second device cannot continue to download the data packet fragment.
  • the second device can notify the first device of the failure of the second device in time.
  • an embodiment of the present application provides a device for downloading a data package, the device including:
  • the sending unit is configured to send a first request message to x second devices respectively, and to send a second request message to Nx second devices respectively, wherein the first request message is used to request the x second devices
  • the device is assisted to download the data packet through the mobile network, the second request message is used to request the Nx second devices to assist the device to download the data packet through the wireless network, x ⁇ N, x and N are positive integers;
  • receive A unit configured to receive N pieces of capability information from the N second devices, where the N pieces of capability information correspond to the N pieces of second devices one-to-one;
  • a processing unit configured to be based on the N pieces of capability information , Determining a fragmentation strategy, where the fragmentation strategy indicates M data packet fragments in the data packet, and the M data packet fragments correspond to M second devices of the N second devices in a one-to-one correspondence, M is a positive integer, M ⁇ N;
  • the sending unit is further configured to send corresponding fragment download request messages to the M second devices based on the
  • the i-th capability information includes the remaining storage space of the i-th second device, the network bandwidth of the i-th second device, and the network bandwidth of the i-th second device. At least one of processing capabilities.
  • the network bandwidth in each capability information in the capability information corresponding to the M second devices is greater than or equal to a preset minimum network bandwidth threshold, and/or the remaining storage space is greater than or equal to a preset minimum Storage space threshold.
  • the M data packet fragments meet the following conditions:
  • the size of the data packet fragments downloaded by the device is s 0 , s 1 , s 2 , ..., s M represents the M data packet fragments, and S 1 , S 2 , ..., SM represents the The maximum remaining storage space corresponding to the M second devices, B 1 , B 2 , ..., B M represents the network bandwidth corresponding to the M second devices, S represents the size of the data packet, and B represents all For the network bandwidth of the device, B′ represents the average value of the transmission speeds of the M second devices respectively transmitting corresponding data packet fragments to the device.
  • the device further includes: a display unit, configured to: after receiving N pieces of capability information from the N second devices, display the N pieces of capability information on a display screen;
  • the receiving unit is further configured to receive a user instruction, and the user instruction indicates M second devices selected from the N second devices.
  • the device further includes: a display unit, configured to: after receiving N pieces of capability information from the N second devices, display M pieces of capability information on a display screen; The pieces of capability information are selected by the processing unit from the N pieces of capability information based on preset rules; the receiving unit is also configured to receive a user instruction that indicates that the M number selected by the device is agreed to Two devices, the M second devices have a one-to-one correspondence with the M capability information.
  • a display unit configured to: after receiving N pieces of capability information from the N second devices, display M pieces of capability information on a display screen; The pieces of capability information are selected by the processing unit from the N pieces of capability information based on preset rules; the receiving unit is also configured to receive a user instruction that indicates that the M number selected by the device is agreed to Two devices, the M second devices have a one-to-one correspondence with the M capability information.
  • the receiving unit is further configured to receive a first notification message from the i-th second device, and the first notification message is used to notify the device of the i-th device The size of the data packet segment currently downloaded by the second device; and/or, the receiving unit is further configured to receive a second notification message from the i-th second device, where the second notification message is used for Notifying the apparatus that the i-th second device cannot continue to download the data packet fragment corresponding to the i-th second device.
  • the processing unit is further configured to: after receiving the M data packet fragments from the M second devices, if the receiving unit downloads the data packet fragments from the server, The data packet fragments downloaded by the receiving unit and the M data packet fragments are combined into a data packet; the processing unit is further configured to: when receiving the M data packets from the M second devices After the fragments, if the receiving unit does not download any data packet fragments of the data packet from the server, the M data packet fragments are combined into a data packet.
  • the processing unit is further configured to: after the data packet is synthesized, the processing unit generates check information from the synthesized data packet, and transmits the check information through the sending unit Sent to the server; the receiving unit is further configured to receive a response message from the server, the response message indicating that the synthesized data packet has passed the verification.
  • an embodiment of the present application provides a device for downloading a data package, the device including:
  • the receiving unit is used to receive a first request message from the first device; the first request message is used to request the apparatus to assist the first device in downloading data packets through the mobile network; the sending unit is used to send The first device sends the capability information of the device; the receiving unit is further configured to receive a fragment download request from the first device, where the fragment download request indicates a data packet fragment corresponding to the device; The receiving unit is further configured to download the data packet fragment from a server through a mobile network, and transmit the data packet fragment to the first device through the sending unit.
  • the device further includes: a display unit, configured to display the first information on the display screen after receiving the first request message from the first device, and the first information is used to solicit the user The opinion is whether to agree to the first request message; the receiving unit is further configured to receive a first user instruction, the first user instruction indicating that the first request message is agreed.
  • the capability information of the device includes at least one of the remaining storage space of the device, the network bandwidth of the device, and the processing capability of the device.
  • the sending unit is further configured to send a first notification message to the first device every preset duration, and the first notification message is used to notify the first device of the device The size of the currently downloaded data packet fragment; or the sending unit is further configured to send a first notification message to the first device every time the preset proportion of the data packet fragment is downloaded, the first notification The message is used to notify the first device of the size of the data packet fragment currently downloaded by the device.
  • the sending unit is further configured to send the second device to the first device if the processing unit determines that it cannot continue to download the data packet fragment during the process of downloading the data packet fragment.
  • a notification message where the second notification message is used to notify the first device that the device cannot continue to download the data packet fragment.
  • a device provided by an embodiment of the present application includes: one or more processors and a memory, where program instructions are stored in the memory, and when the program instructions are executed by the device, the above-mentioned first aspect of the embodiments of the present application is implemented And any possible design method involved in the first aspect, or any possible design method involved in the foregoing second aspect and the second aspect of the embodiments of the present application.
  • a chip provided by an embodiment of the present application is coupled to a memory in a device, so that the chip invokes program instructions stored in the memory during operation to implement the first aspect of the embodiment of the present application.
  • a computer storage medium stores program instructions.
  • the program instructions run on an electronic device, the device executes the first aspect and the first aspect of the embodiment of the present application. Any possible design method involved in the aspect or a method for realizing the foregoing second aspect and any possible design involved in the second aspect of the embodiments of the present application.
  • a computer program product of an embodiment of the present application when the computer program product is run on an electronic device, causes the electronic device to execute and implement the above-mentioned first aspect of the embodiment of the present application and any tasks involved in the first aspect.
  • Figure 1 is a schematic diagram of the application scenario in this application.
  • Figure 2 is a schematic diagram of device A downloading the latest version of the upgrade package in this application;
  • FIG. 3 is a schematic diagram of the structure of the mobile phone 100 in this application.
  • FIG. 4 is a flowchart of the method for downloading data packets in this application.
  • Figure 5 is one of the schematic diagrams of assisting device A to download data packets from the server in this application;
  • Figure 6 is the second schematic diagram of assisting device A in downloading data packets from the server in this application.
  • Figure 7(a) is one of the state diagrams of the download assistance function in this application.
  • Figure 7(b) is the second schematic diagram of the status of the download assistance function in this application.
  • Figure 8(a) is one of the schematic diagrams of the interface used to solicit user opinions in this application for assisting the first device to download data packets through the mobile network;
  • Figure 8(b) is the second schematic diagram of the interface used to solicit user opinions in this application for all assisting the first device to download data packets through the mobile network;
  • Figure 8(c) is a schematic diagram of the interface used to solicit user opinions in this application for all assisting other devices to download data packets through the mobile network;
  • FIG. 9 is a schematic diagram of the interface of N capability information in this application.
  • FIG. 10 is a schematic diagram of the modules of the assisting downloading subsystem in this application.
  • FIG. 11 is a schematic structural diagram of a device in this application.
  • Figure 12 is a schematic structural diagram of a device in this application.
  • the embodiment of the application can be applied to a scenario where the first device downloads a data package when the first device is in normal use, or a scenario where a full mirror upgrade package needs to be downloaded for repair when the first device cannot be used normally.
  • a full mirror upgrade package needs to be downloaded for repair when the first device cannot be used normally.
  • the operating system currently used by the first device is a standby operating system. Although the function of the standby operating system is relatively simple, the method provided in the embodiment of the present application can also be used.
  • the method for downloading data packets can be applied to the scenario shown in FIG. 1.
  • FIG. 1 it is a schematic diagram of the system architecture of an embodiment of the application.
  • the system includes at least a server, a first device, and N second devices, where N is a positive integer.
  • the server saves the data package.
  • the data package may refer to an OTA upgrade package or an OTA patch package in the OTA technology, or an upgrade package or patch package of other application systems, or a software upgrade package or patch package, etc.
  • the first device may also be called the requesting device, and the second device may also be called the answering device or the responding device.
  • the names of the first device and the second device are not limited in this application.
  • the above-mentioned first device and N second devices may refer to terminal devices in a general sense, such as mobile phones, tablet computers, notebook computers, smart watches, televisions, smart speakers, in-vehicle systems, computers and other electronic devices.
  • the first device and the N second devices may be equipped with the same operating system or different operating systems.
  • the operating systems here include but are not limited to Or other operating systems.
  • the first device and the N second devices may be located within the coverage of the same local area network.
  • the first device and the N second devices are both located within the coverage of a home network.
  • the first device and the N second devices are both located within the coverage of a home network.
  • the two devices are both located within the coverage of a public wireless network, that is to say, generally, the first device and the N second devices are mutually trusted devices.
  • the first device and the N second devices may also be located in the coverage areas of different local area networks, which is not limited in this application.
  • the left side of Fig. 2 is a schematic diagram of the device A downloading the latest version of the upgrade package in the prior art.
  • the right side of FIG. 2 is a schematic diagram of device A downloading the latest version of the upgrade package using the method provided in the embodiment of the present application.
  • device A is a mobile phone
  • device 1 is a notebook computer
  • device 2 is a desktop computer
  • device 3 is a tablet computer
  • device n is another mobile phone.
  • device A sends a request to download the latest version of the upgrade package to the upgrade server
  • the upgrade server sends a confirmation response to device A.
  • Device A downloads the latest version of the upgrade package from the upgrade server.
  • the upgrade package contains a large number of bits, it often For GB calculations, using the method on the left side of Figure 2 to download the upgrade package will cause the download time to be too long and affect the user experience.
  • Use the method on the right side of Figure 2 to download the upgrade package because N devices can assist device A to download the upgrade from the upgrade server Therefore, the download speed of the upgrade package can be improved, the download time of the upgrade package can be shortened, and the user experience can be improved.
  • FIG. 3 shows a schematic diagram of the structure of the mobile phone 100.
  • the second device may also be a mobile phone, or the second device may be other devices such as a tablet computer, a notebook computer, and a TV.
  • the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 151, wireless communication module 152, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a gyroscope sensor 180A, an acceleration sensor 180B, a fingerprint sensor 180H, a temperature sensor 180J, and a touch sensor 180K (Of course, the mobile phone 100 may also include other sensors, such as a pressure sensor, an acceleration sensor, a gyroscope sensor, and a color temperature sensor. , Bone conduction sensors, etc., not shown in the figure).
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100.
  • the mobile phone 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal.
  • AP application processor
  • GPU graphics processing unit
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the mobile phone 100. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may run the method for downloading data packages provided in the embodiments of the present application to solve the problem of too long download time of the upgrade package and improve user experience.
  • the processor 110 integrates different devices, such as a CPU and a GPU
  • the CPU and GPU can cooperate to execute the method for downloading data packets provided in the embodiments of the present application. For example, some methods of the method for downloading data packets are executed by the CPU, and the other methods are executed by the CPU. Executed by the GPU.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the mobile phone 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the camera 193 (front camera or rear camera) is used to capture still images or videos.
  • the camera 193 may include photosensitive elements such as a lens group and an image sensor, where the lens group includes a plurality of lenses (convex lens or concave lens) for collecting light signals reflected by the object to be photographed and transmitting the collected light signals to the image sensor .
  • the image sensor generates an original image of the object to be photographed according to the light signal. After the camera 193 collects the original image, it can send the original image to the processor 110.
  • the processor 110 may capture a user image through the camera 193 when the user input is detected.
  • the camera 193 shown in FIG. 1 may include 1-N cameras.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store operating system, application code, etc.
  • the data storage area may store data packets in the embodiments of the present application.
  • the internal memory 121 may also store the code of the method for downloading data packets provided in the embodiments of the present application.
  • the code of the method for downloading the data package stored in the internal memory 121 is executed by the processor 110, the problem of too long download time of the upgrade package is solved, and the user experience is improved.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • the code of the method for downloading data packets provided in the embodiments of the present application can also be stored in an external memory.
  • the processor 110 may run the code of the method for invoking the service stored in the external memory through the external memory interface 120.
  • the function of the sensor module 180 is described below.
  • the gyro sensor 180A can be used to determine the movement posture of the mobile phone 100.
  • the angular velocity of the mobile phone 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180A can be used to detect the current motion state of the mobile phone 100, such as shaking or static.
  • the acceleration sensor 180B can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes). That is, the gyro sensor 180A can be used to detect the current motion state of the mobile phone 100, such as shaking or static.
  • the gyroscope sensor 180A (or acceleration sensor 180B) may send the detected motion state information (such as angular velocity) to the processor 110.
  • the processor 110 determines whether it is currently in the hand-held state or the tripod state based on the motion state information (for example, when the angular velocity is not 0, it means that the mobile phone 100 is in the hand-held state).
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the mobile phone 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor may transfer the detected touch operation to the processor 110 to determine the type of the touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the mobile phone 100, which is different from the position of the display screen 194.
  • the wireless communication function of the mobile phone 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 151, the wireless communication module 152, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 151 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the mobile phone 100.
  • the mobile communication module 151 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 151 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 151 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 151 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 152 can provide applications on the mobile phone 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellite systems. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 152 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 152 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 152 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the mobile communication module 151 and the wireless communication module 152 can send a first request message, receive N pieces of capability information, send a fragment download request, and so on.
  • the mobile phone 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
  • the mobile phone 100 can receive the key 190 input, and generate key signal input related to the user settings and function control of the mobile phone 100.
  • the mobile phone 100 can use the motor 191 to generate a vibration notification (such as an incoming call vibration notification).
  • the indicator 192 in the mobile phone 100 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 in the mobile phone 100 is used to connect to the SIM card.
  • the SIM card can be connected to and separated from the mobile phone 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195.
  • the mobile phone 100 may include more or less components than those shown in FIG. 3, which is not limited in the embodiment of the present application.
  • the term “when" may be interpreted as meaning “if" or “after” or “in response to determining" or “in response to detecting".
  • the phrase “when determining" or “if detected (statement or event)” can be interpreted as meaning “if determined" or “in response to determining" or “when detected (Condition or event stated)” or “in response to detection of (condition or event stated)”.
  • FIG. 4 is a flowchart of a method for downloading a data packet provided by an embodiment of the present application.
  • the first device sends the first request message to N second devices.
  • the first device and the N second devices are located in the same network.
  • the network can be a wired network or a wireless network.
  • the first device and the N second devices can communicate with each other, and the first device can communicate with the N second devices.
  • the second device sends a broadcast message, and the first device may also receive feedback messages respectively sent by N second devices.
  • Step 401 The first device sends a first request message to x second devices, and sends a second request message to Nx second devices, where the first request message is used to request x second devices to pass through the mobile network.
  • the first device is assisted to download the data packet, and the second request message is used to request Nx second devices to assist the first device to download the data packet through the wireless network, x ⁇ N, and x and N are positive integers.
  • the first device may request the N second devices through the first request message to assist the first device in downloading the data packet through the mobile network.
  • device 1 to device n assist device A in downloading data packets from the server, where device 1 downloads the data packet fragments corresponding to device 1 from the server through the mobile bandwidth of the mobile company, and device 2 downloads the data packet fragments from the server through the mobile bandwidth of China Unicom.
  • the data packet fragment corresponding to device 2 the device 3 downloads the data packet fragment corresponding to device 3 from the server through the mobile bandwidth of the telecommunications company, ..., the device n downloads the data packet fragment corresponding to device n from the server through the mobile bandwidth of other companies.
  • the first device may request x second devices through the first request message to assist the first device in downloading data packets through the mobile network, and at the same time, the first device may request Nx second devices through the wireless network through the second request message.
  • the network assists the first device to download the data packet, where Nx ⁇ N.
  • device 1 to device n assist device A in downloading data packets from the server, where device 1 downloads the data packet fragments corresponding to device 1 from the server through the mobile company's mobile bandwidth, and device 2 downloads from the server through the mobile bandwidth of China Unicom.
  • the data packet fragment corresponding to device 2 the device 3 downloads the data packet fragment corresponding to device 3 from the server through the mobile bandwidth of the telecommunications company,..., the device n downloads the data packet fragment corresponding to device n from the server through the WiFi hotspot.
  • the first device may request N second devices to preferentially assist the first device in downloading data packets through the mobile network through a third request message, where the third request message is used to request the second device to preferentially assist through the mobile network.
  • the first device downloads the data package.
  • Step 402a The second device a receives the first request message from the first device, and sends the capability information of the second device a to the first device.
  • the second device a may also receive a second request message from the first device, and send the capability information of the second device a to the first device.
  • the second device a may also receive the third request message from the first device, and send the capability information of the second device a to the first device. If the second device receives the third request message from the first device, the second device a may determine whether to assist the first device in downloading the data packet through the mobile network based on its configuration or user instructions.
  • the second device a receives the first request message from the first device and sends the capability information of the second device a to the first device as an example.
  • the second device a before the second device a receives the first request message from the first device, the second device a can choose to enable the download assistance function, as shown in Figure 7(a), in Figure 7( a)
  • the download assist function is turned on.
  • the second device a does not enable the download assistance function, as shown in FIG. 7(b), and the download assistance function is turned off in FIG. 7(b).
  • the second device a may send a response message to the first device, and the response message is used to reject the first request message of the first device, or the second device a may not send the capability information of the second device a to the first device.
  • the second device a has a download assistance function by default.
  • the second device a may display the first information on the display screen, and the first information is used to solicit the user’s opinion whether to agree to the first request.
  • the request message is shown in Figure 8(a).
  • the second device a may receive a user instruction. If the user instruction indicates to agree to the first request message, as shown in Figure 8(a), if the user selects "Yes", the second device a sends a second request message to the first device. Capability information of device a.
  • the second device a sends a response message to the first device, and the response message is used to reject the first device's request.
  • the first request message or the second device a may not send the capability information of the second device a to the first device.
  • the second device a may display the second information on the display screen, and the second information is used to solicit the user’s opinion whether to agree to all applications.
  • the mobile network assists the first device to download the request message of the data packet, as shown in Figure 8(b). Further, the second device a may receive a user instruction.
  • the second device a sends the capability information of the second device a to the first device, and if the user instruction indicates to agree to all request messages to assist the first device in downloading data packets through the mobile network, the second device a will only receive the first device for the first time. After a request message, the second message is displayed on the display screen. When the second device a receives the first request message sent by the first device next time, the second device a no longer displays information to prompt the user to receive the first request message.
  • the second device a will send the request to the first device a
  • the device sends the capability information of the second device a, and when the second device a receives the first request message sent by the first device next time, the second device a again displays the second information on the display screen.
  • the second device a sends a response message to the first device The response message is used to reject the first request message of the first device, or the second device a may not send the capability information of the second device a to the first device.
  • the second device a may display third information on the display screen, and the third information is used to solicit the user’s opinion whether to agree to all
  • the request message for assisting other devices to download data packets through the mobile network is shown in Figure 8(c). Further, the second device a may receive a user instruction.
  • the second device a sends the capability information of the second device a to the first device, and if the user instruction indicates to agree to all requests to assist other devices in downloading data packets through the mobile network, the second device a will only receive the first request for the first time After the message, the third message is displayed on the display screen. When the second device a next receives the first request message sent by other devices (including the first device), the second device a no longer displays information to prompt the user to receive the first request message.
  • the second device a will send a request to the first device a
  • the device sends the capability information of the second device a
  • the second device a next time the second device a receives the first request message sent by the first device, the second device a again displays the third information on the display screen.
  • the user instruction indicates that all request messages to assist other devices in downloading data packets through the mobile network are not approved, as shown in Figure 8(c)
  • the second device a sends a response message to the first device.
  • the response message is used to reject the first request message of the first device, or the second device a may not send the capability information of the second device a to the first device.
  • the capability information of the second device a indicates the idle resources and capabilities of the second device a.
  • the capability information of the second device a includes at least remaining storage space and network bandwidth.
  • the capability information of the second device a may also include computing capability (that is, CPU processing capability), stored I/O speed, and the like. It should be understood that this is only an example, and the capability information of the second device a may also include other capability parameters, and the foregoing content is not a limitation of this application.
  • Step 402b The second device b receives the first request message from the first device, and sends the capability information of the second device b to the first device.
  • the specific processing procedure of the second device b is similar to the specific processing procedure of the above-mentioned second device a.
  • Step 403 The first device determines a fragmentation strategy based on the N pieces of capability information, the fragmentation strategy indicates the M data packet fragments in the data packet, and the M data packet fragments and the N second devices There are M second devices in one-to-one correspondence, M is a positive integer, and M ⁇ N.
  • the first device determines the M pieces of capability information based on the N pieces of capability information.
  • the network bandwidth in each capability information in the capability information respectively corresponding to the M second devices is greater than or equal to the preset minimum network bandwidth threshold, and/or the remaining storage space is greater than or equal to the preset minimum storage space threshold.
  • the first device determines whether the second device a is capable of assisting the first device in downloading data packets , And determine whether the second device b is capable of assisting the first device to download the data package.
  • the first device can determine whether the second device a is capable of assisting the first device in downloading data packets based on the network bandwidth of the second device a.
  • the first device may determine whether the second device a is capable of assisting the first device to download the data package based on the remaining storage space of the second device a. For example, if the current remaining storage space of the second device a is small, such as less than the preset minimum storage space threshold, the second device a cannot meet the storage requirements of the downloaded data packet fragments, and the first device may give up requesting the second device aAssist in downloading the data package.
  • the first device may also use but not limited to the following methods to determine the M second devices:
  • Step 1 Normalize the parameter value of each ability parameter in the ability information according to formula (1) to obtain the normalized value of each ability parameter.
  • Vmax represents the maximum parameter value of the kth capability parameter in the N capability information
  • Va represents the minimum parameter value of the kth capability parameter in the N capability information
  • Vi represents the first capability information corresponding to the i-th second device.
  • the capability information of the device 1 includes that the remaining storage space is 5G and the network bandwidth is 100Mb/s.
  • the capability information of device 2 includes the remaining storage space of 1G and the network bandwidth of 500Mb/s, and the capability information of device 3 includes the remaining storage space of 2G and the network bandwidth of 200Mb/s.
  • Step 2 Assuming that the importance of each capability parameter in the capability information is the same, calculate the comprehensive capability value of each second device based on the above calculation result and formula (2).
  • Vwt represents the comprehensive capability value of the i-th second device.
  • the capability information of the device 1 includes that the remaining storage space is 5G and the network bandwidth is 100Mb/s.
  • the first device can also divide the importance of each capability parameter into different levels, that is, assign different weights.
  • the first device calculates the comprehensive capability value based on the different weights of the different capability parameters, for example, assuming that the remaining The weight of storage space is 0.4, and the weight of network bandwidth is 0.6.
  • the comprehensive capability value of device 1 is 0.2
  • the comprehensive capability value of device 2 is 0.3
  • the comprehensive capability value of device 3 is 0.25.
  • Step 3 Determine M second devices according to the preset comprehensive ability value threshold and the comprehensive ability values corresponding to the N second devices, where the comprehensive ability value of each second device in the M second devices is greater than or equal to The comprehensive ability value threshold is preset.
  • the capability information of the device 1 includes that the remaining storage space is 5G and the network bandwidth is 100Mb/s.
  • the capability information of device 2 includes the remaining storage space of 1G and the network bandwidth of 500Mb/s.
  • the capability information of device 3 includes the remaining storage space of 2G and the network bandwidth of 100Mb/s, assuming the importance of each capability parameter in the capability information Same, the comprehensive capability value of device 1 is 0.5, the comprehensive capability value of device 2 is 0.5, and the comprehensive capability value of device 3 is 0.25.
  • the preset comprehensive capability value threshold is 0.2
  • the first device may also determine the M second devices in combination with other factors. For example, if the first device determines from the historical record that the second device a assists the first device in downloading data packets 10 times, of which 7 times the download is interrupted due to the failure or abnormality of the second device a, the first device can abandon the request The second device a assists in downloading the data package.
  • the first device displays M capability information on the display screen; the M capability information is the first device Filtered from N pieces of capability information based on preset rules; the first device receives a user instruction, and the user instruction indicates M second devices that agree to the first device's selection, M second devices, and M capability information One-to-one correspondence.
  • the first device may determine M second devices based on the method shown in steps 1 to 3 above, and display the capability information corresponding to the M second devices on the display screen, that is, the first device recommends the user For the optimal second device combination, the user can choose to agree with the second device combination recommended by the first device or disagree with the second device combination recommended by the first device.
  • the fragmentation strategy is determined based on the capability information of the M second devices, wherein the M data packet fragments meet the following conditions:
  • s 1 , s 2 , ..., s M represent the M data packet fragments
  • S 1 , S 2 , ..., S M represent the maximum remaining storage space corresponding to the M second devices, respectively
  • B 1 , B 2 , ..., B M represents the network bandwidth corresponding to the M second devices
  • S represents the size of the data packet
  • B represents the network bandwidth of the first device
  • the optimal si value can be obtained iteratively.
  • the first device does not participate in the download of the data packet. After the first device determines the size of the M data packet fragments, the first device needs to further determine the start position (and/or end position) of each data packet fragment.
  • the first device can also participate in downloading data packets. Assuming that the size of the data packet fragment downloaded by the first device is s 0 , the above condition is replaced with:
  • the foregoing method of generating a fragmentation strategy by the first device is only an example and is not a limitation of this application.
  • the first device may also determine the fragmentation strategy based on other methods.
  • Step 404 The first device respectively sends corresponding fragment download requests to the M second devices based on the fragmentation strategy.
  • the fragment download request corresponding to the i-th second device indicates the data packet fragment corresponding to the i-th second device, i is a positive integer, and i ⁇ M.
  • the first device sends a fragment download request to the second device a
  • the fragment download request indicates the data packet fragment corresponding to the second device.
  • the fragment download request includes the size and starting position of the data packet fragment (And/or end position).
  • Step 405a The second device a receives the fragment download request corresponding to the second device a from the first device, and downloads the fragment corresponding to the second device a from the server through the mobile network based on the fragment download request corresponding to the second device a The data packet fragment corresponding to the second device a indicated by the download request.
  • the second device a receives the second request message from the first device, then the second device a downloads the data corresponding to the second device a from the server via the wireless network based on the fragment download request corresponding to the second device a.
  • the second device a can determine whether to assist the first device in downloading the data packet through the mobile network based on its own configuration or user instructions, and if so, the second device a downloads the data packet fragments corresponding to the second device a indicated by the second device a from the server via the mobile network based on the fragment download request corresponding to the second device a, otherwise, the second device a is based on the second device a
  • the segment download request corresponding to the device a downloads the data packet segment corresponding to the second device a indicated by the segment download request corresponding to the second device a from the server through the wireless network.
  • the second device a may send a first notification message to the first device every preset period of time, and the first notification message is used to notify the first device of the size of the data packet segment currently downloaded.
  • the preset duration may be 1 minute, and the second device a sends a first notification message to the first device every 1 minute, and the first notification message is used to notify the first device of the size of the data packet fragment currently downloaded.
  • the second device a may send a first notification message to the first device every time a preset proportion of data packet fragments to be downloaded is completed, and the first notification message is used to notify the first device.
  • the size of the data packet fragments currently downloaded by a device may also include the average download speed, and/or the waiting time to complete the download, etc.
  • the preset ratio may be 20%, and when the second device a downloads 20% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, and the first notification message indicates that the second device a has 20% of the data packet fragments that need to be downloaded when the download is complete; when the second device a completes the download of 40% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, and the first notification message indicates the second device a has downloaded 40% of the data packet fragments that need to be downloaded; when the second device a has downloaded 60% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, and the first notification message indicates the first notification message.
  • the second device a has downloaded 60% of the data packet fragments that need to be downloaded; when the second device a has downloaded 80% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, the first notification message Indicate that the second device a has downloaded 80% of the data packet fragments that need to be downloaded; when the second device a has downloaded 100% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, and the first device a
  • the notification message indicates that the second device a has downloaded 100% of the data packet fragments required to be downloaded.
  • the second device a if the second device a encounters an abnormal situation in the process of downloading data packet fragments, such as a sudden failure of the second device a, the second device a cannot continue to assist the first device in downloading the data packet.
  • the second device a Send a second notification message to the first device, where the second notification message is used to notify the first device that the second device a cannot continue to assist the first device in downloading the data packet.
  • the first device can choose to download the data packet fragment corresponding to the second device a by itself, or select another second device to take over the download task (that is, the data packet fragment corresponding to the second device a).
  • Step 405b The second device b receives the fragment download request corresponding to the second device b from the first device, and downloads the fragment corresponding to the second device b from the server through the mobile network based on the fragment download request corresponding to the second device b Download the packet fragment indicated by the request.
  • the specific processing process of the second device b is similar to the specific processing process of the second device a described above. For details, please refer to the content in step 404a, and the repetition will not be repeated.
  • Step 406a The second device a transmits the downloaded data packet fragment corresponding to the second device a to the first device.
  • the second device a may transmit the downloaded data packet fragments to the first device in a wired or wireless manner.
  • the second device a transmits the downloaded data packet fragments to the first device through a data line.
  • the second device a establishes a Bluetooth connection with the first device, and transmits the downloaded data packet fragments via Bluetooth.
  • the second device a can transmit the downloaded data packet via WiFi.
  • Step 406b The second device b transmits the downloaded data packet fragment corresponding to the second device b to the first device.
  • the specific processing process of the second device b is similar to the specific processing process of the second device a described above. For details, please refer to the content in step 405a, and the repetition will not be repeated.
  • Step 407 The first device combines the received N data packet fragments into a complete data packet.
  • the first device downloads a data packet fragment from a server, the first device combines the first fragment and the M data packet fragments into the data packet; If the device does not download any data packet fragment of the data packet from the server, the first device combines the M data packet fragments into the data packet.
  • the first device needs to verify the integrity of the data packet and/or the version of the data packet.
  • the first device after the first device synthesizes the data packet, the first device generates verification information based on the synthesized data packet, and sends the verification information to the server; The first device receives a response message from the server, where the response message indicates that the synthesized data packet passes the verification.
  • the first device calculates a check value, such as a Message-Digest Algorithm (MD5) value, and the server also calculates a check value. If the two calculation results are the same, it indicates that the integrity check passes.
  • a check value such as a Message-Digest Algorithm (MD5) value
  • an embodiment of the present application provides a device that includes a user authorization interface 1001.
  • the user authorization interface 1001 is used to display FIG. 8(a), FIG. 8(b), and FIG. 8(c), the content shown in Figure 9.
  • the device also includes a download assistance subsystem, and the system includes a request assistance module 1002, a fragmentation strategy module 1003, an exception handling module 1004, a request response module 1005, and a download assistance module 1006.
  • the request assistance module 1002 is used to perform steps 401 and 404
  • the fragmentation strategy module 1003 is used to perform step 403
  • the exception handling module 1004 is used to perform when the second device cannot continue to assist the first device in downloading data packets.
  • the request response module 1005 is used to perform step 402a and step 402b
  • the assist download module 1006 is used to perform step 405a and step 406a, step 405b and step 406b.
  • the request response module 1005 is used to perform step 402a and step 402b
  • the assist download module 1006 is used to perform step 405a and step 406a, step 405b and step 406b.
  • the first device can utilize the idle capabilities of the M second devices to implement fast downloading of data packets, which can effectively shorten the time for downloading data packets.
  • the method provided in the embodiments of the present application is introduced from the perspective of the first device and the second device as the execution subject.
  • the first device and the second device may include a hardware structure and/or a software module, and the foregoing may be implemented in the form of a hardware structure, a software module, or a hardware structure plus a software module.
  • Each function. Whether a certain function of the above-mentioned functions is executed by a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraint conditions of the technical solution.
  • an embodiment of the present application further provides an apparatus 1100, which includes a processing unit 1101, a sending unit 1102, and a receiving unit 1103.
  • the apparatus 1100 is used to implement the function of the first device in the foregoing method.
  • the device may be the first device, or a device in the first device, such as a chip system.
  • the sending unit 1102 is configured to send a first request message to x second devices, and send a second request message to Nx second devices, where the first request message is used to request the x
  • the second device assists the device to download the data packet through the mobile network
  • the second request message is used to request the Nx second devices to assist the device to download the data packet through the wireless network
  • x ⁇ N, x and N are positive Integer
  • the receiving unit 1103 is configured to receive N pieces of capability information from the N second devices, where the N pieces of capability information correspond to the N second devices on a one-to-one basis;
  • the processing unit 1101 is configured to determine a fragmentation strategy based on the N pieces of capability information, the fragmentation strategy indicating M data packet fragments in the data packet, and the M data packet fragments and the N th
  • the M second devices in the second device have a one-to-one correspondence, M is a positive integer, and M ⁇ N;
  • the sending unit 1102 is further configured to send corresponding fragment download request messages to the M second devices respectively based on the fragmentation strategy; wherein, the fragment download request message corresponding to the i-th second device indicates Data packet fragments corresponding to i second devices, i is a positive integer, i ⁇ M;
  • the receiving unit 1103 is further configured to receive the M data packet fragments from the M second devices.
  • the apparatus 1100 is used to implement the function of the second device in the foregoing method.
  • the device may be a second device, or a device in the second device, such as a chip system.
  • the receiving unit 1103 is configured to receive a first request message from a first device; the first request message is used to request the apparatus to assist the first device in downloading data packets through a mobile network;
  • the receiving unit 1103 is further configured to receive a fragment download request from the first device, where the fragment download request indicates a data packet fragment corresponding to the device;
  • the receiving unit 1103 is further configured to download the data packet fragment from a server through a mobile network, and transmit the data packet fragment to the first device through the sending unit.
  • the device 1100 may further include a display unit 1104.
  • the processing unit 1101, the sending unit 1102, the receiving unit 1103, and the display unit 1104 please refer to the record in the above method embodiment.
  • the division of modules in the embodiments of this application is illustrative, and it is only a logical function division. In actual implementation, there may be other division methods.
  • the functional modules in the various embodiments of this application can be integrated into one process. In the device, it can also exist alone physically, or two or more modules can be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software function modules.
  • the device may be a chip system.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the device includes a processor and an interface, and the interface may be an input/output interface.
  • the processor completes the functions of the aforementioned processing unit 1101
  • the interface completes the functions of the aforementioned sending unit 1102 and the receiving unit 1103.
  • the device may also include a memory, where the memory is used to store a program that can be run on the processor, and the processor implements the method of each of the foregoing embodiments when the program is executed by the processor.
  • FIG. 12 shows a device 1200 provided by this application.
  • the device 1200 includes at least one processor 1210, a memory 1220, and a transceiver 1230.
  • the processor 1210 is coupled with the memory 1220 and the transceiver 1230.
  • the coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms for the device , Information exchange between units or modules.
  • the embodiment of the present application does not limit the connection medium between the foregoing transceiver 1230, the processor 1210, and the memory 1220. For example, in the embodiment of the present application in FIG.
  • the memory 1220, the processor 1210, and the transceiver 1230 may be connected by a bus, and the bus may be divided into an address bus, a data bus, and a control bus.
  • the device 1200 further includes a display screen 1240.
  • the memory 1220 is used to store program instructions.
  • the transceiver 1230 is used to receive and/or send messages and so on.
  • the device 1200 executes the method shown in FIG. 4.
  • the memory 1220 is used to store program instructions; when the program instructions stored in the memory 1220 are executed by the processor 1210, the device 1200 executes the method shown in the first device in FIG. 4.
  • the memory 1220 is used to store program instructions; when the program instructions stored in the memory 1220 are executed by the processor 1210, the device 1200 is caused to execute the method shown in the second device in FIG. 4.
  • the processor 1210 may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. Or execute the methods, steps, and logical block diagrams disclosed in the embodiments of the present application.
  • the general-purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the memory 1220 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), For example, random-access memory (RAM).
  • the memory is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.
  • the memory in the embodiments of the present application may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
  • the embodiments of the present application can be implemented by hardware, firmware, or a combination of them.
  • the above-mentioned functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
  • the computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another.
  • the storage medium may be any available medium that can be accessed by a computer.
  • computer-readable media can include RAM, ROM, electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory, CD- ROM) or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other media that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer.
  • EEPROM electrically erasable programmable read-only memory
  • CD- ROM compact disc read-only memory
  • Any connection can suitably become a computer-readable medium.
  • disks and discs include compact discs (CDs), laser discs, optical discs, digital video discs (digital video discs, DVDs), floppy discs, and Blu-ray discs. Disks usually copy data magnetically, while disks use lasers to copy data optically. The above combination should also be included in the protection scope of the computer-readable medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A method and apparatus for downloading a data packet. The method comprises: a first device respectively sends a first request message to x second devices, and respectively sends a second request message to N-x second devices; the first device receives N capacity information from N second devices; the first device determines a sharding strategy on the basis of the N capacity information; the first device respectively sends corresponding sharding download request messages to M second devices on the basis of the sharding strategy; and the first device receives M data packet fragments from the M second devices. Therefore, the first device can utilize the idle capacity of the M second devices to implement quick downloading of the data packet, and the data packet downloading time can be effectively shortened.

Description

一种下载数据包的方法及装置Method and device for downloading data package
相关申请的交叉引用Cross-references to related applications
本申请要求在2019年09月26日提交中国专利局、申请号为201910920129.7、申请名称为“一种下载数据包的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on September 26, 2019, the application number is 201910920129.7, and the application name is "a method and device for downloading data packages", the entire content of which is incorporated herein by reference Applying.
技术领域Technical field
本申请涉及终端领域,尤其涉及一种下载数据包的方法及装置。This application relates to the field of terminals, and in particular to a method and device for downloading data packets.
背景技术Background technique
目前,在空中下载(over-the-air,OTA)技术领域,设备侧发出系统升级申请或者服务器侧推送系统升级要求,设备侧决定是否将系统升级至最新版本,若选择升级则与服务器建立传输连接下载最新升级包。At present, in the field of over-the-air (OTA) technology, the device side issues a system upgrade application or the server side pushes the system upgrade request, the device side decides whether to upgrade the system to the latest version, and if it chooses to upgrade, it will establish a transmission with the server Connect to download the latest upgrade package.
但是,随着每次更新的系统版本承载的新功能越来越多,升级包尺寸随着版本变更越来越大,动辄以GB计算,因此,下载升级包的时间占用了升级时间中的绝大部分的时间。虽然在设备正常使用时可以采取后台下载升级包的策略,但是当设备故障无法正常使用时,则会由于全包镜像的下载时间过长影响用户体验。However, as each updated system version carries more and more new functions, the size of the upgrade package becomes larger and larger with the version change, and is often calculated in GB. Therefore, the time to download the upgrade package takes up the absolute amount of the upgrade time. Most of the time. Although the strategy of downloading the upgrade package in the background can be adopted when the device is in normal use, when the device fails to be used normally, the user experience will be affected due to the long download time of the all-inclusive image.
此外,在升级高峰期,服务器侧虽会增加服务器数目和传输带宽,但是仍不可避免地要采取流量管控手段,因此,即使设备侧通过一些优化策略(例如增加联网带宽,多线程或多进程并发下载等)期望提升升级包下载速度,也可能未必能够有效提升下载速度,造成升级包下载时间过长。In addition, during the peak upgrade period, although the server side will increase the number of servers and transmission bandwidth, it is still inevitable to adopt traffic control measures. Therefore, even if the device side adopts some optimization strategies (such as increasing network bandwidth, multi-threading or multi-process concurrency) Downloading, etc.) It is expected to increase the download speed of the upgrade package, and it may not necessarily be able to effectively increase the download speed, resulting in an excessively long download time of the upgrade package.
发明内容Summary of the invention
本申请实施例提供一种下载数据包的方法及装置,用于解决升级包下载时间过长的问题。The embodiment of the present application provides a method and device for downloading a data package, which are used to solve the problem of too long download time of the upgrade package.
本申请实施例提供一种下载数据包的方法,该方法包括:第一设备向x个第二设备分别发送第一请求消息,以及向N-x个第二设备分别发送第二请求消息,其中,所述第一请求消息用于请求所述x个第二设备通过移动网络协助所述第一设备下载数据包,所述第二请求消息用于请求所述N-x个第二设备通过无线网络协助所述第一设备下载数据包,x≤N,x和N为正整数;所述第一设备接收来自于所述N个第二设备的N个能力信息,所述N个能力信息与所述N个第二设备一一对应;所述第一设备基于所述N个能力信息,确定分片策略,所述分片策略指示所述数据包中的M个数据包片段,所述M个数据包片段与所述N个第二设备中的M个第二设备一一对应,M为正整数,M≤N;所述第一设备基于所述分片策略向所述M个第二设备分别发送对应的分片下载请求消息;其中,第i个第二设备对应的分片下载请求消息指示第i个第二设备对应的数据包片段,i为正整数,i≤M;所述第一设备接收来自于所述M个第二设备的所述M个数据包片段。An embodiment of the present application provides a method for downloading a data packet. The method includes: a first device sends a first request message to x second devices, respectively, and a second request message to Nx second devices, where all The first request message is used to request the x second devices to assist the first device in downloading data packets through a mobile network, and the second request message is used to request the Nx second devices to assist the Nx second devices through a wireless network. The first device downloads a data packet, x≤N, x and N are positive integers; the first device receives N pieces of capability information from the N second devices, and the N pieces of capability information are the same as the N pieces of capability information. The second device has a one-to-one correspondence; the first device determines a fragmentation strategy based on the N pieces of capability information, and the fragmentation strategy indicates M data packet fragments in the data packet, and the M data packet fragments One-to-one correspondence with M second devices in the N second devices, M is a positive integer, and M≤N; the first device sends corresponding messages to the M second devices based on the fragmentation strategy. The fragment download request message of the i-th second device; where the fragment download request message corresponding to the i-th second device indicates the data packet fragment corresponding to the i-th second device, i is a positive integer, i≤M; the first device receives The M data packet fragments from the M second devices.
因此,第一设备可以将M个第二设备的闲置能力利用起来实现数据包快速下载,可以有效缩短数据包下载时间。Therefore, the first device can use the idle capabilities of the M second devices to implement fast downloading of data packets, which can effectively shorten the time for downloading data packets.
在一种可能的设计中,所述第i个能力信息包括所述第i个第二设备的剩余存储空间、所述第i个第二设备的网络带宽、所述第i个第二设备的处理能力中的至少一种。In a possible design, the i-th capability information includes the remaining storage space of the i-th second device, the network bandwidth of the i-th second device, and the network bandwidth of the i-th second device. At least one of processing capabilities.
可选的,能力信息还可以包括计算能力和存储的I/O速度等。Optionally, the capability information may also include computing capability and stored I/O speed.
在一种可能的设计中,所述M个第二设备分别对应的能力信息中的每个能力信息中的网络带宽大于等于预设最小网络带宽阈值,和/或剩余存储空间大于等于预设最小存储空间阈值。In a possible design, the network bandwidth in each capability information in the capability information corresponding to the M second devices is greater than or equal to a preset minimum network bandwidth threshold, and/or the remaining storage space is greater than or equal to a preset minimum Storage space threshold.
采用上述设计可以保证协助第一设备下载数据包的第二设备具备较强的能力,进而能够有效提升数据包的下载速度,缩短数据包的下载时间。Adopting the above design can ensure that the second device that assists the first device to download the data packet has a relatively strong capability, thereby effectively improving the download speed of the data packet and shortening the download time of the data packet.
在一种可能的设计中,所述M个数据包片段满足以下条件:In a possible design, the M data packet fragments meet the following conditions:
Max(s 1/B 1,s 2/B 2,…,s M/B M)+(S-s 0)/B’<(S-s 0)/B; Max(s 1 /B 1 ,s 2 /B 2 ,…,s M /B M )+(Ss 0 )/B'<(Ss 0 )/B;
s 1+s 2+…+s M=(S-s 0),s i≤S is 1 +s 2 +…+s M =(Ss 0 ), s i ≤S i ;
其中,所述第一设备下载的数据包片段的大小为s 0,s 1、s 2、……、s M代表所述M个数据包片段,S 1、S 2、……、S M代表所述M个第二设备分别对应的最大剩余存储空间,B 1、B 2、……、B M代表所述M个第二设备分别对应的网络带宽,S代表所述数据包的大小,B代表所述第一设备的网络带宽,B 代表所述M个第二设备分别将对应的数据包片段传输至所述第一设备的传输速度的平均值。 Wherein, the size of the data packet fragments downloaded by the first device is s 0 , s 1 , s 2 , ..., s M represents the M data packet fragments, and S 1 , S 2 , ..., SM represents The maximum remaining storage space corresponding to the M second devices, B 1 , B 2 , ..., B M represents the network bandwidth corresponding to the M second devices, S represents the size of the data packet, and B Represents the network bandwidth of the first device, and B represents the average value of the transmission speeds of the M second devices respectively transmitting corresponding data packet fragments to the first device.
采用上述设计,通过上述两个约束条件可以迭代得到最优的si值,能够有效提升数据包的下载速度,缩短数据包的下载时间。With the above design, the optimal si value can be obtained iteratively through the above two constraint conditions, which can effectively increase the download speed of the data packet and shorten the download time of the data packet.
在一种可能的设计中,还包括:在所述第一设备接收来自于所述N个第二设备的N个能力信息之后,所述第一设备通过显示屏显示所述N个能力信息;所述第一设备接收用户指令,所述用户指令指示在所述N个第二设备中选择的M个第二设备。In a possible design, the method further includes: after the first device receives the N capability information from the N second devices, the first device displays the N capability information on a display screen; The first device receives a user instruction, and the user instruction indicates M second devices selected from the N second devices.
采用上述设计,可以实现用户自主选择第二设备。With the above design, the user can independently select the second device.
在一种可能的设计中,还包括:在所述第一设备接收来自于所述N个第二设备的N个能力信息之后,所述第一设备通过显示屏显示M个能力信息;所述M个能力信息为所述第一设备基于预设规则从所述N个能力信息中筛选出来的;所述第一设备接收用户指令,所述用户指令指示同意所述第一设备选择的M个第二设备,所述M个第二设备与所述M个能力信息一一对应。In a possible design, the method further includes: after the first device receives the N pieces of capability information from the N second devices, the first device displays the M pieces of capability information on a display screen; the The M pieces of capability information are selected by the first device from the N pieces of capability information based on preset rules; the first device receives a user instruction, and the user instruction indicates that the M pieces of capability information selected by the first device are approved The second device, the M second devices correspond to the M capability information in a one-to-one correspondence.
采用上述设计,第一设备可以为用户提供最优的第二设备组合。With the above design, the first device can provide users with an optimal second device combination.
在一种可能的设计中,还包括:所述第一设备接收来自于所述第i个第二设备的第一通知消息,所述第一通知消息用于通知所述第一设备所述第i个第二设备当前已下载的数据包片段的大小;和/或所述第一设备接收来自于所述第i个第二设备的第二通知消息,所述第二通知消息用于通知所述第一设备所述第i个第二设备无法继续下载所述第i个第二设备对应的数据包片段。In a possible design, the method further includes: the first device receiving a first notification message from the i-th second device, and the first notification message is used to notify the first device of the first notification message. The size of the data packet segment currently downloaded by the i second device; and/or the first device receives a second notification message from the i second device, and the second notification message is used to notify all The i-th second device of the first device cannot continue to download the data packet fragment corresponding to the i-th second device.
采用上述设计,第一设备可以通过第一通知消息及时获知第二设备当前的下载进度,或通过第二通知消息及时获知故障第二设备。With the above design, the first device can learn the current download progress of the second device in time through the first notification message, or learn the faulty second device in time through the second notification message.
在一种可能的设计中,还包括:在所述第一设备接收来自于所述M个第二设备的所述M个数据包片段之后,若所述第一设备从服务器下载数据包片段,则所述第一设备将所述第一设备下载的数据包片段和所述M个数据包片段合成数据包;若所述第一设备未从服务器下载所述数据包的任一数据包片段,则所述第一设备将所述M个数据包片段合成数据包。In a possible design, the method further includes: after the first device receives the M data packet fragments from the M second devices, if the first device downloads the data packet fragments from the server, The first device combines the data packet fragments downloaded by the first device and the M data packet fragments into a data packet; if the first device does not download any data packet fragment of the data packet from the server, Then the first device combines the M data packet fragments into a data packet.
采用上述设计,第一设备可以根据不同场景将数据包片段合成数据包。With the above design, the first device can combine data packet fragments into data packets according to different scenarios.
在一种可能的设计中,还包括:在所述第一设备合成数据包之后,所述第一设备基于合成后的数据包生成校验信息,并将所述校验信息发送至所述服务器;所述第一设备接收来自于所述服务器的响应消息,所述响应消息指示所述合成后的数据包校验通过。In a possible design, the method further includes: after the first device synthesizes the data packet, the first device generates verification information based on the synthesized data packet, and sends the verification information to the server The first device receives a response message from the server, the response message indicating that the synthesized data packet passes the verification.
采用上述设计,第一设备可以校验合成后的数据包的版本以及完整性。With the above design, the first device can verify the version and integrity of the synthesized data packet.
第二方面,本申请实施例提供一种下载数据包的方法,该方法包括:第二设备接收来自于第一设备的第一请求消息;所述第一请求消息用于请求所述第二设备通过移动网络协助所述第一设备下载数据包;所述第二设备向所述第一设备发送所述第二设备的能力信息;所述第二设备接收来自于所述第一设备的分片下载请求,所述分片下载请求指示所述第二设备对应的数据包片段;所述第二设备通过移动网络从服务器下载所述数据包片段,将所述数据包片段传输至所述第一设备。In a second aspect, an embodiment of the present application provides a method for downloading data packets, the method includes: a second device receives a first request message from a first device; the first request message is used to request the second device Assist the first device to download data packets through the mobile network; the second device sends the capability information of the second device to the first device; the second device receives the fragments from the first device A download request, where the fragment download request indicates a data packet fragment corresponding to the second device; the second device downloads the data packet fragment from a server through a mobile network, and transmits the data packet fragment to the first equipment.
采用上述方法,第二设备可以协助第一设备实现加速数据包的下载,缩短数据包下载时间。Using the above method, the second device can assist the first device to accelerate the download of the data packet, and shorten the download time of the data packet.
在一种可能的设计中,还包括:在第二设备接收来自于第一设备的第一请求消息之后,所述第二设备通过显示屏显示第一信息,所述第一信息用于征求用户意见是否同意所述第一请求消息;所述第二设备接收第一用户指令,所述第一用户指令指示同意所述第一请求消息。In a possible design, it further includes: after the second device receives the first request message from the first device, the second device displays the first information on the display screen, and the first information is used to solicit the user The opinion is whether to agree with the first request message; the second device receives a first user instruction, and the first user instruction indicates agreement with the first request message.
采用上述设计,第二设备可以配置协助下载功能,并征得用户同意是否开启该功能。With the above design, the second device can be configured with a download assistance function, and the user's consent is obtained whether to enable the function.
在一种可能的设计中,所述第二设备的能力信息包括所述第二设备的剩余存储空间、所述第二设备的网络带宽、所述第二设备的处理能力中的至少一种。In a possible design, the capability information of the second device includes at least one of the remaining storage space of the second device, the network bandwidth of the second device, and the processing capability of the second device.
可选的,能力信息还可以包括计算能力和存储的I/O速度等。Optionally, the capability information may also include computing capability and stored I/O speed.
在一种可能的设计中,还包括:所述第二设备每隔预设时长向所述第一设备发送第一通知消息,所述第一通知消息用于通知所述第一设备所述第二设备当前已下载的数据包片段的大小;或所述第二设备每当下载完成所述数据包片段的预设比例时向所述第一设备发送第一通知消息,所述第一通知消息用于通知所述第一设备所述第二设备当前已下载的数据包片段的大小。In a possible design, the method further includes: the second device sends a first notification message to the first device every preset duration, and the first notification message is used to notify the first device of the first notification message. The size of the data packet fragment currently downloaded by the second device; or the second device sends a first notification message to the first device every time the preset proportion of the data packet fragment is downloaded, the first notification message Used to notify the first device of the size of the data packet fragment currently downloaded by the second device.
采用上述设计,第二设备可以及时通知第一设备当前下载进度。With the above design, the second device can notify the first device of the current download progress in time.
在一种可能的设计中,还包括:若所述第二设备在下载所述数据包片段的过程中确定无法继续下载所述数据包片段,则所述第二设备向所述第一设备发送第二通知消息,所述第二通知消息用于通知所述第一设备所述第二设备无法继续下载所述数据包片段。In a possible design, the method further includes: if the second device determines that it cannot continue to download the data packet fragment during the process of downloading the data packet fragment, sending the second device to the first device A second notification message, where the second notification message is used to notify the first device that the second device cannot continue to download the data packet fragment.
采用上述设计,第二设备可以及时通知第一设备第二设备发生故障。With the above design, the second device can notify the first device of the failure of the second device in time.
第三方面,本申请实施例提供一种下载数据包的装置,该装置包括:In a third aspect, an embodiment of the present application provides a device for downloading a data package, the device including:
发送单元,用于向x个第二设备分别发送第一请求消息,以及向N-x个第二设备分别发送第二请求消息,其中,所述第一请求消息用于请求所述x个第二设备通过移动网络协助所述装置下载数据包,所述第二请求消息用于请求所述N-x个第二设备通过无线网络协助所述装置下载数据包,x≤N,x和N为正整数;接收单元,用于接收来自于所述N个第二设备的N个能力信息,所述N个能力信息与所述N个第二设备一一对应;处理单元,用于基于所述N个能力信息,确定分片策略,所述分片策略指示所述数据包中的M个数据包片段,所述M个数据包片段与所述N个第二设备中的M个第二设备一一对应,M为正整数,M≤N;所述发送单元,还用于基于所述分片策略向所述M个第二设备分别发送对应的分片下载请求消息;其中,第i个第二设备对应的分片下载请求消息指示第i个第 二设备对应的数据包片段,i为正整数,i≤M;所述接收单元,还用于接收来自于所述M个第二设备的所述M个数据包片段。The sending unit is configured to send a first request message to x second devices respectively, and to send a second request message to Nx second devices respectively, wherein the first request message is used to request the x second devices The device is assisted to download the data packet through the mobile network, the second request message is used to request the Nx second devices to assist the device to download the data packet through the wireless network, x≤N, x and N are positive integers; receive A unit, configured to receive N pieces of capability information from the N second devices, where the N pieces of capability information correspond to the N pieces of second devices one-to-one; a processing unit, configured to be based on the N pieces of capability information , Determining a fragmentation strategy, where the fragmentation strategy indicates M data packet fragments in the data packet, and the M data packet fragments correspond to M second devices of the N second devices in a one-to-one correspondence, M is a positive integer, M≤N; the sending unit is further configured to send corresponding fragment download request messages to the M second devices based on the fragmentation strategy; wherein, the i-th second device corresponds to The fragment download request message indicates the data packet fragment corresponding to the i-th second device, i is a positive integer, i≤M; the receiving unit is further configured to receive the M from the M second devices Packet fragments.
在一种可能的设计中,所述第i个能力信息包括所述第i个第二设备的剩余存储空间、所述第i个第二设备的网络带宽、所述第i个第二设备的处理能力中的至少一种。In a possible design, the i-th capability information includes the remaining storage space of the i-th second device, the network bandwidth of the i-th second device, and the network bandwidth of the i-th second device. At least one of processing capabilities.
在一种可能的设计中,所述M个第二设备分别对应的能力信息中的每个能力信息中的网络带宽大于等于预设最小网络带宽阈值,和/或剩余存储空间大于等于预设最小存储空间阈值。In a possible design, the network bandwidth in each capability information in the capability information corresponding to the M second devices is greater than or equal to a preset minimum network bandwidth threshold, and/or the remaining storage space is greater than or equal to a preset minimum Storage space threshold.
在一种可能的设计中,所述M个数据包片段满足以下条件:In a possible design, the M data packet fragments meet the following conditions:
Max(s 1/B 1,s 2/B 2,…,s M/B M)+(S-s 0)/B’<(S-s 0)/B; Max(s 1 /B 1 ,s 2 /B 2 ,…,s M /B M )+(Ss 0 )/B'<(Ss 0 )/B;
s 1+s 2+…+s M=(S-s 0),s i≤S is 1 +s 2 +…+s M =(Ss 0 ), s i ≤S i ;
其中,所述装置下载的数据包片段的大小为s 0,s 1、s 2、……、s M代表所述M个数据包片段,S 1、S 2、……、S M代表所述M个第二设备分别对应的最大剩余存储空间,B 1、B 2、……、B M代表所述M个第二设备分别对应的网络带宽,S代表所述数据包的大小,B代表所述装置的网络带宽,B’代表所述M个第二设备分别将对应的数据包片段传输至所述装置的传输速度的平均值。 Wherein, the size of the data packet fragments downloaded by the device is s 0 , s 1 , s 2 , ..., s M represents the M data packet fragments, and S 1 , S 2 , ..., SM represents the The maximum remaining storage space corresponding to the M second devices, B 1 , B 2 , ..., B M represents the network bandwidth corresponding to the M second devices, S represents the size of the data packet, and B represents all For the network bandwidth of the device, B′ represents the average value of the transmission speeds of the M second devices respectively transmitting corresponding data packet fragments to the device.
在一种可能的设计中,所述装置还包括:显示单元,用于:在接收来自于所述N个第二设备的N个能力信息之后,通过显示屏显示所述N个能力信息;所述接收单元,还用于接收用户指令,所述用户指令指示在所述N个第二设备中选择的M个第二设备。In a possible design, the device further includes: a display unit, configured to: after receiving N pieces of capability information from the N second devices, display the N pieces of capability information on a display screen; The receiving unit is further configured to receive a user instruction, and the user instruction indicates M second devices selected from the N second devices.
在一种可能的设计中,所述装置还包括:显示单元,用于:在接收来自于所述N个第二设备的N个能力信息之后,通过显示屏显示M个能力信息;所述M个能力信息为所述处理单元基于预设规则从所述N个能力信息中筛选出来的;所述接收单元,还用于接收用户指令,所述用户指令指示同意所述装置选择的M个第二设备,所述M个第二设备与所述M个能力信息一一对应。In a possible design, the device further includes: a display unit, configured to: after receiving N pieces of capability information from the N second devices, display M pieces of capability information on a display screen; The pieces of capability information are selected by the processing unit from the N pieces of capability information based on preset rules; the receiving unit is also configured to receive a user instruction that indicates that the M number selected by the device is agreed to Two devices, the M second devices have a one-to-one correspondence with the M capability information.
在一种可能的设计中,所述接收单元,还用于接收来自于所述第i个第二设备的第一通知消息,所述第一通知消息用于通知所述装置所述第i个第二设备当前已下载的数据包片段的大小;和/或,所述接收单元,还用于接收来自于所述第i个第二设备的第二通知消息,所述第二通知消息用于通知所述装置所述第i个第二设备无法继续下载所述第i个第二设备对应的数据包片段。In a possible design, the receiving unit is further configured to receive a first notification message from the i-th second device, and the first notification message is used to notify the device of the i-th device The size of the data packet segment currently downloaded by the second device; and/or, the receiving unit is further configured to receive a second notification message from the i-th second device, where the second notification message is used for Notifying the apparatus that the i-th second device cannot continue to download the data packet fragment corresponding to the i-th second device.
在一种可能的设计中,所述处理单元,还用于:在接收来自于所述M个第二设备的所述M个数据包片段之后,若所述接收单元从服务器下载数据包片段,则将所述接收单元下载的数据包片段和所述M个数据包片段合成数据包;所述处理单元,还用于:在接收来自于所述M个第二设备的所述M个数据包片段之后,若所述接收单元未从服务器下载所述数据包的任一数据包片段,则将所述M个数据包片段合成数据包。In a possible design, the processing unit is further configured to: after receiving the M data packet fragments from the M second devices, if the receiving unit downloads the data packet fragments from the server, The data packet fragments downloaded by the receiving unit and the M data packet fragments are combined into a data packet; the processing unit is further configured to: when receiving the M data packets from the M second devices After the fragments, if the receiving unit does not download any data packet fragments of the data packet from the server, the M data packet fragments are combined into a data packet.
在一种可能的设计中,所述处理单元,还用于:在合成数据包之后,所述处理单元于合成后的数据包生成校验信息,并通过所述发送单元将所述校验信息发送至所述服务器;所述接收单元,还用于接收来自于所述服务器的响应消息,所述响应消息指示所述合成后的数据包校验通过。In a possible design, the processing unit is further configured to: after the data packet is synthesized, the processing unit generates check information from the synthesized data packet, and transmits the check information through the sending unit Sent to the server; the receiving unit is further configured to receive a response message from the server, the response message indicating that the synthesized data packet has passed the verification.
第四方面,本申请实施例提供一种下载数据包的装置,该装置包括:In a fourth aspect, an embodiment of the present application provides a device for downloading a data package, the device including:
接收单元,用于接收来自于第一设备的第一请求消息;所述第一请求消息用于请求所述装置通过移动网络协助所述第一设备下载数据包;发送单元,用于向所述第一设备发送 所述装置的能力信息;所述接收单元,还用于接收来自于所述第一设备的分片下载请求,所述分片下载请求指示所述装置对应的数据包片段;所述接收单元,还用于通过移动网络从服务器下载所述数据包片段,通过所述发送单元将所述数据包片段传输至所述第一设备。The receiving unit is used to receive a first request message from the first device; the first request message is used to request the apparatus to assist the first device in downloading data packets through the mobile network; the sending unit is used to send The first device sends the capability information of the device; the receiving unit is further configured to receive a fragment download request from the first device, where the fragment download request indicates a data packet fragment corresponding to the device; The receiving unit is further configured to download the data packet fragment from a server through a mobile network, and transmit the data packet fragment to the first device through the sending unit.
在一种可能的设计中,所述装置还包括:显示单元,用于在接收来自于第一设备的第一请求消息之后,通过显示屏显示第一信息,所述第一信息用于征求用户意见是否同意所述第一请求消息;所述接收单元,还用于接收第一用户指令,所述第一用户指令指示同意所述第一请求消息。In a possible design, the device further includes: a display unit, configured to display the first information on the display screen after receiving the first request message from the first device, and the first information is used to solicit the user The opinion is whether to agree to the first request message; the receiving unit is further configured to receive a first user instruction, the first user instruction indicating that the first request message is agreed.
在一种可能的设计中,所述装置的能力信息包括所述装置的剩余存储空间、所述装置的网络带宽、所述装置的处理能力中的至少一种。In a possible design, the capability information of the device includes at least one of the remaining storage space of the device, the network bandwidth of the device, and the processing capability of the device.
在一种可能的设计中,所述发送单元,还用于每隔预设时长向所述第一设备发送第一通知消息,所述第一通知消息用于通知所述第一设备所述装置当前已下载的数据包片段的大小;或所述发送单元,还用于每当下载完成所述数据包片段的预设比例时向所述第一设备发送第一通知消息,所述第一通知消息用于通知所述第一设备所述装置当前已下载的数据包片段的大小。In a possible design, the sending unit is further configured to send a first notification message to the first device every preset duration, and the first notification message is used to notify the first device of the device The size of the currently downloaded data packet fragment; or the sending unit is further configured to send a first notification message to the first device every time the preset proportion of the data packet fragment is downloaded, the first notification The message is used to notify the first device of the size of the data packet fragment currently downloaded by the device.
在一种可能的设计中,所述发送单元,还用于若所述处理单元在下载所述数据包片段的过程中确定无法继续下载所述数据包片段,向所述第一设备发送第二通知消息,所述第二通知消息用于通知所述第一设备所述装置无法继续下载所述数据包片段。In a possible design, the sending unit is further configured to send the second device to the first device if the processing unit determines that it cannot continue to download the data packet fragment during the process of downloading the data packet fragment. A notification message, where the second notification message is used to notify the first device that the device cannot continue to download the data packet fragment.
第五方面,本申请实施例提供的一种设备,包括:一个或多个处理器和存储器,其中存储器中存储有程序指令,当程序指令被设备执行时,实现本申请实施例上述第一方面以及第一方面涉及的任一可能设计的方法,或实现本申请实施例上述第二方面以及第二方面涉及的任一可能设计的方法。In a fifth aspect, a device provided by an embodiment of the present application includes: one or more processors and a memory, where program instructions are stored in the memory, and when the program instructions are executed by the device, the above-mentioned first aspect of the embodiments of the present application is implemented And any possible design method involved in the first aspect, or any possible design method involved in the foregoing second aspect and the second aspect of the embodiments of the present application.
第六方面,本申请实施例提供的一种芯片,所述芯片与设备中的存储器耦合,使得所述芯片在运行时调用所述存储器中存储的程序指令,实现本申请实施例上述第一方面以及第一方面涉及的任一可能设计的方法,或实现本申请实施例上述第二方面以及第二方面涉及的任一可能设计的方法。In a sixth aspect, a chip provided by an embodiment of the present application is coupled to a memory in a device, so that the chip invokes program instructions stored in the memory during operation to implement the first aspect of the embodiment of the present application. And any possible design method involved in the first aspect, or any possible design method involved in the foregoing second aspect and the second aspect of the embodiments of the present application.
第七方面,本申请实施例的一种计算机存储介质,该计算机存储介质存储有程序指令,当所述程序指令在电子设备上运行时,使得设备执行本申请实施例上述第一方面以及第一方面涉及的任一可能设计的方法或实现本申请实施例上述第二方面以及第二方面涉及的任一可能设计的方法。In a seventh aspect, a computer storage medium according to an embodiment of the present application. The computer storage medium stores program instructions. When the program instructions run on an electronic device, the device executes the first aspect and the first aspect of the embodiment of the present application. Any possible design method involved in the aspect or a method for realizing the foregoing second aspect and any possible design involved in the second aspect of the embodiments of the present application.
第八方面,本申请实施例的一种计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行实现本申请实施例上述第一方面以及第一方面涉及的任一可能设计的方法或实现本申请实施例上述第二方面以及第二方面涉及的任一可能设计的方法。In an eighth aspect, a computer program product of an embodiment of the present application, when the computer program product is run on an electronic device, causes the electronic device to execute and implement the above-mentioned first aspect of the embodiment of the present application and any tasks involved in the first aspect. A possible design method or a method for realizing the foregoing second aspect and any possible design involved in the second aspect of the embodiment of the present application.
另外,第三方面至第八方面中任一种可能设计方式所带来的技术效果可参见方法部分相关中不同设计方式所带来的技术效果,此处不再赘述。In addition, the technical effects brought by any one of the possible design methods of the third aspect to the eighth aspect can be referred to the technical effects brought about by different design methods in the related method section, which will not be repeated here.
附图说明Description of the drawings
图1为本申请中应用场景示意图;Figure 1 is a schematic diagram of the application scenario in this application;
图2为本申请中设备A下载最新版本的升级包的示意图;Figure 2 is a schematic diagram of device A downloading the latest version of the upgrade package in this application;
图3为本申请中手机100的结构示意图;FIG. 3 is a schematic diagram of the structure of the mobile phone 100 in this application;
图4为本申请中下载数据包的方法的流程图;Figure 4 is a flowchart of the method for downloading data packets in this application;
图5为本申请中协助设备A从服务器下载数据包的示意图之一;Figure 5 is one of the schematic diagrams of assisting device A to download data packets from the server in this application;
图6为本申请中协助设备A从服务器下载数据包的示意图之二;Figure 6 is the second schematic diagram of assisting device A in downloading data packets from the server in this application;
图7(a)为本申请中协助下载功能的状态示意图之一;Figure 7(a) is one of the state diagrams of the download assistance function in this application;
图7(b)为本申请中协助下载功能的状态示意图之二;Figure 7(b) is the second schematic diagram of the status of the download assistance function in this application;
图8(a)为本申请中用于征求用户意见是否同意通过移动网络协助第一设备下载数据包的界面示意图之一;Figure 8(a) is one of the schematic diagrams of the interface used to solicit user opinions in this application for assisting the first device to download data packets through the mobile network;
图8(b)为本申请中用于征求用户意见是否同意所有通过移动网络协助第一设备下载数据包的界面示意图之二;Figure 8(b) is the second schematic diagram of the interface used to solicit user opinions in this application for all assisting the first device to download data packets through the mobile network;
图8(c)为本申请中用于征求用户意见是否同意所有通过移动网络协助其他设备下载数据包的界面示意图;Figure 8(c) is a schematic diagram of the interface used to solicit user opinions in this application for all assisting other devices to download data packets through the mobile network;
图9为本申请中N个能力信息的界面示意图;Figure 9 is a schematic diagram of the interface of N capability information in this application;
图10为本申请中协助下载子系统的模块示意图;FIG. 10 is a schematic diagram of the modules of the assisting downloading subsystem in this application;
图11为本申请中的一种装置的结构示意图;FIG. 11 is a schematic structural diagram of a device in this application;
图12为本申请中的一种设备的结构示意图。Figure 12 is a schematic structural diagram of a device in this application.
具体实施方式detailed description
下面结合附图,对本申请的实施例进行描述。The embodiments of the present application will be described below in conjunction with the drawings.
本申请实施例可以应用于第一设备正常使用时下载数据包的场景,或者第一设备无法正常使用时需要下载全镜像升级包进行修复的场景。例如,当手机镜像因为刷机、随机存取存储器(random access memory,RAM)跳变、只读存储器(read-only memory)跳变、第三方应用误删文件等原因导致手机无法开机或者开机无法正常使用时,则需要下载全镜像升级包进行修复。应理解的是,当第一设备无法正常使用时,第一设备当前所使用的操作系统为备用操作系统,该备用操作系统的功能虽比较简单,也能采用本申请实施例提供的方法。The embodiment of the application can be applied to a scenario where the first device downloads a data package when the first device is in normal use, or a scenario where a full mirror upgrade package needs to be downloaded for repair when the first device cannot be used normally. For example, when the mirroring of the mobile phone fails to turn on or fails to boot due to reasons such as flashing, random access memory (RAM) transition, read-only memory (read-only memory) transition, and deletion of files by third-party applications by mistake, etc. When using it, you need to download the full mirror upgrade package to repair it. It should be understood that when the first device cannot be used normally, the operating system currently used by the first device is a standby operating system. Although the function of the standby operating system is relatively simple, the method provided in the embodiment of the present application can also be used.
本申请实施例提供的下载数据包的方法可以应用于如图1所示的场景。如图1所示,为本申请实施例的系统架构示意图。该系统至少包括服务器、第一设备和N个第二设备,N为正整数。其中,服务器保存数据包,所述数据包可以是指OTA技术中OTA升级包或OTA补丁包,或者其他应用系统的升级包或补丁包,或者软件升级包或补丁包等,本申请对此不作限定。第一设备又可称为请求设备,第二设备又可称为应答设备或响应设备,本申请对第一设备和第二设备的名称不作限定。在图1中,当第一设备需要从服务器下载数据包时,第一设备请求N个第二设备协助从服务器下载数据包,因此,第一设备可以将N个第二设备的闲置能力利用起来实现数据包快速下载,可以有效缩短数据包下载时间。以下实施例将会详细说明该过程的实现细节。The method for downloading data packets provided in the embodiments of the present application can be applied to the scenario shown in FIG. 1. As shown in FIG. 1, it is a schematic diagram of the system architecture of an embodiment of the application. The system includes at least a server, a first device, and N second devices, where N is a positive integer. Wherein, the server saves the data package. The data package may refer to an OTA upgrade package or an OTA patch package in the OTA technology, or an upgrade package or patch package of other application systems, or a software upgrade package or patch package, etc. This application does not deal with this limited. The first device may also be called the requesting device, and the second device may also be called the answering device or the responding device. The names of the first device and the second device are not limited in this application. In Figure 1, when the first device needs to download data packets from the server, the first device requests N second devices to assist in downloading data packets from the server. Therefore, the first device can use the idle capacity of the N second devices. Realize the fast downloading of the data package, which can effectively shorten the download time of the data package. The following embodiments will describe the implementation details of this process in detail.
其中,上述第一设备和N个第二设备均可以是指一般意义上的终端设备,例如,手机,平板电脑,笔记本电脑,智能手表,电视机、智能音箱、车载系统、计算机等电子设备。第一设备和N个第二设备可以搭载相同的操作系统,或者不同的操作系统。这里的操作系统包括但不限于
Figure PCTCN2020114597-appb-000001
或者其它操作系统。第一设备和N个第二设备可以位于同一个局域网的覆盖范围内,例如,第一设备和N个第二设备均位于一个家庭网络的覆盖范围内,又例如,第一设备和N个第二设备均位于一个公共无线网络覆盖范 围内,也就是说通常情况下,第一设备和N个第二设备之间是相互信任的设备。此外,第一设备和N个第二设备还可以位于不同的局域网的覆盖范围内,本申请对此不作限定。
Among them, the above-mentioned first device and N second devices may refer to terminal devices in a general sense, such as mobile phones, tablet computers, notebook computers, smart watches, televisions, smart speakers, in-vehicle systems, computers and other electronic devices. The first device and the N second devices may be equipped with the same operating system or different operating systems. The operating systems here include but are not limited to
Figure PCTCN2020114597-appb-000001
Or other operating systems. The first device and the N second devices may be located within the coverage of the same local area network. For example, the first device and the N second devices are both located within the coverage of a home network. For example, the first device and the N second devices are both located within the coverage of a home network. The two devices are both located within the coverage of a public wireless network, that is to say, generally, the first device and the N second devices are mutually trusted devices. In addition, the first device and the N second devices may also be located in the coverage areas of different local area networks, which is not limited in this application.
如图2所示,图2左侧为现有技术中设备A下载最新版本的升级包的示意图。图2右侧为采用本申请实施例提供的方法设备A下载最新版本的升级包的示意图。其中,设备A为手机,设备1为笔记本电脑、设备2为台式电脑,设备3为平板电脑,……,设备n为另一部手机。具体的,设备A向升级服务器发送下载最新版本的升级包请求,升级服务器向设备A发送确认响应,设备A从升级服务器下载最新版本的升级包,由于升级包包括的比特数较大,动辄以GB计算,采用如图2左侧的方法下载升级包将会导致下载时间过长影响用户体验,采用如图2右侧的方法下载升级包,由于N个设备可以协助设备A从升级服务器下载升级包,因此可以实现提升升级包下载速度,可以缩短升级包下载时间,进而提升用户体验。As shown in Fig. 2, the left side of Fig. 2 is a schematic diagram of the device A downloading the latest version of the upgrade package in the prior art. The right side of FIG. 2 is a schematic diagram of device A downloading the latest version of the upgrade package using the method provided in the embodiment of the present application. Among them, device A is a mobile phone, device 1 is a notebook computer, device 2 is a desktop computer, device 3 is a tablet computer, ..., device n is another mobile phone. Specifically, device A sends a request to download the latest version of the upgrade package to the upgrade server, and the upgrade server sends a confirmation response to device A. Device A downloads the latest version of the upgrade package from the upgrade server. Since the upgrade package contains a large number of bits, it often For GB calculations, using the method on the left side of Figure 2 to download the upgrade package will cause the download time to be too long and affect the user experience. Use the method on the right side of Figure 2 to download the upgrade package, because N devices can assist device A to download the upgrade from the upgrade server Therefore, the download speed of the upgrade package can be improved, the download time of the upgrade package can be shortened, and the user experience can be improved.
需要说明的是,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。另外,本文中字符“/”,如无特殊说明,一般表示前后关联对象是一种“或”的关系。且在本发明实施例的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。It should be noted that the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the application. It should be understood that in the embodiments of the present application, "one or more" refers to one, two, or more than two; "and/or" describes the association relationship of associated objects, indicating that there may be three relationships; for example, A And/or B, it can mean that: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, the character "/" in this article, unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship. In the description of the embodiments of the present invention, words such as “first” and “second” are only used for the purpose of distinguishing description, and cannot be understood as indicating or implying relative importance, nor as indicating or implying order.
以第一设备是手机为例,图3所示为手机100的结构示意图。应理解的是,第二设备也可以为手机,或者第二设备可以为平板电脑、笔记本电脑、电视等其他设备。Taking the first device as a mobile phone as an example, FIG. 3 shows a schematic diagram of the structure of the mobile phone 100. It should be understood that the second device may also be a mobile phone, or the second device may be other devices such as a tablet computer, a notebook computer, and a TV.
手机100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块151,无线通信模块152,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括陀螺仪传感器180A,加速度传感器180B,指纹传感器180H,温度传感器180J,触摸传感器180K(当然,手机100还可以包括其它传感器,比如压力传感器、加速度传感器、陀螺仪传感器、色温传感器、骨传导传感器等,图中未示出)。The mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 151, wireless communication module 152, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a gyroscope sensor 180A, an acceleration sensor 180B, a fingerprint sensor 180H, a temperature sensor 180J, and a touch sensor 180K (Of course, the mobile phone 100 may also include other sensors, such as a pressure sensor, an acceleration sensor, a gyroscope sensor, and a color temperature sensor. , Bone conduction sensors, etc., not shown in the figure).
可以理解的是,本申请实施例示意的结构并不构成对手机100的具体限定。在本申请另一些实施例中,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
其中,处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是手机100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal. Processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit, NPU) and so on. Among them, the different processing units may be independent devices or integrated in one or more processors. The controller may be the nerve center and command center of the mobile phone 100. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
处理器110可以运行本申请实施例提供的下载数据包的方法,以解决升级包下载时间过长的问题,提高用户体验。当处理器110集成不同的器件,比如集成CPU和GPU时,CPU和GPU可以配合执行本申请实施例提供的下载数据包的方法,比如下载数据包的方法中部分方法由CPU执行,另一部分方法由GPU执行。The processor 110 may run the method for downloading data packages provided in the embodiments of the present application to solve the problem of too long download time of the upgrade package and improve user experience. When the processor 110 integrates different devices, such as a CPU and a GPU, the CPU and GPU can cooperate to execute the method for downloading data packets provided in the embodiments of the present application. For example, some methods of the method for downloading data packets are executed by the CPU, and the other methods are executed by the CPU. Executed by the GPU.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include one or N display screens 194, and N is a positive integer greater than one.
摄像头193(前置摄像头或者后置摄像头)用于捕获静态图像或视频。通常,摄像头193可以包括感光元件比如镜头组和图像传感器,其中,镜头组包括多个透镜(凸透镜或凹透镜),用于采集待拍摄物体反射的光信号,并将采集的光信号传递给图像传感器。图像传感器根据所述光信号生成待拍摄物体的原始图像。摄像头193采集到原始图像后,可以将原始图像发送给处理器110。处理器110可以在检测到用户输入时通过摄像头193拍摄用户图像。另外,图1所示的摄像头193可以包括1-N个摄像头。The camera 193 (front camera or rear camera) is used to capture still images or videos. Generally, the camera 193 may include photosensitive elements such as a lens group and an image sensor, where the lens group includes a plurality of lenses (convex lens or concave lens) for collecting light signals reflected by the object to be photographed and transmitting the collected light signals to the image sensor . The image sensor generates an original image of the object to be photographed according to the light signal. After the camera 193 collects the original image, it can send the original image to the processor 110. The processor 110 may capture a user image through the camera 193 when the user input is detected. In addition, the camera 193 shown in FIG. 1 may include 1-N cameras.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,应用程序的代码等。例如,存储数据区可存储本申请实施例中的数据包。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store operating system, application code, etc. For example, the data storage area may store data packets in the embodiments of the present application.
内部存储器121还可以存储本申请实施例提供的下载数据包的方法的代码。当内部存储器121中存储的下载数据包的方法的代码被处理器110运行时,解决升级包下载时间过长的问题,提高用户体验。The internal memory 121 may also store the code of the method for downloading data packets provided in the embodiments of the present application. When the code of the method for downloading the data package stored in the internal memory 121 is executed by the processor 110, the problem of too long download time of the upgrade package is solved, and the user experience is improved.
此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
当然,本申请实施例提供的下载数据包的方法的代码还可以存储在外部存储器中。这种情况下,处理器110可以通过外部存储器接口120运行存储在外部存储器中的调用服务的方法的代码。Of course, the code of the method for downloading data packets provided in the embodiments of the present application can also be stored in an external memory. In this case, the processor 110 may run the code of the method for invoking the service stored in the external memory through the external memory interface 120.
下面介绍传感器模块180的功能。The function of the sensor module 180 is described below.
陀螺仪传感器180A,可以用于确定手机100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180A确定手机100围绕三个轴(即,x,y和z轴)的角速度。即陀螺仪传感器180A可以用于检测手机100当前的运动状态,比如抖动还是静止。The gyro sensor 180A can be used to determine the movement posture of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 around three axes (ie, x, y, and z axes) can be determined by the gyroscope sensor 180A. That is, the gyro sensor 180A can be used to detect the current motion state of the mobile phone 100, such as shaking or static.
加速度传感器180B可检测手机100在各个方向上(一般为三轴)加速度的大小。即陀螺仪传感器180A可以用于检测手机100当前的运动状态,比如抖动还是静止。The acceleration sensor 180B can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes). That is, the gyro sensor 180A can be used to detect the current motion state of the mobile phone 100, such as shaking or static.
陀螺仪传感器180A(或加速度传感器180B)可以将检测到的运动状态信息(比如角速度)发送给处理器110。处理器110基于运动状态信息确定当前是手持状态还是脚架状 态(比如,角速度不为0时,说明手机100处于手持状态)。The gyroscope sensor 180A (or acceleration sensor 180B) may send the detected motion state information (such as angular velocity) to the processor 110. The processor 110 determines whether it is currently in the hand-held state or the tripod state based on the motion state information (for example, when the angular velocity is not 0, it means that the mobile phone 100 is in the hand-held state).
指纹传感器180H用于采集指纹。手机100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The mobile phone 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给处理器110,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于手机100的表面,与显示屏194所处的位置不同。 Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”. The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor may transfer the detected touch operation to the processor 110 to determine the type of the touch event. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the mobile phone 100, which is different from the position of the display screen 194.
手机100的无线通信功能可以通过天线1,天线2,移动通信模块151,无线通信模块152,调制解调处理器以及基带处理器等实现。The wireless communication function of the mobile phone 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 151, the wireless communication module 152, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。手机100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块151可以提供应用在手机100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块151可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块151可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块151的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块151的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 151 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the mobile phone 100. The mobile communication module 151 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 151 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 151 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 151 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块152可以提供应用在手机100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块152可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块152经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块152还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 152 can provide applications on the mobile phone 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellite systems. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 152 may be one or more devices integrating at least one communication processing module. The wireless communication module 152 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 152 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
本申请实施例中,移动通信模块151和无线通信模块152可以发送第一请求消息、接收N个能力信息、发送分片下载请求等。In the embodiment of the present application, the mobile communication module 151 and the wireless communication module 152 can send a first request message, receive N pieces of capability information, send a fragment download request, and so on.
另外,手机100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。手机100可以接收按键190输入,产生 与手机100的用户设置以及功能控制有关的键信号输入。手机100可以利用马达191产生振动提示(比如来电振动提示)。手机100中的指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。手机100中的SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机100的接触和分离。In addition, the mobile phone 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. The mobile phone 100 can receive the key 190 input, and generate key signal input related to the user settings and function control of the mobile phone 100. The mobile phone 100 can use the motor 191 to generate a vibration notification (such as an incoming call vibration notification). The indicator 192 in the mobile phone 100 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on. The SIM card interface 195 in the mobile phone 100 is used to connect to the SIM card. The SIM card can be connected to and separated from the mobile phone 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195.
应理解,在实际应用中,手机100可以包括比图3所示的更多或更少的部件,本申请实施例不作限定。下文中,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。It should be understood that, in actual applications, the mobile phone 100 may include more or less components than those shown in FIG. 3, which is not limited in the embodiment of the present application. Hereinafter, the term "when..." may be interpreted as meaning "if..." or "after" or "in response to determining..." or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if detected (statement or event)" can be interpreted as meaning "if determined..." or "in response to determining..." or "when detected (Condition or event stated)" or "in response to detection of (condition or event stated)".
下面结合本申请实施例应用在上述图3所示的手机架构为例进行说明,参见图4,为本申请实施例提供的下载数据包的方法的流程图。在如图4所示的实施例中,假设第一设备向N个第二设备发送第一请求消息。示例性地,第一设备和N个第二设备位于同一个网络内,该网络可以为有线网络或无线网络,第一设备与N个第二设备可以互相通信,第一设备可以向N个第二设备发送广播消息,第一设备还可以接收N个第二设备分别发送的反馈消息。The following describes the application of the embodiment of the present application in the mobile phone architecture shown in FIG. 3 as an example. Refer to FIG. 4, which is a flowchart of a method for downloading a data packet provided by an embodiment of the present application. In the embodiment shown in FIG. 4, it is assumed that the first device sends the first request message to N second devices. Exemplarily, the first device and the N second devices are located in the same network. The network can be a wired network or a wireless network. The first device and the N second devices can communicate with each other, and the first device can communicate with the N second devices. The second device sends a broadcast message, and the first device may also receive feedback messages respectively sent by N second devices.
图4所示仅画出了N个第二设备中的第二设备a和第二设备b,以下仅以第二设备a和第二设备b为例进行详细说明,其他第二设备的具体处理过程可以参考第二设备a和第二设备b,重复之处不再赘述。应理解的是,N的取值为大于等于1的正整数,例如,N=1或N=3或N=5等,此处仅为举例不作为本申请的限定。As shown in Figure 4, only the second device a and the second device b of the N second devices are drawn. The following only takes the second device a and the second device b as an example for detailed description. The specific processing of the other second devices The process can refer to the second device a and the second device b, and the repetition is not repeated here. It should be understood that the value of N is a positive integer greater than or equal to 1, for example, N=1 or N=3 or N=5, etc. This is only an example and is not a limitation of the present application.
步骤401:第一设备向x个第二设备分别发送第一请求消息,以及向N-x个第二设备分别发送第二请求消息,其中,第一请求消息用于请求x个第二设备通过移动网络协助所述第一设备下载数据包,第二请求消息用于请求N-x个第二设备通过无线网络协助所述第一设备下载数据包,x≤N,x和N为正整数。Step 401: The first device sends a first request message to x second devices, and sends a second request message to Nx second devices, where the first request message is used to request x second devices to pass through the mobile network. The first device is assisted to download the data packet, and the second request message is used to request Nx second devices to assist the first device to download the data packet through the wireless network, x≤N, and x and N are positive integers.
在一示例中,第一设备可以通过第一请求消息请求N个第二设备均通过移动网络协助第一设备下载数据包。如图5所示,设备1~设备n协助设备A从服务器下载数据包,其中,设备1通过移动公司移动带宽从服务器下载设备1对应的数据包片段,设备2通过联通公司移动带宽从服务器下载设备2对应的数据包片段,设备3通过电信公司移动带宽从服务器下载设备3对应的数据包片段,……,设备n通过其他公司移动带宽从服务器下载设备n对应的数据包片段。In an example, the first device may request the N second devices through the first request message to assist the first device in downloading the data packet through the mobile network. As shown in Figure 5, device 1 to device n assist device A in downloading data packets from the server, where device 1 downloads the data packet fragments corresponding to device 1 from the server through the mobile bandwidth of the mobile company, and device 2 downloads the data packet fragments from the server through the mobile bandwidth of China Unicom. The data packet fragment corresponding to device 2, the device 3 downloads the data packet fragment corresponding to device 3 from the server through the mobile bandwidth of the telecommunications company, ..., the device n downloads the data packet fragment corresponding to device n from the server through the mobile bandwidth of other companies.
在一示例中,第一设备可以通过第一请求消息请求x个第二设备通过移动网络协助第一设备下载数据包,同时,第一设备可以通过第二请求消息请求N-x个第二设备通过无线网络协助第一设备下载数据包,其中,N-x<N。如图6所示,设备1~设备n协助设备A从服务器下载数据包,其中,设备1通过移动公司移动带宽从服务器下载设备1对应的数据包片段,设备2通过联通公司移动带宽从服务器下载设备2对应的数据包片段,设备3通过电信公司移动带宽从服务器下载设备3对应的数据包片段,……,设备n通过WiFi热点从服务器下载设备n对应的数据包片段。In an example, the first device may request x second devices through the first request message to assist the first device in downloading data packets through the mobile network, and at the same time, the first device may request Nx second devices through the wireless network through the second request message. The network assists the first device to download the data packet, where Nx<N. As shown in Figure 6, device 1 to device n assist device A in downloading data packets from the server, where device 1 downloads the data packet fragments corresponding to device 1 from the server through the mobile company's mobile bandwidth, and device 2 downloads from the server through the mobile bandwidth of China Unicom. The data packet fragment corresponding to device 2, the device 3 downloads the data packet fragment corresponding to device 3 from the server through the mobile bandwidth of the telecommunications company,..., the device n downloads the data packet fragment corresponding to device n from the server through the WiFi hotspot.
在又一示例中,第一设备可以通过第三请求消息请求N个第二设备优先通过移动网络协助第一设备下载数据包,其中,第三请求消息用于请求第二设备优先通过移动网络协助 第一设备下载数据包。In another example, the first device may request N second devices to preferentially assist the first device in downloading data packets through the mobile network through a third request message, where the third request message is used to request the second device to preferentially assist through the mobile network. The first device downloads the data package.
应理解的是,上述示例仅为举例,不作为本申请实施例的限定。It should be understood that the foregoing examples are only examples, and are not intended to limit the embodiments of the present application.
步骤402a:第二设备a接收来自于第一设备的第一请求消息,向第一设备发送第二设备a的能力信息。Step 402a: The second device a receives the first request message from the first device, and sends the capability information of the second device a to the first device.
需要说明的是,第二设备a还可能接收来自于第一设备的第二请求消息,向第一设备发送第二设备a的能力信息。或者,第二设备a还可能接收来自于第一设备的第三请求消息,向第一设备发送第二设备a的能力信息。若第二设备接收来自于第一设备的第三请求消息,第二设备a可以基于自身配置或用户指令确定是否通过移动网络协助第一设备下载数据包。It should be noted that the second device a may also receive a second request message from the first device, and send the capability information of the second device a to the first device. Alternatively, the second device a may also receive the third request message from the first device, and send the capability information of the second device a to the first device. If the second device receives the third request message from the first device, the second device a may determine whether to assist the first device in downloading the data packet through the mobile network based on its configuration or user instructions.
以下仅以第二设备a接收来自于第一设备的第一请求消息,向第一设备发送第二设备a的能力信息为例进行说明。In the following description, only the second device a receives the first request message from the first device and sends the capability information of the second device a to the first device as an example.
在一种可能的设计中,在第二设备a接收来自于第一设备的第一请求消息之前,第二设备a可以选择开启协助下载功能,如图7(a)所示,在图7(a)中协助下载功能处于开启状态。第二设备a未开启协助下载功能,如图7(b)所示,在图7(b)中协助下载功能处于关闭状态。则第二设备a可以向第一设备发送响应消息,该响应消息用于拒绝第一设备的第一请求消息,或第二设备a还可以不向第一设备发送第二设备a的能力信息。在另一种可能的设计中,第二设备a默认具有协助下载功能。In a possible design, before the second device a receives the first request message from the first device, the second device a can choose to enable the download assistance function, as shown in Figure 7(a), in Figure 7( a) The download assist function is turned on. The second device a does not enable the download assistance function, as shown in FIG. 7(b), and the download assistance function is turned off in FIG. 7(b). Then the second device a may send a response message to the first device, and the response message is used to reject the first request message of the first device, or the second device a may not send the capability information of the second device a to the first device. In another possible design, the second device a has a download assistance function by default.
在一示例中,在第二设备a接收到来自于第一设备的第一请求消息后,第二设备a可以通过显示屏显示第一信息,该第一信息用于征求用户意见是否同意第一请求消息,如图8(a)所示。进一步地,第二设备a可以接收用户指令,若用户指令指示同意第一请求消息,如图8(a)所示,若用户选择“是”,则第二设备a向第一设备发送第二设备a的能力信息。若用户指令指示不同意第一请求消息,如图8(a)所示,若用户选择“否”,则第二设备a向第一设备发送响应消息,该响应消息用于拒绝第一设备的第一请求消息,或第二设备a可以不向第一设备发送第二设备a的能力信息。In an example, after the second device a receives the first request message from the first device, the second device a may display the first information on the display screen, and the first information is used to solicit the user’s opinion whether to agree to the first request. The request message is shown in Figure 8(a). Further, the second device a may receive a user instruction. If the user instruction indicates to agree to the first request message, as shown in Figure 8(a), if the user selects "Yes", the second device a sends a second request message to the first device. Capability information of device a. If the user instruction indicates that the first request message is not agreed, as shown in Figure 8(a), if the user selects "No", the second device a sends a response message to the first device, and the response message is used to reject the first device's request. The first request message or the second device a may not send the capability information of the second device a to the first device.
在一示例中,在第二设备a接收到来自于第一设备的第一请求消息后,第二设备a可以通过显示屏显示第二信息,该第二信息用于征求用户意见是否同意所有通过移动网络协助第一设备下载数据包的请求消息,如图8(b)所示。进一步地,第二设备a可以接收用户指令,若用户指令指示同意所有通过移动网络协助第一设备下载数据包的请求消息,如图8(b)所示,若用户选择“总是同意”,则第二设备a向第一设备发送第二设备a的能力信息,且若用户指令指示同意所有通过移动网络协助第一设备下载数据包的请求消息,第二设备a仅会在首次接收到第一请求消息后,通过显示屏显示第二信息。在第二设备a下一次接收到第一设备发送的第一请求消息时,第二设备a不再显示信息提示用户接收到第一请求消息。若用户指令指示同意本次通过移动网络协助第一设备下载数据包的请求消息,如图8(b)所示,若用户选择“同意(每次询问)”,则第二设备a向第一设备发送第二设备a的能力信息,且在第二设备a下一次接收到第一设备发送的第一请求消息时,第二设备a再次通过显示屏显示第二信息。若用户指令指示不同意所有通过移动网络协助第一设备下载数据包的请求消息,如图8(b)所示,若用户选择“不同意”,则第二设备a向第一设备发送响应消息,该响应消息用于拒绝第一设备的第一请求消息,或第二设备a可以不向第一设备发送第二设备a的能力信息。In an example, after the second device a receives the first request message from the first device, the second device a may display the second information on the display screen, and the second information is used to solicit the user’s opinion whether to agree to all applications. The mobile network assists the first device to download the request message of the data packet, as shown in Figure 8(b). Further, the second device a may receive a user instruction. If the user instruction indicates to agree to all request messages that assist the first device in downloading data packets through the mobile network, as shown in Figure 8(b), if the user selects "Always agree", Then the second device a sends the capability information of the second device a to the first device, and if the user instruction indicates to agree to all request messages to assist the first device in downloading data packets through the mobile network, the second device a will only receive the first device for the first time. After a request message, the second message is displayed on the display screen. When the second device a receives the first request message sent by the first device next time, the second device a no longer displays information to prompt the user to receive the first request message. If the user instruction indicates that the request message for assisting the first device to download the data packet through the mobile network is agreed this time, as shown in Figure 8(b), if the user selects "Agree (every inquiry)", the second device a will send the request to the first device a The device sends the capability information of the second device a, and when the second device a receives the first request message sent by the first device next time, the second device a again displays the second information on the display screen. If the user instruction indicates that all request messages to assist the first device in downloading data packets through the mobile network are disapproved, as shown in Figure 8(b), if the user selects "disagree", the second device a sends a response message to the first device The response message is used to reject the first request message of the first device, or the second device a may not send the capability information of the second device a to the first device.
在又一示例中,在第二设备a接收到来自于第一设备的第一请求消息后,第二设备a 可以通过显示屏显示第三信息,该第三信息用于征求用户意见是否同意所有通过移动网络协助其他设备下载数据包的请求消息,如图8(c)所示。进一步地,第二设备a可以接收用户指令,若用户指令指示同意所有通过移动网络协助其他设备下载数据包的请求消息,如图8(c)所示,若用户选择“总是同意”,则第二设备a向第一设备发送第二设备a的能力信息,且若用户指令指示同意所有通过移动网络协助其他设备下载数据包的请求消息,第二设备a仅会在首次接收到第一请求消息后,通过显示屏显示第三信息。在第二设备a下一次接收到其他设备(包括第一设备)发送的第一请求消息时,第二设备a不再显示信息提示用户接收到第一请求消息。若用户指令指示同意本次通过移动网络协助第一设备下载数据包的请求消息,如图8(c)所示,若用户选择“同意(每次询问)”,则第二设备a向第一设备发送第二设备a的能力信息,且在第二设备a下一次接收到第一设备发送的第一请求消息时,第二设备a再次通过显示屏显示第三信息。若用户指令指示不同意所有通过移动网络协助其他设备下载数据包的请求消息,如图8(c)所示,若用户选择“不同意”则第二设备a向第一设备发送响应消息,该响应消息用于拒绝第一设备的第一请求消息,或第二设备a可以不向第一设备发送第二设备a的能力信息。In another example, after the second device a receives the first request message from the first device, the second device a may display third information on the display screen, and the third information is used to solicit the user’s opinion whether to agree to all The request message for assisting other devices to download data packets through the mobile network is shown in Figure 8(c). Further, the second device a may receive a user instruction. If the user instruction indicates to agree to all requests to assist other devices in downloading data packets through the mobile network, as shown in Figure 8(c), if the user selects "always agree", then The second device a sends the capability information of the second device a to the first device, and if the user instruction indicates to agree to all requests to assist other devices in downloading data packets through the mobile network, the second device a will only receive the first request for the first time After the message, the third message is displayed on the display screen. When the second device a next receives the first request message sent by other devices (including the first device), the second device a no longer displays information to prompt the user to receive the first request message. If the user instruction indicates that the request message for assisting the first device to download data packets through the mobile network is agreed to this time, as shown in Figure 8(c), if the user selects "agree (every inquiry)", the second device a will send a request to the first device a The device sends the capability information of the second device a, and next time the second device a receives the first request message sent by the first device, the second device a again displays the third information on the display screen. If the user instruction indicates that all request messages to assist other devices in downloading data packets through the mobile network are not approved, as shown in Figure 8(c), if the user selects "disagree", the second device a sends a response message to the first device. The response message is used to reject the first request message of the first device, or the second device a may not send the capability information of the second device a to the first device.
在一种可能的设计中,第二设备a的能力信息指示第二设备a的闲置资源和能力。第二设备a的能力信息至少包括剩余存储空间和网络带宽。其中,第二设备a的剩余存储空间越大,则能够实现协助第一设备下载较大的数据包片段。第二设备a的网络带宽越大,则能够实现协助第一设备较快地下载数据包片段。可选的,第二设备a的能力信息还可以包括计算能力(即CPU处理能力)和存储的I/O速度等。应理解的是,此处仅为举例,第二设备a的能力信息还可包括其他能力参数,上述内容不作为本申请的限定。In a possible design, the capability information of the second device a indicates the idle resources and capabilities of the second device a. The capability information of the second device a includes at least remaining storage space and network bandwidth. Wherein, the larger the remaining storage space of the second device a is, the larger the data packet fragments can be assisted to be downloaded by the first device. The larger the network bandwidth of the second device a is, the faster the first device can be assisted in downloading the data packet fragments. Optionally, the capability information of the second device a may also include computing capability (that is, CPU processing capability), stored I/O speed, and the like. It should be understood that this is only an example, and the capability information of the second device a may also include other capability parameters, and the foregoing content is not a limitation of this application.
步骤402b:第二设备b接收来自于第一设备的第一请求消息,向第一设备发送第二设备b的能力信息。Step 402b: The second device b receives the first request message from the first device, and sends the capability information of the second device b to the first device.
第二设备b的具体处理过程与上述第二设备a的具体处理过程类似,具体可以参考步骤402a中的内容,重复之处不再赘述。The specific processing procedure of the second device b is similar to the specific processing procedure of the above-mentioned second device a. For details, please refer to the content in step 402a, and the repetition will not be repeated.
步骤403:第一设备基于N个能力信息,确定分片策略,所述分片策略指示所述数据包中的M个数据包片段,所述M个数据包片段与所述N个第二设备中的M个第二设备一一对应,M为正整数,M≤N。Step 403: The first device determines a fragmentation strategy based on the N pieces of capability information, the fragmentation strategy indicates the M data packet fragments in the data packet, and the M data packet fragments and the N second devices There are M second devices in one-to-one correspondence, M is a positive integer, and M≤N.
在一种可能的设计中,在所述第一设备接收来自于所述N个第二设备的N个能力信息之后,所述第一设备基于所述N个能力信息,确定所述M个第二设备,所述M个第二设备分别对应的能力信息中的每个能力信息中的网络带宽大于等于预设最小网络带宽阈值,和/或剩余存储空间大于等于预设最小存储空间阈值。In a possible design, after the first device receives N pieces of capability information from the N second devices, the first device determines the M pieces of capability information based on the N pieces of capability information. Two devices, the network bandwidth in each capability information in the capability information respectively corresponding to the M second devices is greater than or equal to the preset minimum network bandwidth threshold, and/or the remaining storage space is greater than or equal to the preset minimum storage space threshold.
示例性地,若N=2,在第一设备接收到第二设备a的能力信息和第二设备b的能力信息后,第一设备判断第二设备a是否有能力协助第一设备下载数据包,以及判断第二设备b是否有能力协助第一设备下载数据包。结合上述步骤402a可知,第一设备可以基于第二设备a的网络带宽判断第二设备a是否有能力协助第一设备下载数据包。例如,若第二设备a的当前网络带宽较小,例如小于预设最小网络带宽阈值,则第二设备a下载数据包片段的速度会比较慢,则第一设备可以放弃请求第二设备a协助下载数据包。第一设备可以基于第二设备a的剩余存储空间判断第二设备a是否有能力协助第一设备下载数据包。例如,若第二设备a的当前剩余存储空间较小,例如小于预设最小存储空间阈值,则第二设备a不能满足下载的数据包片段的存储需求,则第一设备可以放弃请求第二设备a协助下 载数据包。在一种可能的设计中,第一设备还可以采用但不限于以下方法确定所述M个第二设备:Exemplarily, if N=2, after the first device receives the capability information of the second device a and the capability information of the second device b, the first device determines whether the second device a is capable of assisting the first device in downloading data packets , And determine whether the second device b is capable of assisting the first device to download the data package. In combination with the foregoing step 402a, it can be known that the first device can determine whether the second device a is capable of assisting the first device in downloading data packets based on the network bandwidth of the second device a. For example, if the current network bandwidth of the second device a is small, such as less than the preset minimum network bandwidth threshold, the speed of downloading data packet fragments by the second device a will be relatively slow, and the first device can give up requesting the assistance of the second device a Download the data package. The first device may determine whether the second device a is capable of assisting the first device to download the data package based on the remaining storage space of the second device a. For example, if the current remaining storage space of the second device a is small, such as less than the preset minimum storage space threshold, the second device a cannot meet the storage requirements of the downloaded data packet fragments, and the first device may give up requesting the second device aAssist in downloading the data package. In a possible design, the first device may also use but not limited to the following methods to determine the M second devices:
步骤1,按公式(1)归一化能力信息中的每个能力参数的参数值,获得每个能力参数的归一化数值。 Step 1. Normalize the parameter value of each ability parameter in the ability information according to formula (1) to obtain the normalized value of each ability parameter.
Figure PCTCN2020114597-appb-000002
Figure PCTCN2020114597-appb-000002
其中,Vmax代表N个能力信息中第k个能力参数的最大参数值,Va代表N个能力信息中第k个能力参数的最小参数值,Vi代表第i个第二设备对应的能力信息中第k个能力参数的参数值。Among them, Vmax represents the maximum parameter value of the kth capability parameter in the N capability information, Va represents the minimum parameter value of the kth capability parameter in the N capability information, and Vi represents the first capability information corresponding to the i-th second device. Parameter values of k capability parameters.
示例性地,若N=3,设备1的能力信息包括剩余存储空间为5G和网络带宽为100Mb/s。设备2的能力信息包括剩余存储空间为1G和网络带宽为500Mb/s,设备3的能力信息包括剩余存储空间为2G和网络带宽为200Mb/s。若第1个能力参数为剩余存储空间,则Vmax=5G,Va=1G,Vnorm[1]=(5-1)/(5-1)=1,Vnorm[2]=(1-1)/(5-1)=0,Vnorm[3]=(2-1)/(5-1)=0.25,第2个能力参数为网络带宽,则Vmax=500Mb/s,Va=100Mb/s,Vnorm[1]=(100-100)/(500-100)=0,Vnorm[2]=(500-100)/(500-100)=1,Vnorm[3]=(200-100)/(500-100)=0.25。Exemplarily, if N=3, the capability information of the device 1 includes that the remaining storage space is 5G and the network bandwidth is 100Mb/s. The capability information of device 2 includes the remaining storage space of 1G and the network bandwidth of 500Mb/s, and the capability information of device 3 includes the remaining storage space of 2G and the network bandwidth of 200Mb/s. If the first capability parameter is the remaining storage space, then Vmax=5G, Va=1G, Vnorm[1]=(5-1)/(5-1)=1, Vnorm[2]=(1-1)/ (5-1)=0, Vnorm[3]=(2-1)/(5-1)=0.25, the second capability parameter is network bandwidth, then Vmax=500Mb/s, Va=100Mb/s, Vnorm [1]=(100-100)/(500-100)=0, Vnorm[2]=(500-100)/(500-100)=1, Vnorm[3]=(200-100)/(500 -100)=0.25.
步骤2,假设能力信息中的每个能力参数的重要性相同,基于上述计算结果结合公式(2)计算每个第二设备的综合能力值。Step 2: Assuming that the importance of each capability parameter in the capability information is the same, calculate the comprehensive capability value of each second device based on the above calculation result and formula (2).
Figure PCTCN2020114597-appb-000003
Figure PCTCN2020114597-appb-000003
其中,Vwt代表第i个第二设备的综合能力值。Among them, Vwt represents the comprehensive capability value of the i-th second device.
示例性地,若N=3,设备1的能力信息包括剩余存储空间为5G和网络带宽为100Mb/s。设备2的能力信息包括剩余存储空间为1G和网络带宽为500Mb/s,设备3的能力信息包括剩余存储空间为2G和网络带宽为100Mb/s。若第1个能力参数为剩余存储空间,则Vnorm[1]=1,Vnorm[2]=0,Vnorm[3]=0.25,第2个能力参数为网络带宽,则Vnorm[1]=0,Vnorm[2]=1,Vnorm[3]=0.25。根据公式(2)计算得到:Vwt1=(1+0)/2=0.5,Vwt2=(0+1)/2=0.5,Vwt3=(0.25+0.25)/2=0.25。即,设备1的综合能力值为0.5,设备2的综合能力值为0.5,设备3的综合能力值为0.25。Exemplarily, if N=3, the capability information of the device 1 includes that the remaining storage space is 5G and the network bandwidth is 100Mb/s. The capability information of device 2 includes the remaining storage space of 1G and the network bandwidth of 500Mb/s, and the capability information of device 3 includes the remaining storage space of 2G and the network bandwidth of 100Mb/s. If the first capability parameter is the remaining storage space, then Vnorm[1]=1, Vnorm[2]=0, Vnorm[3]=0.25, and the second capability parameter is network bandwidth, then Vnorm[1]=0, Vnorm[2]=1, Vnorm[3]=0.25. Calculated according to formula (2): Vwt1=(1+0)/2=0.5, Vwt2=(0+1)/2=0.5, Vwt3=(0.25+0.25)/2=0.25. That is, the comprehensive capability value of device 1 is 0.5, the comprehensive capability value of device 2 is 0.5, and the comprehensive capability value of device 3 is 0.25.
应理解的是,第一设备还可将各个能力参数的重要性分为不同级别,即分配不同的权重,此时,第一设备基于不同能力参数的不同权重计算综合能力值,例如,假设剩余存储空间的权重为0.4,网络带宽的权重为0.6,则上例中Vwt1=(0.4*1+0.6*0)/2=0.2,Vwt2=(0.4*0+0.6*1)/2=0.3,Vwt3=(0.4*0.25+0.6*0.25)/2=0.25,即设备1的综合能力值为0.2,设备2的综合能力值为0.3,设备3的综合能力值为0.25。It should be understood that the first device can also divide the importance of each capability parameter into different levels, that is, assign different weights. At this time, the first device calculates the comprehensive capability value based on the different weights of the different capability parameters, for example, assuming that the remaining The weight of storage space is 0.4, and the weight of network bandwidth is 0.6. In the above example, Vwt1=(0.4*1+0.6*0)/2=0.2, Vwt2=(0.4*0+0.6*1)/2=0.3, Vwt3=(0.4*0.25+0.6*0.25)/2=0.25, that is, the comprehensive capability value of device 1 is 0.2, the comprehensive capability value of device 2 is 0.3, and the comprehensive capability value of device 3 is 0.25.
步骤3:根据预设综合能力值阈值和N个第二设备分别对应的综合能力值,确定M个第二设备,其中,M个第二设备中的每个第二设备的综合能力值大于等于预设综合能力值阈值。Step 3: Determine M second devices according to the preset comprehensive ability value threshold and the comprehensive ability values corresponding to the N second devices, where the comprehensive ability value of each second device in the M second devices is greater than or equal to The comprehensive ability value threshold is preset.
示例性地,若N=3,设备1的能力信息包括剩余存储空间为5G和网络带宽为100Mb/s。设备2的能力信息包括剩余存储空间为1G和网络带宽为500Mb/s,设备3的能力信息包括剩余存储空间为2G和网络带宽为100Mb/s,假设能力信息中的每个能力参数的重要性相同,则设备1的综合能力值为0.5,设备2的综合能力值为0.5,设备3的综合能力值为 0.25。假设预设综合能力值阈值为0.2,则M=N=3,假设预设综合能力值阈值为0.3,则M=2,M个第二设备分别为设备1和设备2。Exemplarily, if N=3, the capability information of the device 1 includes that the remaining storage space is 5G and the network bandwidth is 100Mb/s. The capability information of device 2 includes the remaining storage space of 1G and the network bandwidth of 500Mb/s. The capability information of device 3 includes the remaining storage space of 2G and the network bandwidth of 100Mb/s, assuming the importance of each capability parameter in the capability information Same, the comprehensive capability value of device 1 is 0.5, the comprehensive capability value of device 2 is 0.5, and the comprehensive capability value of device 3 is 0.25. Assuming that the preset comprehensive capability value threshold is 0.2, then M=N=3, and if the preset comprehensive capability value threshold is 0.3, then M=2, and the M second devices are device 1 and device 2, respectively.
此外,第一设备还可以结合其他因素确定所述M个第二设备。例如,若第一设备根据历史记录确定第二设备a共10次协助第一设备下载数据包,其中,7次出现由于第二设备a自身故障或异常导致下载中断,则第一设备可以放弃请求第二设备a协助下载数据包。In addition, the first device may also determine the M second devices in combination with other factors. For example, if the first device determines from the historical record that the second device a assists the first device in downloading data packets 10 times, of which 7 times the download is interrupted due to the failure or abnormality of the second device a, the first device can abandon the request The second device a assists in downloading the data package.
在一种可能的设计中,在第一设备接收来自于所述N个第二设备的N个能力信息之后,第一设备通过显示屏显示M个能力信息;该M个能力信息为第一设备基于预设规则从N个能力信息中筛选出来的;所述第一设备接收用户指令,所述用户指令指示同意第一设备选择的M个第二设备,M个第二设备与M个能力信息一一对应。示例性地,第一设备可以基于上述步骤1~步骤3所示的方法确定M个第二设备,并通过显示屏显示该M个第二设备分别对应的能力信息,即第一设备为用户推荐最优的第二设备组合,用户可以选择同意第一设备推荐的第二设备组合,或者不同意第一设备推荐的第二设备组合。In a possible design, after the first device receives the N capability information from the N second devices, the first device displays M capability information on the display screen; the M capability information is the first device Filtered from N pieces of capability information based on preset rules; the first device receives a user instruction, and the user instruction indicates M second devices that agree to the first device's selection, M second devices, and M capability information One-to-one correspondence. Exemplarily, the first device may determine M second devices based on the method shown in steps 1 to 3 above, and display the capability information corresponding to the M second devices on the display screen, that is, the first device recommends the user For the optimal second device combination, the user can choose to agree with the second device combination recommended by the first device or disagree with the second device combination recommended by the first device.
在一种可能的设计中,第一设备还可以通过显示屏显示N个第二设备的能力信息。例如,若N=2,第一设备还可以通过显示屏以列表形式显示第二设备a的能力信息和第二设备b的能力信息。进一步地,第一设备可以接收用户指令,所述用户指令指示所述N个第二设备中M个第二设备。例如选中第二设备a而未选中第二设备b。如图9所示,第一设备通过显示屏显示设备1、设备2、和设备3的能力信息,用户从中选择设备1和设备2。In a possible design, the first device may also display capability information of N second devices on the display screen. For example, if N=2, the first device may also display the capability information of the second device a and the capability information of the second device b in a list form on the display screen. Further, the first device may receive a user instruction, the user instruction instructing M second devices among the N second devices. For example, the second device a is selected but the second device b is not selected. As shown in FIG. 9, the first device displays the capability information of device 1, device 2, and device 3 through the display screen, and the user selects device 1 and device 2 from them.
进一步地,在第一设备确定M个第二设备后,基于M个第二设备的能力信息确定分片策略,其中,所述M个数据包片段满足以下条件:Further, after the first device determines the M second devices, the fragmentation strategy is determined based on the capability information of the M second devices, wherein the M data packet fragments meet the following conditions:
Max(s 1/B 1,s 2/B 2,…,s M/B M)+S/B’<S/B; Max(s 1 /B 1 ,s 2 /B 2 ,…,s M /B M )+S/B'<S/B;
s 1+s 2+…+s M=S,s i≤S is 1 +s 2 +…+s M =S,s i ≤S i ;
其中,s 1、s 2、……、s M代表所述M个数据包片段,S 1、S 2、……、S M代表所述M个第二设备分别对应的最大剩余存储空间,B 1、B 2、……、B M代表所述M个第二设备分别对应的网络带宽,S代表所述数据包的大小,B代表所述第一设备的网络带宽,B’代表所述M个第二设备分别将对应的数据包片段传输至所述第一设备的传输速度的平均值。 Among them, s 1 , s 2 , ..., s M represent the M data packet fragments, S 1 , S 2 , ..., S M represent the maximum remaining storage space corresponding to the M second devices, respectively, and B 1 , B 2 , ..., B M represents the network bandwidth corresponding to the M second devices, S represents the size of the data packet, B represents the network bandwidth of the first device, and B'represents the M The average value of the transmission speed at which each second device transmits corresponding data packet fragments to the first device.
应理解的是,根据上述两个约束条件,可以迭代得到最优的si值。在上述分片策略中第一设备不参与数据包下载。在第一设备确定M个数据包片段的大小之后,第一设备还需进一步确定每个数据包片段的起始位置(和/或结束位置)。It should be understood that, according to the above two constraint conditions, the optimal si value can be obtained iteratively. In the above fragmentation strategy, the first device does not participate in the download of the data packet. After the first device determines the size of the M data packet fragments, the first device needs to further determine the start position (and/or end position) of each data packet fragment.
可以理解的是,第一设备也可以参与下载数据包,假设第一设备下载的数据包片段的大小为s 0,则上述条件替换为: It is understandable that the first device can also participate in downloading data packets. Assuming that the size of the data packet fragment downloaded by the first device is s 0 , the above condition is replaced with:
Max(s 1/B 1,s 2/B 2,…,s M/B M)+(S-s 0)/B’<(S-s 0)/B; Max(s 1 /B 1 ,s 2 /B 2 ,…,s M /B M )+(Ss 0 )/B'<(Ss 0 )/B;
s 1+s 2+…+s M=(S-s 0),s i≤S is 1 +s 2 +…+s M =(Ss 0 ), s i ≤S i ;
应理解的是,第一设备上述生成分片策略的方法仅为举例不作为本申请的限定。第一设备还可以基于其他方法确定分片策略。It should be understood that the foregoing method of generating a fragmentation strategy by the first device is only an example and is not a limitation of this application. The first device may also determine the fragmentation strategy based on other methods.
步骤404:第一设备基于分片策略向所述M个第二设备分别发送相应的分片下载请求。其中,第i个第二设备对应的分片下载请求指示第i个第二设备对应的数据包片段,i为正整数,i≤M。Step 404: The first device respectively sends corresponding fragment download requests to the M second devices based on the fragmentation strategy. Wherein, the fragment download request corresponding to the i-th second device indicates the data packet fragment corresponding to the i-th second device, i is a positive integer, and i≤M.
示例性地,第一设备向第二设备a发送分片下载请求,该分片下载请求指示第二设备对应的数据包片段,例如,该分片下载请求包括数据包片段的大小和起始位置(和/或结束位置)。Exemplarily, the first device sends a fragment download request to the second device a, and the fragment download request indicates the data packet fragment corresponding to the second device. For example, the fragment download request includes the size and starting position of the data packet fragment (And/or end position).
步骤405a:第二设备a接收来自于第一设备的第二设备a对应的分片下载请求,基于第二设备a对应的分片下载请求通过移动网络从服务器下载第二设备a对应的分片下载请求指示的第二设备a对应的数据包片段。Step 405a: The second device a receives the fragment download request corresponding to the second device a from the first device, and downloads the fragment corresponding to the second device a from the server through the mobile network based on the fragment download request corresponding to the second device a The data packet fragment corresponding to the second device a indicated by the download request.
需要说明的是,若第二设备a接收来自于第一设备的第二请求消息,则第二设备a基于第二设备a对应的分片下载请求通过无线网络从服务器下载第二设备a对应的分片下载请求指示的第二设备a对应的数据包片段。或者,若第二设备a接收来自于第一设备的第三请求消息,则第二设备a可以基于自身配置或用户指令确定是否通过移动网络协助第一设备下载数据包,若是,则第二设备a通过基于第二设备a对应的分片下载请求通过移动网络从服务器下载第二设备a对应的分片下载请求指示的第二设备a对应的数据包片段,否则,第二设备a基于第二设备a对应的分片下载请求通过无线网络从服务器下载第二设备a对应的分片下载请求指示的第二设备a对应的数据包片段。It should be noted that if the second device a receives the second request message from the first device, then the second device a downloads the data corresponding to the second device a from the server via the wireless network based on the fragment download request corresponding to the second device a. The data packet fragment corresponding to the second device a indicated by the fragment download request. Alternatively, if the second device a receives the third request message from the first device, the second device a can determine whether to assist the first device in downloading the data packet through the mobile network based on its own configuration or user instructions, and if so, the second device a downloads the data packet fragments corresponding to the second device a indicated by the second device a from the server via the mobile network based on the fragment download request corresponding to the second device a, otherwise, the second device a is based on the second device a The segment download request corresponding to the device a downloads the data packet segment corresponding to the second device a indicated by the segment download request corresponding to the second device a from the server through the wireless network.
在一种可能的设计中,第二设备a可以每隔预设时长向第一设备发送第一通知消息,该第一通知消息用于通知第一设备当前已下载的数据包片段的大小,此外还可包括平均下载速度,和/或完成下载还需等待的时长等。例如,预设时长可以为1分钟,则第二设备a每个1分钟向第一设备发送第一通知消息,第一通知消息用于通知第一设备当前已下载的数据包片段的大小。In a possible design, the second device a may send a first notification message to the first device every preset period of time, and the first notification message is used to notify the first device of the size of the data packet segment currently downloaded. In addition, It may also include the average download speed, and/or the length of time to wait to complete the download, etc. For example, the preset duration may be 1 minute, and the second device a sends a first notification message to the first device every 1 minute, and the first notification message is used to notify the first device of the size of the data packet fragment currently downloaded.
在另一种可能的设计中,第二设备a可以在每当下载完成所需下载的数据包片段的预设比例时向第一设备发送第一通知消息,该第一通知消息用于通知第一设备当前已下载的数据包片段的大小,此外还可包括平均下载速度,和/或完成下载还需等待的时长等。例如,预设比例可以为20%,则当第二设备a下载完成所需下载的数据包片段的20%时,向第一设备发送第一通知消息,第一通知消息指示第二设备a已下载完成所需下载的数据包片段的20%;当第二设备a下载完成所需下载的数据包片段的40%时,向第一设备发送第一通知消息,第一通知消息指示第二设备a已下载完成所需下载的数据包片段的40%;当第二设备a下载完成所需下载的数据包片段的60%时,向第一设备发送第一通知消息,第一通知消息指示第二设备a已下载完成所需下载的数据包片段的60%;当第二设备a下载完成所需下载的数据包片段的80%时,向第一设备发送第一通知消息,第一通知消息指示第二设备a已下载完成所需下载的数据包片段的80%;当第二设备a下载完成所需下载的数据包片段的100%时,向第一设备发送第一通知消息,第一通知消息指示第二设备a已下载完成所需下载的数据包片段的100%。In another possible design, the second device a may send a first notification message to the first device every time a preset proportion of data packet fragments to be downloaded is completed, and the first notification message is used to notify the first device. The size of the data packet fragments currently downloaded by a device may also include the average download speed, and/or the waiting time to complete the download, etc. For example, the preset ratio may be 20%, and when the second device a downloads 20% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, and the first notification message indicates that the second device a has 20% of the data packet fragments that need to be downloaded when the download is complete; when the second device a completes the download of 40% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, and the first notification message indicates the second device a has downloaded 40% of the data packet fragments that need to be downloaded; when the second device a has downloaded 60% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, and the first notification message indicates the first notification message. The second device a has downloaded 60% of the data packet fragments that need to be downloaded; when the second device a has downloaded 80% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, the first notification message Indicate that the second device a has downloaded 80% of the data packet fragments that need to be downloaded; when the second device a has downloaded 100% of the data packet fragments that need to be downloaded, the first notification message is sent to the first device, and the first device a The notification message indicates that the second device a has downloaded 100% of the data packet fragments required to be downloaded.
此外,若第二设备a在下载数据包片段的过程中出现异常情况,例如第二设备a突发故障,则第二设备a无法继续协助第一设备下载数据包,此时,第二设备a向第一设备发送第二通知消息,该第二通知消息用于通知第一设备第二设备a无法继续协助第一设备下载数据包。第一设备在接收到第二通知消息后,可以选择自己下载第二设备a对应的数据包片段,或者选择其他第二设备接管该下载任务(即第二设备a对应的数据包片段)。In addition, if the second device a encounters an abnormal situation in the process of downloading data packet fragments, such as a sudden failure of the second device a, the second device a cannot continue to assist the first device in downloading the data packet. At this time, the second device a Send a second notification message to the first device, where the second notification message is used to notify the first device that the second device a cannot continue to assist the first device in downloading the data packet. After receiving the second notification message, the first device can choose to download the data packet fragment corresponding to the second device a by itself, or select another second device to take over the download task (that is, the data packet fragment corresponding to the second device a).
步骤405b:第二设备b接收来自于第一设备的第二设备b对应的分片下载请求,基于第二设备b对应的分片下载请求通过移动网络从服务器下载第二设备b对应的分片下载请求指示的数据包片段。Step 405b: The second device b receives the fragment download request corresponding to the second device b from the first device, and downloads the fragment corresponding to the second device b from the server through the mobile network based on the fragment download request corresponding to the second device b Download the packet fragment indicated by the request.
第二设备b的具体处理过程与上述第二设备a的具体处理过程类似,具体可以参考步骤404a中的内容,重复之处不再赘述。The specific processing process of the second device b is similar to the specific processing process of the second device a described above. For details, please refer to the content in step 404a, and the repetition will not be repeated.
步骤406a:第二设备a将下载完成的第二设备a对应的数据包片段传输至第一设备。Step 406a: The second device a transmits the downloaded data packet fragment corresponding to the second device a to the first device.
应理解的是,第二设备a可以通过有线方式或无线方式将下载完成的数据包片段传输至第一设备。例如,第二设备a通过数据线将下载完成的数据包片段传输至第一设备。又例如,第二设备a建立与第一设备的蓝牙连接,通过蓝牙传输下载完成的数据包片段。又例如,若第二设备a与第一设备同属于一个局域网的覆盖范围内,第二设备a可以通过WiFi传输下载完成的数据包。It should be understood that the second device a may transmit the downloaded data packet fragments to the first device in a wired or wireless manner. For example, the second device a transmits the downloaded data packet fragments to the first device through a data line. For another example, the second device a establishes a Bluetooth connection with the first device, and transmits the downloaded data packet fragments via Bluetooth. For another example, if the second device a and the first device belong to the same coverage area of a local area network, the second device a can transmit the downloaded data packet via WiFi.
步骤406b:第二设备b将下载完成的第二设备b对应的数据包片段传输至第一设备。Step 406b: The second device b transmits the downloaded data packet fragment corresponding to the second device b to the first device.
第二设备b的具体处理过程与上述第二设备a的具体处理过程类似,具体可以参考步骤405a中的内容,重复之处不再赘述。The specific processing process of the second device b is similar to the specific processing process of the second device a described above. For details, please refer to the content in step 405a, and the repetition will not be repeated.
步骤407:第一设备基于接收到的N个数据包片段组合成一个完整的数据包。Step 407: The first device combines the received N data packet fragments into a complete data packet.
应理解的是,若所述第一设备从服务器下载数据包片段,则所述第一设备将所述第一片段和所述M个数据包片段组合成所述数据包;若所述第一设备未从服务器下载所述数据包的任一数据包片段,则所述第一设备将所述M个数据包片段组合成所述数据包。It should be understood that if the first device downloads a data packet fragment from a server, the first device combines the first fragment and the M data packet fragments into the data packet; If the device does not download any data packet fragment of the data packet from the server, the first device combines the M data packet fragments into the data packet.
此外,在第一设备将数据包组合完成后,第一设备需要校验该数据包的完整性和/或数据包的版本。In addition, after the first device has assembled the data packet, the first device needs to verify the integrity of the data packet and/or the version of the data packet.
在一种可能的设计中,在所述第一设备合成数据包之后,所述第一设备基于合成后的数据包生成校验信息,并将所述校验信息发送至所述服务器;所述第一设备接收来自于所述服务器的响应消息,所述响应消息指示所述合成后的数据包校验通过。In a possible design, after the first device synthesizes the data packet, the first device generates verification information based on the synthesized data packet, and sends the verification information to the server; The first device receives a response message from the server, where the response message indicates that the synthesized data packet passes the verification.
示例性地,第一设备计算一个校验值,例如消息摘要算法(Message-Digest Algorithm,MD5)值,同时服务器也计算一个校验值,若两个计算结果相同则表明完整性校验通过。Exemplarily, the first device calculates a check value, such as a Message-Digest Algorithm (MD5) value, and the server also calculates a check value. If the two calculation results are the same, it indicates that the integrity check passes.
如图10所示,本申请实施例提供一种装置,该装置包括用户授权界面1001,示例性地,所述用户授权界面1001用于显示如图8(a)、图8(b)、图8(c)、图9所示的内容。该装置还包括协助下载子系统,该系统包括请求协助模块1002,分片策略模块1003,异常处理模块1004,请求响应模块1005,协助下载模块1006。示例性地,请求协助模块1002用于执行步骤401和步骤404,分片策略模块1003用于执行步骤403,异常处理模块1004用于执行在接收到第二设备无法继续协助第一设备下载数据包通知消息后,可以选择自己下载该第二设备对应的数据包片段,或者选择其他第二设备接管该下载该第二设备对应的数据包片段。请求响应模块1005用于执行步骤402a和步骤402b,协助下载模块1006用于执行步骤405a和步骤406a,步骤405b和步骤406b。具体内容可以参考如图4所示的实施例的内容,重复之处不再赘述。As shown in FIG. 10, an embodiment of the present application provides a device that includes a user authorization interface 1001. Illustratively, the user authorization interface 1001 is used to display FIG. 8(a), FIG. 8(b), and FIG. 8(c), the content shown in Figure 9. The device also includes a download assistance subsystem, and the system includes a request assistance module 1002, a fragmentation strategy module 1003, an exception handling module 1004, a request response module 1005, and a download assistance module 1006. Exemplarily, the request assistance module 1002 is used to perform steps 401 and 404, the fragmentation strategy module 1003 is used to perform step 403, and the exception handling module 1004 is used to perform when the second device cannot continue to assist the first device in downloading data packets. After the notification message, you can choose to download the data packet fragment corresponding to the second device by yourself, or choose another second device to take over the download of the data packet fragment corresponding to the second device. The request response module 1005 is used to perform step 402a and step 402b, and the assist download module 1006 is used to perform step 405a and step 406a, step 405b and step 406b. For specific content, please refer to the content of the embodiment shown in FIG. 4, and the repetition will not be repeated.
应理解的是,上述各个模块的划分仅为举例不作为本申请的限定。为了实现上述功能,本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It should be understood that the division of each module described above is only an example and is not a limitation of the present application. In order to realize the above functions, those skilled in the art should easily realize that in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
综上,采用上述方法,第一设备可以将M个第二设备的闲置能力利用起来实现数据包快速下载,可以有效缩短数据包下载时间。In summary, using the above method, the first device can utilize the idle capabilities of the M second devices to implement fast downloading of data packets, which can effectively shorten the time for downloading data packets.
上述本申请提供的实施例中,从第一设备和第二设备作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,第一设备和第二设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软 件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。In the above-mentioned embodiments provided in the present application, the method provided in the embodiments of the present application is introduced from the perspective of the first device and the second device as the execution subject. In order to realize the functions in the methods provided in the above embodiments of the present application, the first device and the second device may include a hardware structure and/or a software module, and the foregoing may be implemented in the form of a hardware structure, a software module, or a hardware structure plus a software module. Each function. Whether a certain function of the above-mentioned functions is executed by a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraint conditions of the technical solution.
与上述构思相同,如图11所示,本申请实施例还提供一种装置1100,该装置1100包括处理单元1101、发送单元1102和接收单元1103。Similar to the above-mentioned concept, as shown in FIG. 11, an embodiment of the present application further provides an apparatus 1100, which includes a processing unit 1101, a sending unit 1102, and a receiving unit 1103.
一示例中,装置1100用于实现上述方法中第一设备的功能。该装置可以是第一设备,也可以是第一设备中的装置,例如芯片系统。In an example, the apparatus 1100 is used to implement the function of the first device in the foregoing method. The device may be the first device, or a device in the first device, such as a chip system.
其中,发送单元1102,用于向x个第二设备分别发送第一请求消息,以及向N-x个第二设备分别发送第二请求消息,其中,所述第一请求消息用于请求所述x个第二设备通过移动网络协助所述装置下载数据包,所述第二请求消息用于请求所述N-x个第二设备通过无线网络协助所述装置下载数据包,x≤N,x和N为正整数;Wherein, the sending unit 1102 is configured to send a first request message to x second devices, and send a second request message to Nx second devices, where the first request message is used to request the x The second device assists the device to download the data packet through the mobile network, the second request message is used to request the Nx second devices to assist the device to download the data packet through the wireless network, x≤N, x and N are positive Integer
接收单元1103,用于接收来自于所述N个第二设备的N个能力信息,所述N个能力信息与所述N个第二设备一一对应;The receiving unit 1103 is configured to receive N pieces of capability information from the N second devices, where the N pieces of capability information correspond to the N second devices on a one-to-one basis;
处理单元1101,用于基于所述N个能力信息,确定分片策略,所述分片策略指示所述数据包中的M个数据包片段,所述M个数据包片段与所述N个第二设备中的M个第二设备一一对应,M为正整数,M≤N;The processing unit 1101 is configured to determine a fragmentation strategy based on the N pieces of capability information, the fragmentation strategy indicating M data packet fragments in the data packet, and the M data packet fragments and the N th The M second devices in the second device have a one-to-one correspondence, M is a positive integer, and M≤N;
所述发送单元1102,还用于基于所述分片策略向所述M个第二设备分别发送对应的分片下载请求消息;其中,第i个第二设备对应的分片下载请求消息指示第i个第二设备对应的数据包片段,i为正整数,i≤M;The sending unit 1102 is further configured to send corresponding fragment download request messages to the M second devices respectively based on the fragmentation strategy; wherein, the fragment download request message corresponding to the i-th second device indicates Data packet fragments corresponding to i second devices, i is a positive integer, i≤M;
所述接收单元1103,还用于接收来自于所述M个第二设备的所述M个数据包片段。The receiving unit 1103 is further configured to receive the M data packet fragments from the M second devices.
一示例中,装置1100用于实现上述方法中第二设备的功能。该装置可以是第二设备,也可以是第二设备中的装置,例如芯片系统。In an example, the apparatus 1100 is used to implement the function of the second device in the foregoing method. The device may be a second device, or a device in the second device, such as a chip system.
其中,接收单元1103,用于接收来自于第一设备的第一请求消息;所述第一请求消息用于请求所述装置通过移动网络协助所述第一设备下载数据包;Wherein, the receiving unit 1103 is configured to receive a first request message from a first device; the first request message is used to request the apparatus to assist the first device in downloading data packets through a mobile network;
发送单元1102,用于向所述第一设备发送所述装置的能力信息;A sending unit 1102, configured to send capability information of the device to the first device;
所述接收单元1103,还用于接收来自于所述第一设备的分片下载请求,所述分片下载请求指示所述装置对应的数据包片段;The receiving unit 1103 is further configured to receive a fragment download request from the first device, where the fragment download request indicates a data packet fragment corresponding to the device;
所述接收单元1103,还用于通过移动网络从服务器下载所述数据包片段,通过所述发送单元将所述数据包片段传输至所述第一设备。The receiving unit 1103 is further configured to download the data packet fragment from a server through a mobile network, and transmit the data packet fragment to the first device through the sending unit.
此外,该装置1100还可以包括显示单元1104。In addition, the device 1100 may further include a display unit 1104.
关于处理单元1101、发送单元1102、接收单元1103、显示单元1104的具体执行过程,可参见上方法实施例中的记载。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。For the specific execution process of the processing unit 1101, the sending unit 1102, the receiving unit 1103, and the display unit 1104, please refer to the record in the above method embodiment. The division of modules in the embodiments of this application is illustrative, and it is only a logical function division. In actual implementation, there may be other division methods. In addition, the functional modules in the various embodiments of this application can be integrated into one process. In the device, it can also exist alone physically, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software function modules.
作为另一种可选的变形,该装置可以为芯片系统。本申请实施例中,芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。示例性地,该装置包括处理器和接口,该接口可以为输入/输出接口。其中,处理器完成上述处理单元1101的功能,接口完成上述发送单元1102和接收单元1103的功能。该装置还可以包括存储器,存储器用于存储可在处理器上运行的程序,处理器执行该程序时实现上述各个实施例的方法。As another optional variation, the device may be a chip system. In the embodiments of the present application, the chip system may be composed of chips, or may include chips and other discrete devices. Exemplarily, the device includes a processor and an interface, and the interface may be an input/output interface. Among them, the processor completes the functions of the aforementioned processing unit 1101, and the interface completes the functions of the aforementioned sending unit 1102 and the receiving unit 1103. The device may also include a memory, where the memory is used to store a program that can be run on the processor, and the processor implements the method of each of the foregoing embodiments when the program is executed by the processor.
基于相同的构思,图12所示为本申请提供的一种设备1200。设备1200包括至少一个处理器1210、存储器1220和收发器1230。其中,处理器1210与存储器1220和收发器1230耦合,本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。本申请实施例中不限定上述收发器1230、处理器1210以及存储器1220之间的连接介质。例如,本申请实施例在图12中以存储器1220、处理器1210以及收发器1230之间可以通过总线连接,所述总线可以分为地址总线、数据总线、控制总线等。可选的,设备1200还包括显示屏1240。Based on the same concept, FIG. 12 shows a device 1200 provided by this application. The device 1200 includes at least one processor 1210, a memory 1220, and a transceiver 1230. Wherein, the processor 1210 is coupled with the memory 1220 and the transceiver 1230. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms for the device , Information exchange between units or modules. The embodiment of the present application does not limit the connection medium between the foregoing transceiver 1230, the processor 1210, and the memory 1220. For example, in the embodiment of the present application in FIG. 12, the memory 1220, the processor 1210, and the transceiver 1230 may be connected by a bus, and the bus may be divided into an address bus, a data bus, and a control bus. Optionally, the device 1200 further includes a display screen 1240.
具体的,存储器1220用于存储程序指令。Specifically, the memory 1220 is used to store program instructions.
收发器1230用于接收和/或发送消息等。The transceiver 1230 is used to receive and/or send messages and so on.
存储器1220中存储的程序指令被处理器1210执行时,使得设备1200执行图4中所示的方法。When the program instructions stored in the memory 1220 are executed by the processor 1210, the device 1200 executes the method shown in FIG. 4.
示例性地,当该装置为第一设备时,存储器1220用于存储程序指令;存储器1220中存储的程序指令被处理器1210执行时,使得设备1200执行图4中第一设备所示的方法。当该装置为第二设备时,存储器1220用于存储程序指令;存储器1220中存储的程序指令被处理器1210执行时,使得设备1200执行图4中第二设备所示的方法。Exemplarily, when the apparatus is the first device, the memory 1220 is used to store program instructions; when the program instructions stored in the memory 1220 are executed by the processor 1210, the device 1200 executes the method shown in the first device in FIG. 4. When the device is the second device, the memory 1220 is used to store program instructions; when the program instructions stored in the memory 1220 are executed by the processor 1210, the device 1200 is caused to execute the method shown in the second device in FIG. 4.
在本申请实施例中,处理器1210可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the embodiment of the present application, the processor 1210 may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. Or execute the methods, steps, and logical block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
在本申请实施例中,存储器1220可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。In the embodiment of the present application, the memory 1220 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), For example, random-access memory (RAM). The memory is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this. The memory in the embodiments of the present application may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
所属领域的技术人员可以清楚地了解到本申请实施例可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括RAM、ROM、电可擦可编程只读存储器(electrically erasable programmable read only memory,EEPROM)、只读光盘(compact disc read-Only memory,CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(digital subscriber line,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本申请实施例所使用的,盘(disk)和碟(disc)包括压缩光碟(compact disc,CD)、激光碟、光 碟、数字通用光碟(digital video disc,DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。Those skilled in the art can clearly understand that the embodiments of the present application can be implemented by hardware, firmware, or a combination of them. When implemented by software, the above-mentioned functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium. The computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another. The storage medium may be any available medium that can be accessed by a computer. Take this as an example but not limited to: computer-readable media can include RAM, ROM, electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory, CD- ROM) or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other media that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer. In addition. Any connection can suitably become a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology such as infrared, radio, and microwave, Then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, wireless, and microwave are included in the fixing of the media. As used in the embodiments of this application, disks and discs include compact discs (CDs), laser discs, optical discs, digital video discs (digital video discs, DVDs), floppy discs, and Blu-ray discs. Disks usually copy data magnetically, while disks use lasers to copy data optically. The above combination should also be included in the protection scope of the computer-readable medium.
总之,以上所述仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡根据本申请的揭露,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。In short, the above descriptions are only examples of the present application, and are not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of this application shall be included in the protection scope of this application.

Claims (31)

  1. 一种下载数据包的方法,其特征在于,该方法包括:A method for downloading data packets, characterized in that the method includes:
    第一设备向x个第二设备分别发送第一请求消息,以及向N-x个第二设备分别发送第二请求消息,其中,所述第一请求消息用于请求所述x个第二设备通过移动网络协助所述第一设备下载数据包,所述第二请求消息用于请求所述N-x个第二设备通过无线网络协助所述第一设备下载数据包,x≤N,x和N为正整数;The first device sends a first request message to x second devices, and sends a second request message to Nx second devices, where the first request message is used to request the x second devices to move through The network assists the first device to download the data packet, and the second request message is used to request the Nx second devices to assist the first device to download the data packet through the wireless network, x≤N, and x and N are positive integers ;
    所述第一设备接收来自于所述N个第二设备的N个能力信息,所述N个能力信息与所述N个第二设备一一对应;Receiving, by the first device, N pieces of capability information from the N second devices, where the N pieces of capability information correspond to the N second devices in a one-to-one correspondence;
    所述第一设备基于所述N个能力信息,确定分片策略,所述分片策略指示所述数据包中的M个数据包片段,所述M个数据包片段与所述N个第二设备中的M个第二设备一一对应,M为正整数,M≤N;The first device determines a fragmentation strategy based on the N pieces of capability information, where the fragmentation strategy indicates the M data packet fragments in the data packet, and the M data packet fragments and the N second The M second devices in the device have a one-to-one correspondence, M is a positive integer, and M≤N;
    所述第一设备基于所述分片策略向所述M个第二设备分别发送对应的分片下载请求消息;其中,第i个第二设备对应的分片下载请求消息指示第i个第二设备对应的数据包片段,i为正整数,i≤M;The first device sends corresponding fragment download request messages to the M second devices respectively based on the fragmentation strategy; wherein, the fragment download request message corresponding to the i-th second device indicates the i-th second device The data packet fragment corresponding to the device, i is a positive integer, i≤M;
    所述第一设备接收来自于所述M个第二设备的所述M个数据包片段。The first device receives the M data packet fragments from the M second devices.
  2. 如权利要求1所述的方法,其特征在于,所述第i个能力信息包括所述第i个第二设备的剩余存储空间、所述第i个第二设备的网络带宽、所述第i个第二设备的处理能力中的至少一种。The method according to claim 1, wherein the i-th capability information includes the remaining storage space of the i-th second device, the network bandwidth of the i-th second device, and the i-th second device. At least one of the processing capabilities of the second device.
  3. 如权利要求2所述的方法,其特征在于,所述M个第二设备分别对应的能力信息中的每个能力信息中的网络带宽大于等于预设最小网络带宽阈值,和/或剩余存储空间大于等于预设最小存储空间阈值。The method according to claim 2, wherein the network bandwidth in each capability information in the capability information respectively corresponding to the M second devices is greater than or equal to a preset minimum network bandwidth threshold, and/or remaining storage space Greater than or equal to the preset minimum storage space threshold.
  4. 如权利要求2或3所述的方法,其特征在于,所述M个数据包片段满足以下条件:The method according to claim 2 or 3, wherein the M data packet fragments satisfy the following conditions:
    Max(s 1/B 1,s 2/B 2,…,s M/B M)+(S-s 0)/B’<(S-s 0)/B; Max(s 1 /B 1 ,s 2 /B 2 ,…,s M /B M )+(Ss 0 )/B'<(Ss 0 )/B;
    s 1+s 2+…+s M=(S-s 0),s i≤S is 1 +s 2 +…+s M =(Ss 0 ), s i ≤S i ;
    其中,所述第一设备下载的数据包片段的大小为s 0,s 1、s 2、……、s M代表所述M个数据包片段,S 1、S 2、……、S M代表所述M个第二设备分别对应的最大剩余存储空间,B 1、B 2、……、B M代表所述M个第二设备分别对应的网络带宽,S代表所述数据包的大小,B代表所述第一设备的网络带宽,B’代表所述M个第二设备分别将对应的数据包片段传输至所述第一设备的传输速度的平均值。 Wherein, the size of the data packet fragments downloaded by the first device is s 0 , s 1 , s 2 , ..., s M represents the M data packet fragments, and S 1 , S 2 , ..., SM represents The maximum remaining storage space corresponding to the M second devices, B 1 , B 2 , ..., B M represents the network bandwidth corresponding to the M second devices, S represents the size of the data packet, and B Represents the network bandwidth of the first device, and B′ represents the average value of the transmission speeds of the M second devices respectively transmitting corresponding data packet fragments to the first device.
  5. 如权利要求1-4任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 4, further comprising:
    在所述第一设备接收来自于所述N个第二设备的N个能力信息之后,所述第一设备通过显示屏显示所述N个能力信息;After the first device receives the N capability information from the N second devices, the first device displays the N capability information on a display screen;
    所述第一设备接收用户指令,所述用户指令指示在所述N个第二设备中选择的M个第二设备。The first device receives a user instruction, and the user instruction indicates M second devices selected from the N second devices.
  6. 如权利要求1-4任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 4, further comprising:
    在所述第一设备接收来自于所述N个第二设备的N个能力信息之后,所述第一设备通过显示屏显示M个能力信息;所述M个能力信息为所述第一设备基于预设规则从所述N个能力信息中筛选出来的;After the first device receives the N capability information from the N second devices, the first device displays M capability information on the display screen; the M capability information is based on the first device A preset rule is selected from the N pieces of capability information;
    所述第一设备接收用户指令,所述用户指令指示同意所述第一设备选择的M个第二设 备,所述M个第二设备与所述M个能力信息一一对应。The first device receives a user instruction, the user instruction indicates M second devices that agree to the selection of the first device, and the M second devices have a one-to-one correspondence with the M pieces of capability information.
  7. 如权利要求1-6任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-6, further comprising:
    所述第一设备接收来自于所述第i个第二设备的第一通知消息,所述第一通知消息用于通知所述第一设备所述第i个第二设备当前已下载的数据包片段的大小;和/或,The first device receives a first notification message from the i-th second device, where the first notification message is used to notify the first device of the data packets currently downloaded by the i-th second device The size of the fragment; and/or,
    所述第一设备接收来自于所述第i个第二设备的第二通知消息,所述第二通知消息用于通知所述第一设备所述第i个第二设备无法继续下载所述第i个第二设备对应的数据包片段。The first device receives a second notification message from the i-th second device, where the second notification message is used to notify the first device that the i-th second device cannot continue to download the first device. The data packet fragment corresponding to the i second device.
  8. 如权利要求1-7任一项所述的方法,其特征在于,在所述第一设备接收来自于所述M个第二设备的所述M个数据包片段之后,还包括:7. The method according to any one of claims 1-7, wherein after the first device receives the M data packet fragments from the M second devices, the method further comprises:
    若所述第一设备从服务器下载数据包片段,则所述第一设备将所述第一设备下载的数据包片段和所述M个数据包片段合成数据包;If the first device downloads the data packet fragment from the server, the first device synthesizes the data packet fragment downloaded by the first device and the M data packet fragments into a data packet;
    若所述第一设备未从服务器下载所述数据包的任一数据包片段,则所述第一设备将所述M个数据包片段合成数据包。If the first device does not download any data packet fragment of the data packet from the server, the first device combines the M data packet fragments into a data packet.
  9. 如权利要求8所述的方法,其特征在于,还包括:The method of claim 8, further comprising:
    在所述第一设备合成数据包之后,所述第一设备基于合成后的数据包生成校验信息,并将所述校验信息发送至所述服务器;After the first device synthesizes the data packet, the first device generates verification information based on the synthesized data packet, and sends the verification information to the server;
    所述第一设备接收来自于所述服务器的响应消息,所述响应消息指示所述合成后的数据包校验通过。The first device receives a response message from the server, the response message indicating that the synthesized data packet has passed the verification.
  10. 一种下载数据包的方法,其特征在于,该方法包括:A method for downloading data packets, characterized in that the method includes:
    第二设备接收来自于第一设备的第一请求消息;所述第一请求消息用于请求所述第二设备通过移动网络协助所述第一设备下载数据包;The second device receives a first request message from the first device; the first request message is used to request the second device to assist the first device in downloading data packets through the mobile network;
    所述第二设备向所述第一设备发送所述第二设备的能力信息;Sending, by the second device, the capability information of the second device to the first device;
    所述第二设备接收来自于所述第一设备的分片下载请求,所述分片下载请求指示所述第二设备对应的数据包片段;Receiving, by the second device, a fragment download request from the first device, where the fragment download request indicates a data packet fragment corresponding to the second device;
    所述第二设备通过移动网络从服务器下载所述数据包片段,将所述数据包片段传输至所述第一设备。The second device downloads the data packet fragment from the server through the mobile network, and transmits the data packet fragment to the first device.
  11. 如权利要求10所述的方法,其特征在于,在第二设备接收来自于第一设备的第一请求消息之后,还包括:The method according to claim 10, wherein after the second device receives the first request message from the first device, the method further comprises:
    所述第二设备通过显示屏显示第一信息,所述第一信息用于征求用户意见是否同意所述第一请求消息;The second device displays first information on a display screen, and the first information is used to solicit user opinions whether to agree to the first request message;
    所述第二设备接收第一用户指令,所述第一用户指令指示同意所述第一请求消息。The second device receives a first user instruction, the first user instruction indicating approval of the first request message.
  12. 如权利要求10或11所述的方法,其特征在于,所述第二设备的能力信息包括所述第二设备的剩余存储空间、所述第二设备的网络带宽、所述第二设备的处理能力中的至少一种。The method according to claim 10 or 11, wherein the capability information of the second device includes the remaining storage space of the second device, the network bandwidth of the second device, and the processing of the second device At least one of the abilities.
  13. 如权利要求10-12任一项所述的方法,其特征在于,还包括:The method according to any one of claims 10-12, further comprising:
    所述第二设备每隔预设时长向所述第一设备发送第一通知消息,所述第一通知消息用于通知所述第一设备所述第二设备当前已下载的数据包片段的大小;或The second device sends a first notification message to the first device every preset time period, where the first notification message is used to notify the first device of the size of the data packet fragment currently downloaded by the second device ;or
    所述第二设备每当下载完成所述数据包片段的预设比例时向所述第一设备发送第一通知消息,所述第一通知消息用于通知所述第一设备所述第二设备当前已下载的数据包片段的大小。The second device sends a first notification message to the first device every time the preset proportion of the data packet fragments is downloaded, the first notification message is used to notify the first device and the second device The size of the currently downloaded packet fragment.
  14. 如权利要求10-13任一项所述的方法,其特征在于,还包括:The method according to any one of claims 10-13, further comprising:
    若所述第二设备在下载所述数据包片段的过程中确定无法继续下载所述数据包片段,则所述第二设备向所述第一设备发送第二通知消息,所述第二通知消息用于通知所述第一设备所述第二设备无法继续下载所述数据包片段。If the second device determines that it cannot continue to download the data packet fragment in the process of downloading the data packet fragment, the second device sends a second notification message to the first device, the second notification message It is used to notify the first device that the second device cannot continue to download the data packet fragment.
  15. 一种下载数据包的装置,其特征在于,该装置包括:A device for downloading data packets, characterized in that the device includes:
    发送单元,用于向x个第二设备分别发送第一请求消息,以及向N-x个第二设备分别发送第二请求消息,其中,所述第一请求消息用于请求所述x个第二设备通过移动网络协助所述装置下载数据包,所述第二请求消息用于请求所述N-x个第二设备通过无线网络协助所述装置下载数据包,x≤N,x和N为正整数;The sending unit is configured to send a first request message to x second devices respectively, and to send a second request message to Nx second devices respectively, wherein the first request message is used to request the x second devices Assisting the device to download the data packet via a mobile network, the second request message is used to request the Nx second devices to assist the device to download the data packet via a wireless network, x≤N, x and N are positive integers;
    接收单元,用于接收来自于所述N个第二设备的N个能力信息,所述N个能力信息与所述N个第二设备一一对应;A receiving unit, configured to receive N pieces of capability information from the N second devices, where the N pieces of capability information correspond to the N second devices in a one-to-one correspondence;
    处理单元,用于基于所述N个能力信息,确定分片策略,所述分片策略指示所述数据包中的M个数据包片段,所述M个数据包片段与所述N个第二设备中的M个第二设备一一对应,M为正整数,M≤N;A processing unit, configured to determine a fragmentation strategy based on the N pieces of capability information, the fragmentation strategy indicating the M data packet fragments in the data packet, the M data packet fragments and the N second The M second devices in the device have a one-to-one correspondence, M is a positive integer, and M≤N;
    所述发送单元,还用于基于所述分片策略向所述M个第二设备分别发送对应的分片下载请求消息;其中,第i个第二设备对应的分片下载请求消息指示第i个第二设备对应的数据包片段,i为正整数,i≤M;The sending unit is further configured to send corresponding fragment download request messages to the M second devices respectively based on the fragmentation strategy; wherein, the fragment download request message corresponding to the i-th second device indicates the i-th The data packet fragment corresponding to the second device, i is a positive integer, i≤M;
    所述接收单元,还用于接收来自于所述M个第二设备的所述M个数据包片段。The receiving unit is further configured to receive the M data packet fragments from the M second devices.
  16. 如权利要求15所述的装置,其特征在于,所述第i个能力信息包括所述第i个第二设备的剩余存储空间、所述第i个第二设备的网络带宽、所述第i个第二设备的处理能力中的至少一种。The apparatus according to claim 15, wherein the i-th capability information includes the remaining storage space of the i-th second device, the network bandwidth of the i-th second device, and the i-th second device. At least one of the processing capabilities of the second device.
  17. 如权利要求16所述的装置,其特征在于,所述M个第二设备分别对应的能力信息中的每个能力信息中的网络带宽大于等于预设最小网络带宽阈值,和/或剩余存储空间大于等于预设最小存储空间阈值。The apparatus according to claim 16, wherein the network bandwidth in each capability information in the capability information respectively corresponding to the M second devices is greater than or equal to a preset minimum network bandwidth threshold, and/or remaining storage space Greater than or equal to the preset minimum storage space threshold.
  18. 如权利要求15或16所述的装置,其特征在于,所述M个数据包片段满足以下条件:The apparatus according to claim 15 or 16, wherein the M data packet fragments satisfy the following conditions:
    Max(s 1/B 1,s 2/B 2,…,s M/B M)+(S-s 0)/B’<(S-s 0)/B; Max(s 1 /B 1 ,s 2 /B 2 ,…,s M /B M )+(Ss 0 )/B'<(Ss 0 )/B;
    s 1+s 2+…+s M=(S-s 0),s i≤S is 1 +s 2 +…+s M =(Ss 0 ), s i ≤S i ;
    其中,所述装置下载的数据包片段的大小为s 0,s 1、s 2、……、s M代表所述M个数据包片段,S 1、S 2、……、S M代表所述M个第二设备分别对应的最大剩余存储空间,B 1、B 2、……、B M代表所述M个第二设备分别对应的网络带宽,S代表所述数据包的大小,B代表所述装置的网络带宽,B’代表所述M个第二设备分别将对应的数据包片段传输至所述装置的传输速度的平均值。 Wherein, the size of the data packet fragments downloaded by the device is s 0 , s 1 , s 2 , ..., s M represents the M data packet fragments, and S 1 , S 2 , ..., SM represents the The maximum remaining storage space corresponding to the M second devices, B 1 , B 2 , ..., B M represents the network bandwidth corresponding to the M second devices, S represents the size of the data packet, and B represents all For the network bandwidth of the device, B′ represents the average value of the transmission speeds of the M second devices respectively transmitting corresponding data packet fragments to the device.
  19. 如权利要求15-18任一项所述的装置,其特征在于,所述装置还包括:显示单元,用于:在接收来自于所述N个第二设备的N个能力信息之后,通过显示屏显示所述N个能力信息;The device according to any one of claims 15-18, wherein the device further comprises: a display unit, configured to: after receiving N pieces of capability information from the N second devices, display Display the N pieces of capability information on the screen;
    所述接收单元,还用于接收用户指令,所述用户指令指示在所述N个第二设备中选择的M个第二设备。The receiving unit is further configured to receive a user instruction that indicates M second devices selected from the N second devices.
  20. 如权利要求15-18任一项所述的装置,其特征在于,所述装置还包括:显示单元,用于:在接收来自于所述N个第二设备的N个能力信息之后,通过显示屏显示M个能力 信息;所述M个能力信息为所述处理单元基于预设规则从所述N个能力信息中筛选出来的;The device according to any one of claims 15-18, wherein the device further comprises: a display unit, configured to: after receiving N capability information from the N second devices, display The screen displays M pieces of capability information; the M pieces of capability information are selected by the processing unit from the N pieces of capability information based on preset rules;
    所述接收单元,还用于接收用户指令,所述用户指令指示同意所述装置选择的M个第二设备,所述M个第二设备与所述M个能力信息一一对应。The receiving unit is further configured to receive a user instruction that indicates M second devices that agree to the device selection, and the M second devices have a one-to-one correspondence with the M pieces of capability information.
  21. 如权利要求15-20任一项所述的装置,其特征在于,所述接收单元,还用于接收来自于所述第i个第二设备的第一通知消息,所述第一通知消息用于通知所述装置所述第i个第二设备当前已下载的数据包片段的大小;和/或,The apparatus according to any one of claims 15-20, wherein the receiving unit is further configured to receive a first notification message from the i-th second device, and the first notification message is To notify the device of the size of the data packet segment currently downloaded by the i-th second device; and/or,
    所述接收单元,还用于接收来自于所述第i个第二设备的第二通知消息,所述第二通知消息用于通知所述装置所述第i个第二设备无法继续下载所述第i个第二设备对应的数据包片段。The receiving unit is further configured to receive a second notification message from the i-th second device, where the second notification message is used to notify the apparatus that the i-th second device cannot continue to download the The data packet fragment corresponding to the i-th second device.
  22. 如权利要求15-21任一项所述的装置,其特征在于,所述处理单元,还用于:在接收来自于所述M个第二设备的所述M个数据包片段之后,若所述接收单元从服务器下载数据包片段,则将所述接收单元下载的数据包片段和所述M个数据包片段合成数据包;The apparatus according to any one of claims 15-21, wherein the processing unit is further configured to: after receiving the M data packet fragments from the M second devices, if The receiving unit downloads data packet fragments from the server, and then synthesizes the data packet fragments downloaded by the receiving unit and the M data packet fragments into a data packet;
    所述处理单元,还用于:在接收来自于所述M个第二设备的所述M个数据包片段之后,若所述接收单元未从服务器下载所述数据包的任一数据包片段,则将所述M个数据包片段合成数据包。The processing unit is further configured to: after receiving the M data packet fragments from the M second devices, if the receiving unit does not download any data packet fragment of the data packet from the server, Then, the M data packet fragments are combined into a data packet.
  23. 如权利要求22所述的装置,其特征在于,所述处理单元,还用于:在合成数据包之后,所述处理单元于合成后的数据包生成校验信息,并通过所述发送单元将所述校验信息发送至所述服务器;22. The device according to claim 22, wherein the processing unit is further configured to: after synthesizing the data packet, the processing unit generates verification information from the synthesized data packet, and transmits the verification information through the sending unit Sending the verification information to the server;
    所述接收单元,还用于接收来自于所述服务器的响应消息,所述响应消息指示所述合成后的数据包校验通过。The receiving unit is further configured to receive a response message from the server, the response message indicating that the synthesized data packet passes the verification.
  24. 一种下载数据包的装置,其特征在于,该装置包括:A device for downloading data packets, characterized in that the device includes:
    接收单元,用于接收来自于第一设备的第一请求消息;所述第一请求消息用于请求所述装置通过移动网络协助所述第一设备下载数据包;A receiving unit, configured to receive a first request message from a first device; the first request message is used to request the apparatus to assist the first device in downloading data packets through a mobile network;
    发送单元,用于向所述第一设备发送所述装置的能力信息;A sending unit, configured to send capability information of the device to the first device;
    所述接收单元,还用于接收来自于所述第一设备的分片下载请求,所述分片下载请求指示所述装置对应的数据包片段;The receiving unit is further configured to receive a fragment download request from the first device, where the fragment download request indicates a data packet fragment corresponding to the device;
    所述接收单元,还用于通过移动网络从服务器下载所述数据包片段,通过所述发送单元将所述数据包片段传输至所述第一设备。The receiving unit is further configured to download the data packet fragment from a server through a mobile network, and transmit the data packet fragment to the first device through the sending unit.
  25. 如权利要求24所述的装置,其特征在于,所述装置还包括:显示单元,用于在接收来自于第一设备的第一请求消息之后,通过显示屏显示第一信息,所述第一信息用于征求用户意见是否同意所述第一请求消息;The device according to claim 24, wherein the device further comprises: a display unit, configured to display the first information on the display screen after receiving the first request message from the first device, the first information The information is used to solicit user opinions whether to agree with the first request message;
    所述接收单元,还用于接收第一用户指令,所述第一用户指令指示同意所述第一请求消息。The receiving unit is further configured to receive a first user instruction, where the first user instruction indicates agreement to the first request message.
  26. 如权利要求24或25所述的装置,其特征在于,所述装置的能力信息包括所述装置的剩余存储空间、所述装置的网络带宽、所述装置的处理能力中的至少一种。The device according to claim 24 or 25, wherein the capability information of the device includes at least one of the remaining storage space of the device, the network bandwidth of the device, and the processing capability of the device.
  27. 如权利要求24-26任一项所述的装置,其特征在于,所述发送单元,还用于每隔预设时长向所述第一设备发送第一通知消息,所述第一通知消息用于通知所述第一设备所述装置当前已下载的数据包片段的大小;或The device according to any one of claims 24-26, wherein the sending unit is further configured to send a first notification message to the first device every preset duration, and the first notification message is used for To notify the first device of the size of the data packet fragment currently downloaded by the device; or
    所述发送单元,还用于每当下载完成所述数据包片段的预设比例时向所述第一设备发 送第一通知消息,所述第一通知消息用于通知所述第一设备所述装置当前已下载的数据包片段的大小。The sending unit is further configured to send a first notification message to the first device every time the preset proportion of the data packet fragments is downloaded, and the first notification message is used to notify the first device of the The size of the packet fragments currently downloaded by the device.
  28. 如权利要求24-27任一项所述的装置,其特征在于,所述发送单元,还用于若处理单元在下载所述数据包片段的过程中确定无法继续下载所述数据包片段,向所述第一设备发送第二通知消息,所述第二通知消息用于通知所述第一设备所述装置无法继续下载所述数据包片段。The device according to any one of claims 24-27, wherein the sending unit is further configured to: if the processing unit determines that the data packet fragment cannot be downloaded during the downloading of the data packet fragment, send The first device sends a second notification message, where the second notification message is used to notify the first device that the device cannot continue to download the data packet fragment.
  29. 一种电子设备,其特征在于,所述设备包括收发器、处理器和存储器;An electronic device, characterized in that the device includes a transceiver, a processor, and a memory;
    所述存储器中存储有程序指令;Program instructions are stored in the memory;
    当所述程序指令被执行时,使得所述电子设备执行如权利要求1至14任一所述的方法。When the program instructions are executed, the electronic device is caused to execute the method according to any one of claims 1 to 14.
  30. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括程序指令,当所述程序指令在电子设备上运行时,使得所述电子设备执行如权利要求1至14任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium includes program instructions, when the program instructions run on an electronic device, the electronic device is caused to execute any one of claims 1 to 14 The method described.
  31. 一种计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1至14任一项所述的方法。A computer program product, characterized in that, when the computer program product runs on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 14.
PCT/CN2020/114597 2019-09-26 2020-09-10 Method and apparatus for downloading data packet WO2021057503A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910920129.7A CN110825402B (en) 2019-09-26 2019-09-26 Method and device for downloading data packet
CN201910920129.7 2019-09-26

Publications (1)

Publication Number Publication Date
WO2021057503A1 true WO2021057503A1 (en) 2021-04-01

Family

ID=69548424

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/114597 WO2021057503A1 (en) 2019-09-26 2020-09-10 Method and apparatus for downloading data packet

Country Status (2)

Country Link
CN (1) CN110825402B (en)
WO (1) WO2021057503A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825402B (en) * 2019-09-26 2021-06-22 华为技术有限公司 Method and device for downloading data packet
CN117991939A (en) * 2022-11-04 2024-05-07 华为技术有限公司 File downloading method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150046570A1 (en) * 2013-05-08 2015-02-12 Saswat Misra Server function for device-to-device based content delivery
WO2018038741A1 (en) * 2016-08-26 2018-03-01 Nokia Technologies Oy Data download via group collaboration
CN109040213A (en) * 2018-07-23 2018-12-18 Oppo广东移动通信有限公司 Document down loading method and Related product
CN109246185A (en) * 2018-07-31 2019-01-18 Oppo广东移动通信有限公司 Document down loading method and Related product
CN110825402A (en) * 2019-09-26 2020-02-21 华为技术有限公司 Method and device for downloading data packet

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101039187A (en) * 2006-03-17 2007-09-19 腾讯科技(深圳)有限公司 Method for downloading data and system thereof
CN103532878B (en) * 2013-09-26 2017-01-04 华为技术有限公司 The processing method of packet and the management method of network traffics and device and system
CN104753980B (en) * 2013-12-26 2018-04-27 腾讯科技(深圳)有限公司 Data transmission method and relevant apparatus and communication system
EP3133498B1 (en) * 2014-04-16 2020-08-12 Clarion Co., Ltd. Data delivery system, control server, and data delivery method
CN105491087B (en) * 2014-09-17 2019-07-26 联想(北京)有限公司 A kind of document down loading method, device and electronic equipment
JP2018156606A (en) * 2017-03-21 2018-10-04 東芝メモリ株式会社 Communication control device, communication control method, and computer program
US20180288156A1 (en) * 2017-03-30 2018-10-04 Kyocera Document Solutions Inc. Information processing system, information processing method, and information processing device that ensure deleting associated data
CN109561138B (en) * 2018-11-19 2021-04-13 Oppo广东移动通信有限公司 File downloading method and related product
CN110086885A (en) * 2019-05-10 2019-08-02 上海擎感智能科技有限公司 The upgrade package method for down loading and device of space download technology, storage medium and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150046570A1 (en) * 2013-05-08 2015-02-12 Saswat Misra Server function for device-to-device based content delivery
WO2018038741A1 (en) * 2016-08-26 2018-03-01 Nokia Technologies Oy Data download via group collaboration
CN109040213A (en) * 2018-07-23 2018-12-18 Oppo广东移动通信有限公司 Document down loading method and Related product
CN109246185A (en) * 2018-07-31 2019-01-18 Oppo广东移动通信有限公司 Document down loading method and Related product
CN110825402A (en) * 2019-09-26 2020-02-21 华为技术有限公司 Method and device for downloading data packet

Also Published As

Publication number Publication date
CN110825402A (en) 2020-02-21
CN110825402B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
US11934352B2 (en) Card rendering method and electronic device
WO2021027630A1 (en) Patching method, related apparatus, and system
WO2021147406A1 (en) Audio output method and terminal device
KR102107132B1 (en) Access point connection method of electronic apparatus and electronic appparatus thereof
US10244425B2 (en) Electronic device and method for controlling transmission control protocol thereof
WO2021057503A1 (en) Method and apparatus for downloading data packet
JP2021513707A (en) Software upgrade management methods, servers, terminals, devices and storage media
WO2021073428A1 (en) Account number binding method, device and system
WO2021179990A1 (en) Application server access method and terminal
WO2021143168A1 (en) Trusted execution environment operating system crash processing method and electronic device
US11736149B2 (en) Data transmission method for Bluetooth card reader and electronic device
WO2022143155A1 (en) Resource access method and terminal device
WO2022166502A1 (en) Data protection method and system, and medium and electronic device
CN114915996A (en) Communication exception handling method and related device
WO2022037725A1 (en) System service recovery method and apparatus, and electronic device
CN111435318A (en) Dex optimization method of application program and terminal
WO2023202295A1 (en) Memory management and control method and apparatus, storage medium and electronic device
WO2022228190A1 (en) Wifi connection method and device
US10451838B2 (en) Electronic device and method for autofocusing
EP4191409A1 (en) Shared library multiplexing method and electronic device
CN114995732A (en) Screen projection method, electronic equipment and storage medium
CN112448935A (en) Method for establishing network connection and electronic equipment
CN114765605B (en) Resource access method and terminal equipment
CN115550416B (en) Application server connection method, device and storage medium
CN117082419B (en) Speaker control method, system, device, apparatus and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20869144

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20869144

Country of ref document: EP

Kind code of ref document: A1