CN109561138B - File downloading method and related product - Google Patents

File downloading method and related product Download PDF

Info

Publication number
CN109561138B
CN109561138B CN201811382591.8A CN201811382591A CN109561138B CN 109561138 B CN109561138 B CN 109561138B CN 201811382591 A CN201811382591 A CN 201811382591A CN 109561138 B CN109561138 B CN 109561138B
Authority
CN
China
Prior art keywords
target
network
downloaded
networks
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811382591.8A
Other languages
Chinese (zh)
Other versions
CN109561138A (en
Inventor
黄园
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811382591.8A priority Critical patent/CN109561138B/en
Publication of CN109561138A publication Critical patent/CN109561138A/en
Priority to PCT/CN2019/109999 priority patent/WO2020103585A1/en
Application granted granted Critical
Publication of CN109561138B publication Critical patent/CN109561138B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application discloses a file downloading method and a related product, wherein the method comprises the following steps: if a downloading instruction for a target file is received, acquiring the size of a memory corresponding to the target file and a network parameter corresponding to each target network in a plurality of target networks connected with the electronic equipment to obtain a plurality of network parameters; dividing the target file into a plurality of data packets to be downloaded according to the memory size and the plurality of network parameters; generating a corresponding downloading request of a target network according to each data packet to be downloaded in the plurality of data packets to be downloaded; sending a corresponding download request to each of the plurality of target networks; receiving a data packet to be downloaded by each target network in the plurality of target networks to obtain a plurality of data packets to be downloaded; and integrating the plurality of data packets to be downloaded to obtain the target file. By the adoption of the method and the device, the file downloading speed can be improved.

Description

File downloading method and related product
Technical Field
The application relates to the technical field of communication, and mainly relates to a file downloading method and a related product.
Background
With the development of communication technology and electronic device technology, more and more functions are integrated on electronic devices (such as mobile phones, tablet computers, and the like), downloading files directly through the electronic devices becomes a common thing, and how to increase the file downloading rate is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application provides a file downloading method and a related product, which can improve the file downloading speed.
In a first aspect, an embodiment of the present application provides a file downloading method, which is applied to an electronic device, and the method includes:
if a downloading instruction for a target file is received, acquiring the size of a memory corresponding to the target file and network parameters corresponding to each target network in a plurality of target networks connected with the electronic equipment to obtain a plurality of network parameters;
dividing the target file into a plurality of data packets to be downloaded according to the memory size and the plurality of network parameters, wherein each data packet to be downloaded corresponds to one target network;
generating a downloading request of a corresponding target network according to each data packet to be downloaded in the plurality of data packets to be downloaded, wherein the downloading request is used for requesting the corresponding target network to download the corresponding data packet to be downloaded;
sending a corresponding download request to each of the plurality of target networks;
receiving a data packet to be downloaded by each target network in the plurality of target networks to obtain a plurality of data packets to be downloaded;
and integrating the plurality of data packets to be downloaded to obtain the target file.
In a second aspect, an embodiment of the present application provides a file downloading apparatus, which is applied to an electronic device, and the apparatus includes:
the communication unit is used for receiving a downloading instruction aiming at the target file;
the processing unit is used for acquiring the memory size corresponding to the target file and the network parameter corresponding to each target network in a plurality of target networks connected with the electronic equipment to obtain a plurality of network parameters; dividing the target file into a plurality of data packets to be downloaded according to the memory size and the plurality of network parameters, wherein each data packet to be downloaded corresponds to one target network; generating a downloading request of a corresponding target network according to each data packet to be downloaded in the plurality of data packets to be downloaded, wherein the downloading request is used for requesting the corresponding target network to download the corresponding data packet to be downloaded;
the communication unit is further configured to send a corresponding download request to each of the plurality of target networks; receiving a data packet to be downloaded by each target network in the plurality of target networks to obtain a plurality of data packets to be downloaded;
the processing unit is further configured to integrate the multiple data packets to be downloaded to obtain the target file.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for some or all of the steps described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, where the computer program makes a computer perform some or all of the steps as described in the first aspect of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, if the electronic device receives a download instruction for a target file, the memory size corresponding to the target file and the network parameter corresponding to each of a plurality of target networks connected to the electronic device are obtained to obtain a plurality of network parameters. Then, the target file is divided into data packets to be downloaded corresponding to each target network in the target networks according to the memory size and the network parameters to obtain a plurality of data packets to be downloaded, and a downloading request of the corresponding target network is generated according to each data packet to be downloaded in the data packets to be downloaded. Then, a corresponding downloading request is sent to each target network in the plurality of target networks, a data packet to be downloaded by each target network in the plurality of target networks is waited to be received to obtain the plurality of data packets to be downloaded, and finally the plurality of data packets to be downloaded are integrated to obtain the target file. Therefore, the data packets to be downloaded are respectively downloaded through the target networks connected with the electronic equipment and then data integration is carried out, so that the file downloading speed is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
fig. 1 is a schematic flowchart of a file downloading method according to an embodiment of the present application;
fig. 2 is a network architecture diagram of a file downloading system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a file downloading device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic devices involved in the embodiments of the present application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with wireless communication functions, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal equipment (terminal device), and so on. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices. The following describes embodiments of the present application in detail.
The embodiment of the application provides a file downloading method and a related product, which can improve the file downloading speed.
Referring to fig. 1, an embodiment of the present application provides a flowchart illustrating a file downloading method. The file downloading method is applied to an electronic device, the electronic device supports connection with multiple networks, and the application is not limited to a network, for example, as shown in a network architecture diagram shown in fig. 2, the electronic device 100 may be connected to a mobile data network provided by a first base station 102, and the mobile data network may provide networks of different frequency bands, for example: a second Generation mobile phone communication technology specification (2G) network, a third Generation mobile communication technology (3rd-Generation, 3G) network, a fourth Generation mobile communication technology (4G) network, and a fifth Generation mobile communication technology (5th-Generation, 5G) network; the electronic device 100 may also be connected to a wireless network provided by a different device, such as: a first hotspot device 104, a first router 106; the electronic device 100 may also be connected to networks of different frequency bands provided by the same device, for example: the first router 106 provides 2.4GHz and 5GHz wireless networks.
For the security of the wireless network, an identity step is set, that is, when the electronic device accesses the wireless network, the wireless network needs to verify the identity information of the electronic device, and when the verification is successful, a network connection is established with the electronic device, for example: named sanhuan for wireless networks, the authentication password is 65498231, then if and only if the electronic device commits 65498231, the wireless network establishes a connection with the electronic device.
For its security, the electronic device performs security detection on a connectable network or performs security protection on the electronic device, in one possible example, the method further includes: acquiring an application type of a foreground application and a network connection type used by the foreground application; and when the network connection type is a wireless network with potential safety hazard or the application type is a preset potential safety hazard type, establishing connection with a target virtual private network server according to a preset connection rule.
The foreground application is opposite to the background application, namely the foreground application is an application program called by a current display page of the electronic equipment. The application type of the foreground application is an application type to which the application belongs, for example: friends making, online shopping, payment, etc.; the network connection types used by the foreground application include various wireless local area networks, such as Wi-Fi, and also include mobile communication networks of various network standards provided by mobile operators.
The preset hidden danger type is possibly related to application such as privacy or benefit correlation of the electronic equipment user, and the specific preset hidden danger type is not limited in the embodiment of the invention. For example: the online shopping category and the payment category relate to money transaction, purchasing habit and the like, and the friend making category relates to friend information, conversation content and the like; the application type may also be an application type set by the user, that is, the user sets the application type to be protected as a preset hidden danger type according to recommended setting and/or understanding thereof, for example: and the user sets the shooting type as a preset hidden danger type besides the application type in the recommendation setting.
The method is not limited to the preset connection rule, and can be used for acquiring the input user name, password and configuration information when the electronic equipment is connected with the target virtual private network server for the first time; when the configuration information is matched with the preset format, establishing connection with a target virtual private network server according to the configuration information, and storing a user name, a password and the configuration information; when the electronic equipment is not connected with the target virtual private network server for the first time, acquiring an input user name and a password; and when the user name and the password pass the verification, acquiring configuration information corresponding to the user name, and establishing connection with the target virtual private network server according to the configuration information. The embodiment of the present invention is also not limited to the preset connection rule.
Virtual Private Network (VPN) refers to a technology for establishing a Private Network on a public Network. It can be understood that if the network connection type of the foreground application is a wireless network with potential safety hazard or the application type of the foreground application is a preset potential safety hazard type, the connection is established with the target virtual private network server according to a preset connection rule. Therefore, the network environment used by the electronic equipment is encrypted and communicated through the target virtual private network server, namely a safe transmission channel is established, and the safety of data transmission is improved.
Specifically, as shown in fig. 1, a file downloading method includes:
s101: if a downloading instruction for a target file is received, acquiring the size of a memory corresponding to the target file and a network parameter corresponding to each target network in a plurality of target networks connected with the electronic equipment to obtain a plurality of network parameters.
In the application, the target file may be a multimedia file such as video or audio actively cached by a user, or may be an update package or an installation package of an application; but also files to be received, etc. The download instruction is used to instruct the electronic device to download the target file, and it is understood that the target file can be downloaded in response to the download instruction if the network allows it.
The size of the memory is a temporary storage space of the target file, and the network parameters may include signal strength, network rate, network cost, and the like, which are not limited herein. It can be understood that when the network parameters meet the basic requirements of downloading, the target file can be downloaded, and the downloading time can be estimated according to the memory size and the network parameters.
If the electronic device has started the mobile network and the wireless network, the connected network may be selected according to the current network demand state or the network support state, where the network support state may include corresponding support degrees of network charges, network rates, network signals, and the like, and the network demand state is a demand for the network rate, for example: in the screen locking state, a wireless network is adopted for background refreshing; when a plurality of applications are operated, the characters are cached by adopting a data mobile network, the pictures or videos are cached by adopting a wireless network, and different applications can be operated by adopting different wireless networks.
In this application, a target network is used for an electronic device to download a target file, and a network convenient for increasing a download rate needs to be selected from the above-mentioned connected networks, and the method for selecting the target network is not limited in this application, and in a possible example, the method further includes: determining a plurality of reference networks corresponding to the target moving route; determining a connection record between each reference network of the plurality of reference networks and the electronic device to obtain a plurality of connection records; determining a communication quality value of each of the plurality of reference networks according to the plurality of connection records to obtain a plurality of communication quality values; and taking the reference network corresponding to the communication quality value larger than the target threshold value in the plurality of communication quality values as a target network to obtain the plurality of target networks.
The target moving route is a route that the electronic device may move, and the method for determining the target moving route is not limited in the present application, and in one possible example, the method further includes: determining a current location and a current time of the electronic device; determining a plurality of historical movement trajectories corresponding to the current position and the current time; and determining the target moving route according to the plurality of historical moving tracks.
In the present application, the current time may be determined according to a time manager of the electronic device; the current location may be determined by a Positioning module of the electronic device, which may be a Global Positioning System (GPS) module or a Wireless Local Area Network (WLAN) module; the electronic device may also determine the current location of the electronic device from the location of the connected network device, and the distance between the electronic device and the network device or the network speed at which the electronic device searches for the network device, which may reflect the distance between the electronic device and the network device to some extent, i.e., the current location of the electronic device is determined from the location of the fixed network device and the distance between the network device and the electronic device.
The GPS module utilizes a GPS positioning satellite to perform positioning and navigation in real time in a global range; the WLAN module uses radio frequency technology and electromagnetic waves to perform communication connection in the air, and its positioning method may be according to the connected hotspot device, for example: a wireless router or an electronic device that turns on a hotspot, etc.
In the present application, the historical movement path is a historical movement route corresponding to the current time and the current position, for example: during work, the historical movement track is basically an active area of an office; when the user goes home from work, the historical moving track is basically a route from a company address to a family address; during the vacation, the historical movement track is basically an activity area in the home or a shopping mall on frequent trips, etc.
It can be understood that the current position and the current time of the electronic device are determined, then the corresponding multiple historical movement tracks are determined according to the current position and the current time, and finally the target movement route of the electronic device is determined according to the multiple historical movement tracks. That is to say, the moving route which may occur in the current state is determined according to the historical moving track of the electronic device, so that the accuracy of the moving route is improved conveniently.
In the application, the reference network is a network which is successfully verified in the target moving route, namely a network which can be used for the electronic equipment to download the target file; the connection record is a record of the previous connection between the reference network and the electronic device, and may include connection parameters such as connection duration, connection times, network usage, connection security, and network disconnection times.
The method for determining the communication quality value is not limited, and determination can be performed according to the connection parameters of all dimensions in the connection record, namely, the connection parameters of different dimensions are subjected to weighted calculation. The target threshold value is not limited, and can be determined according to the file type and the file size of the target file.
It can be understood that the security and the downloading rate of the target network for downloading the target file can be improved by determining a plurality of reference networks corresponding to the target moving route, determining the connection records between each reference network and the electronic equipment to obtain a plurality of connection records, determining the communication quality value between each reference network and the electronic equipment according to the connection record between each reference network and the electronic equipment, and taking the reference network corresponding to the communication quality value larger than the target threshold value as the target network.
S102: and dividing the target file into a plurality of data packets to be downloaded according to the memory size and the plurality of network parameters, wherein each data packet to be downloaded corresponds to one target network.
In a possible example, the dividing the target file into a plurality of data packets to be downloaded according to the memory size and the plurality of network parameters includes: determining a distribution proportion corresponding to each target network in the plurality of target networks according to the plurality of network parameters to obtain a plurality of distribution proportions; and determining a downloading request of each sub-data packet to be downloaded in each target network in the plurality of target networks and identification information corresponding to each sub-data packet according to the distribution proportions and the memory size.
The allocation specific gravity is a specific gravity of the target file allocated to each target network, that is, the memory size is divided according to the allocation specific gravity, and a plurality of memory sub-sizes can be obtained, for example: the memory size is 1M, the allocation specific gravity is 3: 2: 2: 1, since 1M is 1024kb, the memory size is 384kb, 256kb, 128 kb.
The method for determining the allocation weight is not limited in this application, and in a possible example, the determining the allocation weight corresponding to each of the target networks according to the network parameters to obtain a plurality of allocation weights includes: determining a target movement route of the electronic device; determining a network speed change range corresponding to each target network in the target networks and the target moving route according to the network parameters to obtain a plurality of network speed change ranges; and determining the distribution proportion corresponding to each target network in the target networks according to the network speed change ranges to obtain the distribution proportions.
The target moving route may refer to the description of step S101, and is not described herein again.
Since different networks are located at different positions due to distance or obstruction, the corresponding signal strengths are not uniform, i.e., the available network speeds are different. In the application, the network speed variation range corresponding to each target network is determined according to the area corresponding to the target moving route and a plurality of network parameters.
The method for determining the distribution proportion according to the network speed variation range is not limited, the method can be divided into a plurality of time periods, the weight of each time period is determined, and the weight is larger the earlier the time is; and then, counting the ratio in the corresponding time period in each network speed change range, and calculating the distribution proportion according to the weight and the ratio, so that the network speed change range and the downloading completion degree of each time period are considered, and the accuracy of determining the distribution proportion is improved conveniently.
It can be understood that the current position and the current time of the electronic device are determined, then the network speed change range corresponding to each target network and the target moving route in the plurality of target networks is determined according to the plurality of network parameters to obtain a plurality of network speed change ranges, and then the distribution proportion corresponding to each target network is determined according to the plurality of network speed ranges.
S103: and generating a corresponding downloading request of the target network according to each data packet to be downloaded in the plurality of data packets to be downloaded.
S104: and sending a corresponding downloading request to each target network in the plurality of target networks.
S105: and receiving the data packets to be downloaded of each target network in the plurality of target networks to obtain the plurality of data packets to be downloaded.
In the present application, the download request is used to request the corresponding target network to download the corresponding data packet to be downloaded. That is, when the target network receives the download request, the target network responds to the download request, i.e., downloads the corresponding to-be-downloaded data packet.
In one possible embodiment, the method further comprises: acquiring a downloading time length corresponding to a target network i; when the downloading duration is reached, if the downloading state of the data packet to be downloaded corresponding to the target network i is a fault state, selecting an alternative target network from the plurality of target networks; sending a downloading request corresponding to the target network i to the alternative target network; and receiving a data packet to be downloaded corresponding to the target network i downloaded by the alternative target network.
In this application, the target network i is any one of the target networks, and the downloading duration may be obtained according to a network speed variation range corresponding to the target network i and a memory size of the data packet to be downloaded.
The method for determining the downloading state of the target network i as the fault state is not limited, and fault information sent by the target network i can be acquired; and the downloading parameter of the target network i can also be obtained again, and if the downloading parameter does not meet the preset condition, the fault of the target network i is determined, and the like.
The method for selecting the alternative target network is not limited in the present application, and may be a network with the highest communication quality value among a plurality of target networks, where the communication quality value may refer to the method described in step S101, and is not described herein again; the network may be a network provided by a network access device closest to the electronic device, or a network with the fastest network speed.
It can be understood that, if the download state is the failure state when the corresponding download duration of one of the target networks arrives, the failure of the target network is determined, an alternative target network is selected from the target networks, a download request corresponding to the failed target network is sent to the alternative target network, and a to-be-downloaded data packet downloaded by the alternative target network is received, so that the failure processing capability is improved.
S106: and integrating the plurality of data packets to be downloaded to obtain the target file.
In this application, each to-be-downloaded data packet carries a segmentation position identifier, where the segmentation position identifier may be a number of a last byte in the to-be-downloaded data packet, for example: the data packets to be downloaded are 0-100 bytes, 101-200 bytes and 201-260 bytes, and the division positions are marked as 100, 200 and 260; or the serial number of the data to be downloaded, and if the serial numbers of the data packets to be downloaded are 1, 2 and 3, the division position identifiers are 1, 2 and 3.
If each data packet to be downloaded carries a partition position identifier, the integrating the multiple data packets to be downloaded to obtain the target file comprises: and integrating the plurality of data packets to be downloaded according to the segmentation position identification to obtain the target file.
It can be understood that the target file is obtained by integrating the plurality of data packets to be downloaded according to the division position identifiers, so that the target file can be obtained by directly integrating data according to the division position identifiers of the data packets to be downloaded, and thus, the efficiency of data integration is improved.
In the file downloading method shown in fig. 1, if the electronic device receives a downloading instruction for a target file, the memory size corresponding to the target file and the network parameter corresponding to each of a plurality of target networks connected to the electronic device are obtained to obtain a plurality of network parameters. Then, the target file is divided into data packets to be downloaded corresponding to each target network in the target networks according to the memory size and the network parameters to obtain a plurality of data packets to be downloaded, and a downloading request of the corresponding target network is generated according to each data packet to be downloaded in the data packets to be downloaded. Then, a corresponding downloading request is sent to each target network in the plurality of target networks, a data packet to be downloaded by each target network in the plurality of target networks is waited to be received to obtain the plurality of data packets to be downloaded, and finally the plurality of data packets to be downloaded are integrated to obtain the target file. Therefore, the data packets to be downloaded are respectively downloaded through the target networks connected with the electronic equipment and then data integration is carried out, so that the file downloading speed is improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a file downloading device according to an embodiment of the present application, and the file downloading device is applied to the electronic device shown in fig. 2. Specifically, as shown in fig. 3, the file downloading apparatus 300 includes:
the communication unit 301 is used for receiving a downloading instruction for a target file;
the processing unit 302 is configured to obtain a memory size corresponding to the target file and a network parameter corresponding to each target network in a plurality of target networks connected to the electronic device, so as to obtain a plurality of network parameters; dividing the target file into a plurality of data packets to be downloaded according to the memory size and the plurality of network parameters, wherein each data packet to be downloaded corresponds to one target network; generating a downloading request of a corresponding target network according to each data packet to be downloaded in the plurality of data packets to be downloaded, wherein the downloading request is used for requesting the corresponding target network to download the corresponding data packet to be downloaded;
the communication unit 301 is further configured to send a corresponding download request to each of the multiple target networks; receiving a data packet to be downloaded by each target network in the plurality of target networks to obtain a plurality of data packets to be downloaded;
the processing unit 302 is further configured to integrate the multiple data packages to be downloaded to obtain the target file.
It can be understood that, if the electronic device receives a download instruction for a target file, the memory size corresponding to the target file and the network parameter corresponding to each of a plurality of target networks connected to the electronic device are obtained to obtain a plurality of network parameters. Then, the target file is divided into data packets to be downloaded corresponding to each target network in the target networks according to the memory size and the network parameters to obtain a plurality of data packets to be downloaded, and a downloading request of the corresponding target network is generated according to each data packet to be downloaded in the data packets to be downloaded. Then, a corresponding downloading request is sent to each target network in the plurality of target networks, a data packet to be downloaded by each target network in the plurality of target networks is waited to be received to obtain the plurality of data packets to be downloaded, and finally the plurality of data packets to be downloaded are integrated to obtain the target file. Therefore, the data packets to be downloaded are respectively downloaded through the target networks connected with the electronic equipment and then data integration is carried out, so that the file downloading speed is improved.
In a possible example, in the aspect that the target file is divided into a plurality of data packets to be downloaded according to the memory size and the plurality of network parameters, the processing unit 302 is specifically configured to determine, according to the plurality of network parameters, a distribution weight corresponding to each target network in the plurality of target networks, so as to obtain a plurality of distribution weights; and determining a downloading request of each sub-data packet to be downloaded in each target network in the plurality of target networks and identification information corresponding to each sub-data packet according to the distribution proportions and the memory size.
In a possible example, in the aspect of determining, according to the plurality of network parameters, an allocation weight corresponding to each of the plurality of target networks to obtain a plurality of allocation weights, the processing unit 302 is specifically configured to determine a target moving route of the electronic device; determining a network speed variation range corresponding to each target network in the target networks and the target moving route according to the network parameters to obtain a plurality of network speed variation ranges; and determining the distribution proportion corresponding to each target network in the target networks according to the network speed change ranges to obtain the distribution proportions.
In one possible example, in the aspect of determining the target moving route of the electronic device, the processing unit 302 is specifically configured to determine a current location and a current time of the electronic device; determining a plurality of historical movement trajectories corresponding to the current position and the current time; and determining the target moving route according to the plurality of historical moving tracks.
In one possible example, the processing unit 302 is further configured to determine a plurality of reference networks corresponding to the target moving route; determining a connection record between each reference network in the plurality of reference networks and the electronic device to obtain a plurality of connection records; determining a communication quality value of each reference network in the plurality of reference networks according to the plurality of connection records to obtain a plurality of communication quality values; and taking the reference network corresponding to the communication quality value larger than the target threshold value in the plurality of communication quality values as a target network to obtain the plurality of target networks.
In a possible example, each to-be-downloaded data packet carries a partition location identifier, and in the aspect of integrating the multiple to-be-downloaded data packets to obtain the target file, the processing unit 302 is specifically configured to integrate the multiple to-be-downloaded data packets according to the partition location identifiers to obtain the target file.
In a possible example, the processing unit 302 is further configured to obtain a download duration corresponding to a target network i, where the target network i is any one of the target networks; when the downloading duration is reached, if the downloading state of the data packet to be downloaded corresponding to the target network i is a fault state, selecting an alternative target network from the plurality of target networks; the communication unit 301 is further configured to send a download request corresponding to the target network i to the alternative target network; and receiving a data packet to be downloaded corresponding to the target network i downloaded by the alternative target network.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, consistent with the embodiment shown in fig. 1. As shown in fig. 4, the electronic device 400 includes a processor 410, a memory 420, a communication interface 430, and one or more programs 440, wherein the one or more programs 440 are stored in the memory 420 and configured to be executed by the processor 410, and wherein the programs 440 include instructions for:
if a download instruction for a target file is received, acquiring the size of a memory corresponding to the target file and a network parameter corresponding to each target network in a plurality of target networks connected to the electronic device 400 to obtain a plurality of network parameters;
dividing the target file into a plurality of data packets to be downloaded according to the memory size and the plurality of network parameters, wherein each data packet to be downloaded corresponds to one target network;
generating a downloading request of a corresponding target network according to each data packet to be downloaded in the plurality of data packets to be downloaded, wherein the downloading request is used for requesting the corresponding target network to download the corresponding data packet to be downloaded;
sending a corresponding download request to each of the plurality of target networks;
receiving a data packet to be downloaded by each target network in the plurality of target networks to obtain a plurality of data packets to be downloaded;
and integrating the plurality of data packets to be downloaded to obtain the target file.
It can be understood that, if the electronic device 400 receives a download instruction for a target file, the memory size corresponding to the target file and the network parameter corresponding to each of a plurality of target networks connected to the electronic device 400 are obtained to obtain a plurality of network parameters. Then, the target file is divided into data packets to be downloaded corresponding to each target network in the target networks according to the memory size and the network parameters to obtain a plurality of data packets to be downloaded, and a downloading request of the corresponding target network is generated according to each data packet to be downloaded in the data packets to be downloaded. Then, a corresponding downloading request is sent to each target network in the plurality of target networks, a data packet to be downloaded by each target network in the plurality of target networks is waited to be received to obtain the plurality of data packets to be downloaded, and finally the plurality of data packets to be downloaded are integrated to obtain the target file. In this way, the data packets to be downloaded are downloaded through the plurality of target networks connected to the electronic device 400, respectively, and then data integration is performed, thereby increasing the file download rate.
In a possible example, in the aspect that the target file is divided into a plurality of data packets to be downloaded according to the memory size and the plurality of network parameters, the instructions in the program 440 are specifically configured to perform the following operations:
determining the distribution proportion corresponding to each target network in the plurality of target networks according to the plurality of network parameters to obtain a plurality of distribution proportions;
and determining a downloading request of each sub-data packet to be downloaded in each target network in the plurality of target networks and identification information corresponding to each sub-data packet according to the distribution proportions and the memory size.
In one possible example, in the aspect that the determining, according to the plurality of network parameters, the allocation weight corresponding to each of the plurality of target networks to obtain a plurality of allocation weights, the instructions in the program 440 are specifically configured to perform the following operations:
determining a target movement route of the electronic device 400;
determining a network speed variation range corresponding to each target network in the target networks and the target moving route according to the network parameters to obtain a plurality of network speed variation ranges;
and determining the distribution proportion corresponding to each target network in the target networks according to the network speed change ranges to obtain the distribution proportions.
In one possible example, in the aspect of determining the target movement route of the electronic device 400, the instructions in the program 440 are specifically configured to:
determining a current location and a current time of the electronic device 400;
determining a plurality of historical movement trajectories corresponding to the current position and the current time;
and determining the target moving route according to the plurality of historical moving tracks.
In one possible example, the instructions in the program 440 are further configured to:
determining a plurality of reference networks corresponding to the target moving route;
determining a connection record between each of the plurality of reference networks and the electronic device 400 to obtain a plurality of connection records;
determining a communication quality value of each reference network in the plurality of reference networks according to the plurality of connection records to obtain a plurality of communication quality values;
and taking the reference network corresponding to the communication quality value larger than the target threshold value in the plurality of communication quality values as a target network to obtain the plurality of target networks.
In a possible example, each to-be-downloaded data packet carries a partition location identifier, and in the aspect of integrating the multiple to-be-downloaded data packets to obtain the target file and obtain the target file, the instruction in the program 440 is specifically configured to perform the following operations:
and integrating the plurality of data packets to be downloaded according to the segmentation position identification to obtain the target file.
In one possible example, the instructions in the program 440 are further configured to:
acquiring a downloading time length corresponding to a target network i, wherein the target network i is any one of the target networks;
when the downloading duration is reached, if the downloading state of the data packet to be downloaded corresponding to the target network i is a fault state, selecting an alternative target network from the plurality of target networks;
sending a downloading request corresponding to the target network i to the alternative target network;
and receiving a data packet to be downloaded corresponding to the target network i downloaded by the alternative target network.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for causing a computer to execute a part or all of the steps of any one of the methods as described in the method embodiments, and the computer includes an electronic device.
Embodiments of the application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as recited in the method embodiments. The computer program product may be a software installation package and the computer comprises the electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art will also appreciate that the embodiments described in this specification are presently preferred and that no particular act or mode of operation is required in the present application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a hardware mode or a software program mode.
The integrated unit, if implemented in the form of a software program module and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A file downloading method is applied to electronic equipment, and the method comprises the following steps:
if a downloading instruction for a target file is received, acquiring the size of a memory corresponding to the target file and network parameters corresponding to each target network in a plurality of target networks connected with the electronic equipment to obtain a plurality of network parameters;
determining a target movement route of the electronic device;
determining a network speed variation range corresponding to each target network in the target networks and the target moving route according to the network parameters to obtain a plurality of network speed variation ranges;
dividing a plurality of time periods, and determining the weight of each time period, wherein the weight is larger the earlier the time is; then, the ratio in the corresponding time period in each network speed variation range is counted, and the distribution proportion corresponding to each target network in the target networks is determined by calculation according to the weight and the ratio to obtain a plurality of distribution proportions;
determining a downloading request of a sub data packet to be downloaded of each target network in the plurality of target networks and identification information corresponding to each sub data packet according to the distribution proportions and the size of the memory, wherein each data packet to be downloaded corresponds to one target network;
generating a downloading request of a corresponding target network according to each data packet to be downloaded in a plurality of data packets to be downloaded, wherein the downloading request is used for requesting the corresponding target network to download the corresponding data packet to be downloaded;
sending a corresponding download request to each of the plurality of target networks;
receiving a data packet to be downloaded by each target network in the plurality of target networks to obtain a plurality of data packets to be downloaded;
and integrating the plurality of data packets to be downloaded to obtain the target file.
2. The method of claim 1, wherein the determining the target movement route of the electronic device comprises:
determining a current location and a current time of the electronic device;
determining a plurality of historical movement trajectories corresponding to the current position and the current time;
and determining the target moving route according to the plurality of historical moving tracks.
3. The method of claim 1, further comprising:
determining a plurality of reference networks corresponding to the target moving route;
determining a connection record between each reference network in the plurality of reference networks and the electronic device to obtain a plurality of connection records;
determining a communication quality value of each reference network in the plurality of reference networks according to the plurality of connection records to obtain a plurality of communication quality values;
and taking the reference network corresponding to the communication quality value larger than the target threshold value in the plurality of communication quality values as a target network to obtain the plurality of target networks.
4. The method according to any one of claims 1 to 3, wherein each to-be-downloaded data packet carries a division position identifier, and the integrating the plurality of to-be-downloaded data packets to obtain the target file comprises:
and integrating the plurality of data packets to be downloaded according to the segmentation position identification to obtain the target file.
5. The method according to any one of claims 1-3, further comprising:
acquiring a downloading time length corresponding to a target network i, wherein the target network i is any one of the target networks;
when the downloading duration is reached, if the downloading state of the data packet to be downloaded corresponding to the target network i is a fault state, selecting an alternative target network from the plurality of target networks;
sending a downloading request corresponding to the target network i to the alternative target network;
and receiving a data packet to be downloaded corresponding to the target network i downloaded by the alternative target network.
6. A file downloading apparatus, applied to an electronic device, the apparatus comprising:
the communication unit is used for receiving a downloading instruction aiming at the target file;
the processing unit is used for acquiring the memory size corresponding to the target file and the network parameter corresponding to each target network in a plurality of target networks connected with the electronic equipment to obtain a plurality of network parameters; and a target moving route for determining the electronic device, determining a network speed variation range corresponding to the target moving route for each target network in the plurality of target networks according to the plurality of network parameters to obtain a plurality of network speed variation ranges, dividing a plurality of time periods, determining the weight of each time period, wherein the earlier the time is, the larger the weight is, then counting the ratio of each time period in the network speed variation range, then calculating according to the weight and the ratio to determine the distribution proportion corresponding to each target network in the target network to obtain a plurality of distribution proportions, determining a download request of each sub-packet to be downloaded in each target network of the plurality of target networks according to the distribution proportions and the memory size, and identification information corresponding to each sub data packet, wherein each data packet to be downloaded corresponds to a target network; generating a downloading request of a corresponding target network according to each data packet to be downloaded in a plurality of data packets to be downloaded, wherein the downloading request is used for requesting the corresponding target network to download the corresponding data packet to be downloaded;
the communication unit is further configured to send a corresponding download request to each of the plurality of target networks; receiving a data packet to be downloaded by each target network in the plurality of target networks to obtain a plurality of data packets to be downloaded;
the processing unit is further configured to integrate the multiple data packets to be downloaded to obtain the target file.
7. An electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method of any of claims 1-5.
8. A computer-readable storage medium for storing a computer program, wherein the computer program causes a computer to perform the method according to any one of claims 1-5.
CN201811382591.8A 2018-11-19 2018-11-19 File downloading method and related product Active CN109561138B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811382591.8A CN109561138B (en) 2018-11-19 2018-11-19 File downloading method and related product
PCT/CN2019/109999 WO2020103585A1 (en) 2018-11-19 2019-10-08 File downloading method and related products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811382591.8A CN109561138B (en) 2018-11-19 2018-11-19 File downloading method and related product

Publications (2)

Publication Number Publication Date
CN109561138A CN109561138A (en) 2019-04-02
CN109561138B true CN109561138B (en) 2021-04-13

Family

ID=65866800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811382591.8A Active CN109561138B (en) 2018-11-19 2018-11-19 File downloading method and related product

Country Status (2)

Country Link
CN (1) CN109561138B (en)
WO (1) WO2020103585A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109561138B (en) * 2018-11-19 2021-04-13 Oppo广东移动通信有限公司 File downloading method and related product
CN110825402B (en) * 2019-09-26 2021-06-22 华为技术有限公司 Method and device for downloading data packet
CN110650546B (en) * 2019-09-29 2023-08-15 Tcl移动通信科技(宁波)有限公司 File transmission method, device, storage medium and terminal
CN110784520A (en) * 2019-09-30 2020-02-11 北京字节跳动网络技术有限公司 File downloading method and device and electronic equipment
CN111901897A (en) * 2020-07-28 2020-11-06 Tcl通讯(宁波)有限公司 Data downloading method and device, storage medium and terminal
CN112379838A (en) * 2020-11-13 2021-02-19 Oppo广东移动通信有限公司 Data downloading method and device, storage medium and electronic equipment
CN115622992B (en) * 2022-09-09 2024-05-14 建信金融科技有限责任公司 File downloading method, device, equipment and medium based on Wi-Fi direct connection
CN118590134A (en) * 2024-08-07 2024-09-03 西安紫光展锐科技有限公司 Data transmission method, apparatus, device, storage medium, and program product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635916A (en) * 2009-08-11 2010-01-27 中兴通讯股份有限公司 Method and system for loading resources based on multi-mode mobile terminal
CN103179171A (en) * 2011-12-26 2013-06-26 中国移动通信集团山东有限公司 File transmission method and device based on distribution type system framework
CN103200606A (en) * 2013-03-18 2013-07-10 东莞宇龙通信科技有限公司 Terminal and data service processing method
CN103580842A (en) * 2013-11-04 2014-02-12 惠州Tcl移动通信有限公司 Method and system for conducting parallel transmission through multiple types of wireless links
CN104640224A (en) * 2013-11-12 2015-05-20 华为技术有限公司 Network data transmission method, device and system
CN105228133A (en) * 2015-07-10 2016-01-06 努比亚技术有限公司 Multi-channel data method for down loading and system
CN105512317A (en) * 2015-12-17 2016-04-20 南京航空航天大学 Method for indexing uncertain moving objects on basis of group division

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101389092B (en) * 2007-09-12 2011-09-21 中兴通讯股份有限公司 Downloading method using double threads of double mode double standby mobile phone
CN102215481B (en) * 2011-07-14 2015-04-08 宇龙计算机通信科技(深圳)有限公司 Mobile terminal and resource downloading method
CN103024593A (en) * 2012-12-26 2013-04-03 人民搜索网络股份公司 Online VOD (video on demand) acceleration system and online VOD playing method
CN104836822B (en) * 2014-02-10 2019-04-26 腾讯科技(深圳)有限公司 Obtain downloading data method and device, the method and system of downloading data
CN105656955B (en) * 2014-11-11 2019-07-23 华为数字技术(苏州)有限公司 Document handling method, apparatus and system
CN105049452B (en) * 2015-08-25 2018-04-20 广东欧珀移动通信有限公司 Switching method, device and the intelligent terminal of resource downloading mode
US20170142186A1 (en) * 2015-11-17 2017-05-18 Le Holdings (Beijing) Co., Ltd. Method, apparatus, and electronic device for downloading files
CN105978754B (en) * 2016-05-13 2019-05-17 中国联合网络通信集团有限公司 A kind of network quality detection method and gateway
CN108234247B (en) * 2018-01-25 2020-06-23 网宿科技股份有限公司 Method and system for detecting network quality
CN108512937B (en) * 2018-04-17 2020-10-30 银川华联达科技有限公司 Computer data sharing system based on mobile network
CN109561138B (en) * 2018-11-19 2021-04-13 Oppo广东移动通信有限公司 File downloading method and related product

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635916A (en) * 2009-08-11 2010-01-27 中兴通讯股份有限公司 Method and system for loading resources based on multi-mode mobile terminal
CN103179171A (en) * 2011-12-26 2013-06-26 中国移动通信集团山东有限公司 File transmission method and device based on distribution type system framework
CN103200606A (en) * 2013-03-18 2013-07-10 东莞宇龙通信科技有限公司 Terminal and data service processing method
CN103580842A (en) * 2013-11-04 2014-02-12 惠州Tcl移动通信有限公司 Method and system for conducting parallel transmission through multiple types of wireless links
CN104640224A (en) * 2013-11-12 2015-05-20 华为技术有限公司 Network data transmission method, device and system
CN105228133A (en) * 2015-07-10 2016-01-06 努比亚技术有限公司 Multi-channel data method for down loading and system
CN105512317A (en) * 2015-12-17 2016-04-20 南京航空航天大学 Method for indexing uncertain moving objects on basis of group division

Also Published As

Publication number Publication date
WO2020103585A1 (en) 2020-05-28
CN109561138A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
CN109561138B (en) File downloading method and related product
US11002822B2 (en) Service enhancements using near field communication
CN113630763B (en) Method and apparatus for downloading profile in mobile communication system
US10757102B2 (en) Methods, apparatus, and systems for identity authentication
CN108574667B (en) Service flow control method and device
CN109548106B (en) Network connection method and related product
EP2900007A1 (en) Electronic device and method for performing geo-fencing based service
US20150163675A1 (en) Provisioning subscriptions to user devices
CN105657479A (en) Video processing method and device
JP2020501440A (en) Emergency number setting method, acquisition method and device
CN109964475A (en) The system and method for sending and receiving relaying notice
CN110429982B (en) Data transmission method and related device
CN110771113B (en) Brushing amount terminal detection method and device
CN112449307B (en) Information pushing method and device, server and storage medium
CN108243399B (en) Method and device for realizing flow-free charging
KR101361831B1 (en) Method for providing contents download service using access point and apparatus therefor
CN111630883A (en) Method, device, communication equipment and storage medium for transmitting data
CN109451498B (en) Network authentication method and related product
CN113453216B (en) Method and device for determining user terminal equipment
CN107251506B (en) Terminal data opening control method and system
CN117597958A (en) Authentication and authorization method, device, communication equipment and storage medium
CN118302991A (en) Authentication method, authentication device, communication equipment and storage medium
CN116806423A (en) Method, device, communication equipment and storage medium for providing perception service
CN117597959A (en) Authentication and authorization method, device, communication equipment and storage medium
CN117440335A (en) Enhanced charging in cellular communication networks

Legal Events

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