CN115622992A - File downloading method, device, equipment and medium based on Wi-Fi direct connection - Google Patents

File downloading method, device, equipment and medium based on Wi-Fi direct connection Download PDF

Info

Publication number
CN115622992A
CN115622992A CN202211103567.2A CN202211103567A CN115622992A CN 115622992 A CN115622992 A CN 115622992A CN 202211103567 A CN202211103567 A CN 202211103567A CN 115622992 A CN115622992 A CN 115622992A
Authority
CN
China
Prior art keywords
file
downloaded
downloading
fragment
mobile
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.)
Granted
Application number
CN202211103567.2A
Other languages
Chinese (zh)
Other versions
CN115622992B (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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202211103567.2A priority Critical patent/CN115622992B/en
Publication of CN115622992A publication Critical patent/CN115622992A/en
Application granted granted Critical
Publication of CN115622992B publication Critical patent/CN115622992B/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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0231Traffic management, e.g. flow control or congestion control based on communication conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/23Manipulation of direct-mode connections

Landscapes

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

Abstract

The application belongs to the technical field of sharing systems, and provides a file downloading method, a device, equipment and a medium based on Wi-Fi direct connection.A mobile device acquires the size of a file to be downloaded corresponding to the identifier of the file to be downloaded in an acquired downloading request, acquires network environment information and identifiers of other mobile devices directly connected with the Wi-Fi of the mobile device, allocates fragmented downloading tasks for the mobile device and the other mobile devices when the size of the file to be downloaded and the network environment information meet fragmented downloading conditions, and sends the fragmented downloading tasks to the mobile devices corresponding to the identifiers of the other mobile devices for the mobile devices to download fragmented files; and downloading the fragment file according to the fragment downloading task to obtain a downloaded fragment file, and combining the downloaded fragment file and the downloaded fragment file transmitted by other mobile equipment into a downloaded file. The problem that mobile equipment downloads files from the Internet and possibly has long time consumption and high mobile flow consumption is solved.

Description

File downloading method, device, equipment and medium based on Wi-Fi direct connection
Technical Field
The present application relates to the field of sharing system technologies, and in particular, to a method, an apparatus, a device, and a medium for downloading a file based on Wi-Fi direct.
Background
Currently, the internet industry is developing vigorously, and a large amount of file resources are distributed on the internet for people to use. Users can download video, text, and audio files from the internet on demand. With the development of technology, users can download files from the internet only by means of computers, and the technology develops that files can be downloaded from the internet by means of mobile devices.
However, in the process of downloading a file directly from the internet, the mobile device may have the problems of long downloading time and high mobile traffic consumption, which results in low user experience.
Disclosure of Invention
The application provides a file downloading method, device, equipment and medium based on Wi-Fi direct connection, which are used for solving the problems that downloading time consumption is long and mobile traffic consumption is high in the process that a mobile device downloads a file directly from the Internet.
In a first aspect, the present application provides a file downloading method based on Wi-Fi direct, including:
the mobile equipment acquires the size of the file to be downloaded corresponding to the identifier of the file to be downloaded in the downloading request according to the acquired downloading request;
the mobile equipment acquires network environment information where the mobile equipment is located and identifications of other mobile equipment which are directly connected with the mobile equipment through Wi-Fi;
the mobile equipment judges whether the size of the file to be downloaded and the network environment information meet the fragment downloading condition or not;
when the mobile equipment judges that the size of the file to be downloaded and the network environment information meet the fragment downloading condition, distributing fragment downloading tasks for the mobile equipment and other mobile equipment according to the size of the file to be downloaded;
the mobile equipment respectively sends the fragment downloading tasks to the mobile equipment corresponding to the identifiers of the other mobile equipment so that the other mobile equipment can download fragment files according to the fragment downloading tasks;
the mobile equipment downloads the fragment file according to the fragment downloading task to acquire the downloaded fragment file;
and the mobile equipment combines the downloaded fragment file and the acquired downloaded fragment files sent by the other mobile equipment into a downloaded file.
In the preferred technical solution of the Wi-Fi direct-based file downloading method, if the network environment information includes a network speed and/or a network type, the determining whether the size of the file to be downloaded and the network environment information satisfy a fragmented download condition includes:
the mobile equipment determines the time to be downloaded according to the size of the file to be downloaded and the network speed;
the mobile equipment judges whether the time to be downloaded is greater than a preset time threshold value;
and when judging that the time to be downloaded is greater than the preset time threshold value, the mobile equipment determines that the fragment downloading condition is met.
In a preferred technical solution of the above Wi-Fi direct-based file downloading method, the method further includes:
when the mobile equipment judges that the time to be downloaded is less than or equal to the preset time threshold, judging whether the size of the file to be downloaded is greater than the preset threshold or not;
when the mobile equipment judges that the size of the file to be downloaded is larger than the preset threshold value, judging whether the network type is a wireless network type;
and when the mobile equipment judges that the network type is not the wireless network type, determining that the fragment downloading condition is met.
In an preferable technical solution of the above Wi-Fi direct-based file downloading method, the method further includes:
the mobile equipment acquires the downloading progress of the fragment files generated and sent by the other mobile equipment;
and the mobile equipment determines the mobile equipment to be adjusted according to the fragment file downloading progress and a preconfigured downloading progress threshold, and allocates the distributed fragment downloading tasks corresponding to the mobile equipment to be adjusted to the mobile equipment except the mobile equipment to be adjusted in the other mobile equipment.
In a preferred technical solution of the above Wi-Fi direct-based file downloading method, the method further includes:
the mobile equipment receives file acquisition requests sent by other mobile equipment;
and the mobile equipment sends the downloaded file to other mobile equipment.
In a second aspect, the present application provides a file downloading device based on Wi-Fi direct, including:
the acquisition module is used for acquiring the size of the file to be downloaded corresponding to the identifier of the file to be downloaded in the downloading request according to the acquired downloading request;
the acquisition module is further configured to acquire network environment information where the mobile device is located and identifiers of other mobile devices directly connected to the mobile device through Wi-Fi;
the processing module is used for judging whether the size of the file to be downloaded and the network environment information meet the fragment downloading condition or not;
the processing module is further configured to, when it is determined that the size of the file to be downloaded and the network environment information satisfy the fragmented download condition, allocate fragmented download tasks to the mobile device and the other mobile devices according to the size of the file to be downloaded;
the sending module is used for respectively sending the fragment downloading tasks to the mobile devices corresponding to the identifiers of the other mobile devices so that the other mobile devices can download the fragment files according to the fragment downloading tasks;
the processing module is further used for downloading the fragment file according to the fragment downloading task to obtain the downloaded fragment file;
the processing module is further configured to combine the downloaded slicing file and the acquired downloaded slicing files sent by the other mobile devices into a downloaded file.
In the above preferred technical solution of the file downloading device based on Wi-Fi direct, if the network environment information includes a network speed and/or a network type, the processing module is specifically configured to:
determining the time to be downloaded according to the size of the file to be downloaded and the network speed;
judging whether the time to be downloaded is greater than a preset time threshold value;
and when the time to be downloaded is judged to be greater than the preset time threshold value, determining that the fragment downloading condition is met.
In an preferable technical solution of the above Wi-Fi direct-based file downloading device, the processing module is further configured to:
when the time to be downloaded is judged to be less than or equal to the preset time threshold, judging whether the size of the file to be downloaded is greater than a preset threshold;
when the size of the file to be downloaded is judged to be larger than the preset threshold value, judging whether the network type is a wireless network type;
and when the network type is judged not to be the wireless network type, determining that the fragment downloading condition is met.
In the above preferred solution of the Wi-Fi direct based file downloading device,
the acquisition module is further configured to acquire a download progress of the fragment file generated and sent by the other mobile device;
the processing module is further configured to determine a mobile device to be adjusted according to the fragment file downloading progress and a preconfigured downloading progress threshold, and allocate an allocated fragment downloading task corresponding to the mobile device to be adjusted to a mobile device other than the mobile device to be adjusted in the other mobile devices.
In the above preferred solution of the file downloading device based on Wi-Fi direct,
the acquisition module is further configured to receive a file acquisition request sent by the other mobile device;
the sending module is further configured to send the downloaded file to the other mobile devices.
In a third aspect, the present application provides an electronic device, comprising:
a processor, a memory, a communication interface;
the memory is used for storing executable instructions executable by the processor;
wherein the processor is configured to perform the Wi-Fi direct based file download method of the first aspect via execution of the executable instructions.
In a fourth aspect, the present application provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, the method for downloading a file based on Wi-Fi direct according to the first aspect is implemented.
In a fifth aspect, the present application provides a computer program product comprising a computer program, which when executed by a processor, is configured to implement the method for downloading files based on Wi-Fi direct according to the first aspect.
The application provides a file downloading method, device, equipment and medium based on Wi-Fi direct connection. According to the file downloading method, the mobile equipment acquires the size of a file to be downloaded corresponding to the identifier of the file to be downloaded in the downloading request according to the acquired downloading request, and acquires the network environment information where the mobile equipment is located and the identifiers of other mobile equipment directly connected with the mobile equipment through Wi-Fi. The mobile equipment judges whether the size of the file to be downloaded and the network environment information meet the fragment downloading condition or not, and distributes a fragment downloading task to the mobile equipment and other mobile equipment according to the size of the file to be downloaded when the size of the file to be downloaded and the network environment information meet the fragment downloading condition. And the mobile equipment respectively sends the fragment downloading tasks to the mobile equipment corresponding to the identifiers of other mobile equipment so that the other mobile equipment can download the fragment files according to the fragment downloading tasks. In addition, the mobile device carries out fragment file downloading processing according to the fragment downloading task so as to obtain the downloaded fragment file. And the mobile equipment combines the downloaded slicing file and the downloaded slicing files sent by other acquired mobile equipment into a downloaded file, so that the slicing downloading of the file to be downloaded is realized. Compared with the prior art that when the mobile equipment directly downloads the file from the Internet, long downloading time consumption and high mobile traffic consumption may exist, when the application determines that the file to be downloaded needs to be fragmented and downloaded, the fragmentation downloading tasks are respectively sent to other mobile equipment directly connected with the mobile equipment Wi-Fi, so that other mobile equipment only download part of the file to be downloaded, the sharing of multiple mobile equipment of the downloading tasks is realized, the mobile traffic consumption of a single mobile equipment is reduced while the downloading time is shortened, the problems that the mobile equipment may have long downloading time consumption and high mobile traffic consumption in the process of directly downloading the file from the Internet are solved, and the use experience of a user 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 needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a system structure diagram of a Wi-Fi direct-based file downloading method provided in the present application;
fig. 2 is a schematic flowchart of a first embodiment of a file downloading method based on Wi-Fi direct according to the present application;
fig. 3 is a schematic flowchart of a second embodiment of a file downloading method based on Wi-Fi direct according to the present application;
fig. 4 is a schematic flowchart of a third embodiment of a file downloading method based on Wi-Fi direct according to the present application;
fig. 5 is a schematic flowchart of a fourth embodiment of a file downloading method based on Wi-Fi direct according to the present application;
fig. 6 is a schematic flowchart of a fifth embodiment of a file downloading method based on Wi-Fi direct according to the present application;
fig. 7 is a schematic flowchart of a sixth embodiment of a file downloading method based on Wi-Fi direct according to the present application;
fig. 8 is a schematic structural diagram of a file downloading device based on Wi-Fi direct according to the present application;
fig. 9 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 some embodiments of the present application, but not all embodiments. All other embodiments that can be made by one skilled in the art based on the embodiments in the present application in light of the present disclosure are within the scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings (if any) are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Currently, in the process of directly downloading a file from the internet by a user through mobile equipment, the problems of long downloading time consumption and high mobile traffic consumption may exist, and the user experience is low.
Based on the technical problems, the technical idea process of the application is as follows: how to realize the short time consumption and low mobile flow downloading of files by mobile equipment.
The file downloading scheme based on Wi-Fi direct provided by the present application is explained in detail below.
Fig. 1 is a system structure diagram of a file downloading method based on Wi-Fi direct according to the present application. As shown in fig. 1, the system architecture may include: server 101, mobile device 102, and other mobile devices. Illustratively, fig. 1 shows two other mobile devices, respectively mobile device 103 and mobile device 104.
Wherein, mobile device 103 and mobile device 104 are all connected to mobile device 102 via Wi-Fi direct, and mobile device 102, mobile device 103 and mobile device 104 are all connected to server 101 in communication.
It should be noted that fig. 1 is only a schematic structural diagram of a system of a file downloading method based on Wi-Fi direct according to an embodiment of the present application, and the embodiment of the present application does not limit actual forms of various devices included in fig. 1, nor limits an interaction manner between the devices in fig. 1, and in a specific application of a scheme, the configuration may be set according to actual requirements.
The technical solution of the present application will be described in detail below with reference to specific examples. It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a schematic flowchart of a first embodiment of a file downloading method based on Wi-Fi direct according to the present application. Referring to fig. 2, the file downloading method specifically includes the following steps:
step S201: and the mobile equipment acquires the size of the file to be downloaded corresponding to the identifier of the file to be downloaded in the downloading request according to the acquired downloading request.
When a user needs to download a file from the internet, the mobile device obtains a download request input by the user, wherein the download request comprises an identifier of the file to be downloaded. And the mobile equipment acquires the size of the file to be downloaded corresponding to the identifier based on the identifier of the file to be downloaded in the downloading request. Illustratively, the identification of the file to be downloaded may be used to identify audio file B of website a, and the size of the file to be downloaded may be 1024MB.
Step S202: the mobile device obtains the network environment information where the mobile device is located and the identification of other mobile devices which are directly connected with the mobile device through Wi-Fi.
In this embodiment, when the mobile device starts the Wi-Fi direct function, the mobile device may perform Wi-Fi direct connection with other peripheral mobile devices that start the Wi-Fi direct function as well. The mobile device acts as a server for the other mobile devices, the other mobile devices acting as clients for the mobile devices, the mobile device acting as a server can communicate with each of the other mobile devices acting as clients. For example, a mobile device may obtain the identity of other mobile devices that are Wi-Fi direct with the mobile device.
In addition, when the mobile device turns on a wireless network (Wi-Fi) function or a mobile traffic function to connect to a network, the mobile device may acquire network environment information in which the mobile device is currently located. Alternatively, the network environment information may be the wire speed of the network to which the mobile device is connected, for example, the wire speed may be 2MB/s. Optionally, the network environment information may be a network type of a network to which the mobile device is connected, for example, the network type may be a wireless network type, and may also be a mobile traffic type.
It should be noted that, when the mobile device starts the Wi-Fi direct function to transfer a file, the mobile device may simultaneously start a network connection function (a Wi-Fi function or a mobile traffic function) to download the file from the server, that is, two network connections may exist at the same time.
Step S203: the mobile equipment judges whether the size of the file to be downloaded and the network environment information meet the fragment downloading condition or not.
The mobile device can judge whether the file to be downloaded meets the fragment downloading condition or not according to the size of the file to be downloaded and the network environment information. If the size of the file to be downloaded and the network environment do not meet the fragment downloading condition, executing step S204; if the size of the file to be downloaded and the network environment meet the fragmented download condition, step S205 is executed.
Step S204: and downloading the file to be downloaded.
When the mobile device judges that the size of the file to be downloaded and the network environment do not meet the fragment downloading condition, the fragment downloading of the file to be downloaded is not needed under the current condition, and the fast and low-mobile-flow downloading of the file to be downloaded can be realized only by the mobile device.
The mobile equipment can send the initial byte offset and the byte length of the file to be downloaded to the server through the range field of the http so that the server returns the file corresponding to the initial byte offset and the byte length of the file to be downloaded, and therefore the downloading processing of the file to be downloaded by the mobile equipment is achieved.
Step S205: and distributing the fragmented downloading tasks for the mobile equipment and other mobile equipment according to the size of the file to be downloaded.
In this embodiment, when the mobile device determines that the size of the file to be downloaded and the network environment information satisfy the fragmented download condition, which indicates that in the present case, if the mobile device directly downloads the file to be downloaded, a large amount of mobile traffic or a large amount of time needs to be consumed, so that the file to be downloaded needs to be fragmented and downloaded to ensure fast and low-mobile-traffic downloading of the file to be downloaded.
The mobile device can distribute the fragmentation downloading tasks for the mobile device and other mobile devices which are directly connected with the mobile device through Wi-Fi according to the size of the file to be downloaded and the number of other mobile devices which are directly connected with the mobile device through Wi-Fi. The fragment downloading task comprises the initial byte offset and the byte length of the fragment file.
Specifically, the mobile device may obtain the number td of other mobile devices, and the mobile device may determine, according to the number (td + 1) of other mobile devices and the size ts of the file to be downloaded, the number of the slice downloading tasks as (td + 1), determine the byte length in each slice downloading task as ts/(td + 1), and calculate the starting byte offset in each slice downloading task based on the byte length in each slice downloading task. For example, the starting byte offset in the first slice download task is 0, and the starting byte offset in the second slice download task is ts/(td + 1).
Step S206: and the mobile equipment respectively sends the fragment downloading tasks to the mobile equipment corresponding to the identifiers of other mobile equipment so as to enable the other mobile equipment to download the fragment files according to the fragment downloading tasks.
And the mobile equipment respectively sends different fragment downloading tasks to the mobile equipment corresponding to the identifiers of other mobile equipment through Wi-Fi direct connection.
When other mobile equipment directly connected with the mobile equipment through Wi-Fi receives a fragment downloading task, the initial byte offset and the byte length of a fragment file to be downloaded in the fragment downloading task are obtained, and the initial byte offset and the byte length of the fragment file to be downloaded are sent to a server through a range field of http to inform the server of the file required to be obtained by the mobile equipment, so that the server returns the fragment file corresponding to the initial byte offset and the byte length of the fragment file to be downloaded, and downloading processing of the fragment file to be downloaded is achieved.
Step S207: and the mobile equipment downloads the fragment file according to the fragment downloading task to acquire the downloaded fragment file.
The mobile device may send the start byte offset and the byte length of the fragmented file to be downloaded to the server according to the fragmented download task corresponding to the mobile device, so that the server returns the fragmented file corresponding to the start byte offset and the byte length of the fragmented file to be downloaded, thereby implementing download processing of the fragmented file to be downloaded by the mobile device.
Step S208: and the mobile equipment combines the downloaded fragment file and the acquired downloaded fragment files sent by other mobile equipment into a downloaded file.
In this embodiment, the mobile device does not need to consume the mobile traffic, may directly acquire the downloaded fragmented files sent by other mobile devices through Wi-Fi direct connection, and combine the fragmented files downloaded by the mobile device itself and the downloaded fragmented files sent by other mobile devices into the downloaded files according to the starting byte offset and the byte length of each fragmented file.
In this embodiment, the mobile device obtains, according to the obtained download request, the size of the file to be downloaded corresponding to the identifier of the file to be downloaded in the download request, and obtains network environment information where the mobile device is located and identifiers of other mobile devices directly connected to the mobile device through Wi-Fi. The mobile equipment judges whether the size of the file to be downloaded and the network environment information meet the fragment downloading condition or not, and distributes a fragment downloading task to the mobile equipment and other mobile equipment according to the size of the file to be downloaded when the size of the file to be downloaded and the network environment information meet the fragment downloading condition. And the mobile equipment respectively sends the fragment downloading tasks to the mobile equipment corresponding to the identifiers of other mobile equipment so as to enable the other mobile equipment to download the fragment files according to the fragment downloading tasks. In addition, the mobile device also carries out fragment file downloading processing according to the fragment downloading task so as to obtain the downloaded fragment file. And the mobile equipment combines the downloaded slicing file and the downloaded slicing file sent by other acquired mobile equipment into a downloaded file. Compared with the prior art that when the mobile equipment downloads the file directly from the Internet, long downloading time may exist and the mobile traffic consumption is high, when the application determines that the file to be downloaded needs to be downloaded in a fragmentation mode, a plurality of fragmentation downloading tasks are generated, and the fragmentation downloading tasks are respectively sent to other mobile equipment directly connected with the mobile equipment Wi-Fi, so that other mobile equipment only download part of the file to be downloaded, the sharing of the multiple mobile equipment of the downloading tasks is achieved, the mobile traffic consumption of a single mobile equipment is reduced while the downloading time is shortened, the problems that the mobile equipment may have long downloading time and high mobile traffic consumption in the process of directly downloading the file from the Internet are solved, and the use experience of a user is improved.
On the basis of the first method embodiment, the following will specifically describe the process of determining whether the size of the file to be downloaded and the network environment information satisfy the fragmented download condition in step S203, according to the first method embodiment, when the network environment information includes the network speed.
Fig. 3 is a flowchart illustrating a second file downloading method based on Wi-Fi direct according to an embodiment of the present application. Referring to fig. 3, the file downloading method specifically includes the following steps:
step S301: and the mobile equipment determines the time to be downloaded according to the size and the network speed of the file to be downloaded.
When the mobile device obtains the size of the file to be downloaded and the network speed of the network to which the mobile device is currently connected, the mobile device may calculate the time to be downloaded for obtaining the file to be downloaded according to the size and the network speed of the file to be downloaded.
For example, when the size of the file to be downloaded is 1024MB, the network speed of the network to which the mobile device is currently connected is 2MB/s, and the mobile device calculates that the time to be downloaded is 1024 MB/(2 MB/s) =512s, that is, the time to be downloaded of the file to be downloaded is 512 seconds.
Step S302: the mobile device judges whether the time to be downloaded is greater than a preset time threshold.
After calculating the time to be downloaded, the mobile device judges whether the time to be downloaded is greater than a preset time threshold value. If the mobile device determines that the time to be downloaded is greater than the preset time threshold, it indicates that a large amount of time needs to be consumed in the downloading process of the file to be downloaded, and then step S303 is executed; if the mobile device determines that the time to be downloaded is less than or equal to the preset time threshold, it indicates that the downloading process of the file to be downloaded does not consume a large amount of time, and therefore, the file does not need to be downloaded in segments, and then step S304 is executed.
Step S303: and determining that the size of the file to be downloaded and the network environment information meet the fragment downloading condition.
When the mobile equipment judges that the time to be downloaded is greater than the preset time threshold, the size of the file to be downloaded and the network environment information meet the fragment downloading condition, and the fragment downloading processing needs to be carried out on the file to be downloaded to shorten the downloading time of the file to be downloaded.
Step S304: and determining that the size of the file to be downloaded and the network environment information do not meet the fragment downloading condition.
When the mobile equipment judges that the time to be downloaded is less than or equal to the preset time threshold, the size of the file to be downloaded and the network environment information do not meet the fragment downloading condition, and the file to be downloaded can be rapidly downloaded only through the mobile equipment.
In this embodiment, the mobile device may obtain the time to be downloaded according to the size of the file to be downloaded and the network speed of the network to which the mobile device is connected, and compare the time to be downloaded with a preset time threshold to determine whether the mobile device needs to consume a large amount of time to download the file to be downloaded, thereby determining whether the file to be downloaded needs to be fragmented. Compared with the prior art that the downloading time consumption is long and the mobile traffic consumption is high when the mobile equipment downloads the file directly from the Internet, the method and the device for downloading the file determine that the size of the file to be downloaded and the network environment information meet the fragment downloading condition when the time to be downloaded is larger than the preset time threshold according to the size and the network speed of the file to be downloaded. When the fragment downloading condition is met, the files to be downloaded are subjected to sharing downloading processing of multiple mobile devices, the downloading time is shortened, meanwhile, the flow consumption of a single mobile device is reduced, the problems that the downloading time consumption is long and the mobile flow consumption is high in the process that the mobile device downloads the files directly from the Internet are solved, and the use experience of a user is improved.
On the basis of the first method embodiment, the following specifically describes, by a third method embodiment, a process of determining whether the size of the file to be downloaded and the network environment information satisfy the fragmented download condition in step S203 when the network environment information includes the network speed and the network type.
Fig. 4 is a schematic flowchart of a third embodiment of a file downloading method based on Wi-Fi direct according to the present application. Referring to fig. 4, the file downloading method specifically includes the following steps:
step S401: and the mobile equipment determines the time to be downloaded according to the size and the network speed of the file to be downloaded.
Step S402: the mobile device judges whether the time to be downloaded is greater than a preset time threshold.
The mobile device may determine whether the time to be downloaded is greater than a preset time threshold, so as to determine whether the mobile device consumes a large amount of time for the independent downloading of the file to be downloaded.
If the mobile device determines that the time to be downloaded is less than or equal to the preset time threshold, it indicates that a large amount of time does not need to be consumed in the downloading process of the file to be downloaded, and then step S403 is executed; if the mobile device determines that the time to be downloaded is greater than the preset time threshold, it indicates that a large amount of time needs to be consumed in the downloading process of the file to be downloaded, and the file to be downloaded needs to be subjected to the fragmentation downloading process to shorten the downloading time, at this time, step S405 is executed.
Step S403: and judging whether the size of the file to be downloaded is larger than a preset threshold value.
In this embodiment, when the mobile device determines that the time to be downloaded is less than or equal to the preset time threshold, it indicates that the time consumed for downloading the file to be downloaded is short, and at this time, the mobile device may determine whether the size of the file to be downloaded is greater than the preset threshold, so as to determine whether the mobile device needs more traffic for independent downloading of the file to be downloaded.
If the mobile device determines that the size of the file to be downloaded is larger than the preset threshold, it indicates that a relatively large amount of traffic needs to be consumed in the downloading process of the file to be downloaded, and then step S404 is executed; if the mobile device determines that the size of the file to be downloaded is smaller than or equal to the preset threshold, it indicates that the downloading process of the file to be downloaded does not need to consume much traffic, and does not need to perform fragment downloading of the file to be downloaded, and the downloading of the file to be downloaded with short time and low moving traffic can be completed only by the mobile device itself, and then step S406 is executed.
Step S404: and judging whether the network type is a wireless network type.
In this embodiment, when the mobile device determines that the size of the file to be downloaded is larger than the preset threshold, that is, when it is determined that a large amount of traffic needs to be consumed in the downloading process of the file to be downloaded, the network type in the network environment where the mobile device is currently located is determined. If the mobile device determines that the network type is not a wireless type, it indicates that the current mobile device needs to consume a large amount of mobile traffic when downloading the file, and needs to perform fragment downloading on the file to be downloaded to reduce the consumption of the mobile traffic of the mobile device in the process of downloading the file to be downloaded, at this time, step S405 is executed; if the mobile device determines that the network type is a wireless type, it indicates that the current mobile device downloads the file by using a wireless network (Wi-Fi), and does not consume the mobile traffic, and does not need to perform fragment downloading on the file to be downloaded to reduce the consumption of the mobile traffic, at this time, step S406 is executed.
Step S405: and determining that the size of the file to be downloaded and the network environment information meet the fragment downloading condition.
Step S406: and determining that the size of the file to be downloaded and the network environment information do not meet the fragment downloading condition.
In this embodiment, the mobile device calculates the time to be downloaded according to the size of the file to be downloaded and the network speed of the network to which the mobile device is currently connected. The method comprises the steps that when the mobile equipment judges that the time to be downloaded is larger than a preset time threshold value, the file to be downloaded is determined to be downloaded in a slicing mode, when the time to be downloaded is judged to be smaller than or equal to the preset time threshold value, whether the size of the file to be downloaded is larger than the preset threshold value or not is judged, and when the size of the file to be downloaded is judged to be larger than the preset threshold value and the network type of the network environment where the mobile equipment is located is not the wireless network type, the file to be downloaded is determined to be downloaded in a slicing mode. Compared with the prior art, when the mobile equipment downloads the file directly from the internet, the time consumption for downloading and the consumption of mobile flow are possibly high, the method and the device judge whether the file to be downloaded needs to be fragmented for downloading according to the size, the network speed and the network type of the file to be downloaded, so that when the file to be downloaded is long in downloading time or the consumption of mobile flow is high, namely when the file to be downloaded meets the fragmentation downloading condition, the file to be downloaded is fragmented for downloading, the downloading task is shared by multiple mobile equipment, the downloading time is shortened, the consumption of mobile flow of single mobile equipment is reduced, the problems that the time consumption for downloading and the consumption of mobile flow are possibly high in the process of directly downloading the file from the internet by the mobile equipment are solved, and the use experience of a user is improved.
On the basis of the first method embodiment, a process of determining whether the size of the file to be downloaded and the network environment information satisfy the fragmented download condition in step S203 when the network environment information includes the network type is specifically described below by a fourth method embodiment.
Fig. 5 is a schematic flowchart of a fourth embodiment of a file downloading method based on Wi-Fi direct according to the present application. Referring to fig. 5, the file downloading method specifically includes the following steps:
step S501: the mobile equipment judges whether the size of the file to be downloaded is larger than a preset threshold value.
The mobile device may determine whether the size of the file to be downloaded is greater than a preset threshold, and execute step S502 when determining that the size of the file to be downloaded is greater than the preset threshold; and executing step S504 when the size of the file to be downloaded is judged to be smaller than or equal to the preset threshold.
Step S502: and judging whether the network type is a wireless network type.
When the mobile device determines that the size of the file to be downloaded is larger than the preset threshold, it may be determined whether the network type of the network environment where the mobile device is located is a wireless network type, so as to determine whether the downloading of the file to be downloaded needs to consume the mobile traffic. If the network type is judged not to be the wireless network type, that is, the mobile device is determined to consume the mobile traffic for downloading the file to be downloaded, and the file to be downloaded needs to be fragmented and downloaded to reduce the consumption of the mobile traffic of a single mobile device in the process of downloading the file to be downloaded, then step S503 is executed; if the network type is determined to be the wireless network type, it is determined that the mobile device does not need to consume the mobile traffic for downloading the file to be downloaded, and at this time, the file to be downloaded does not need to be downloaded in a fragmented manner, and step S504 is executed.
Step S503: and determining that the size of the file to be downloaded and the network environment information meet the fragment downloading condition.
Step S504: and determining that the size of the file to be downloaded and the network environment information do not meet the fragment downloading condition.
In this embodiment, when the mobile device determines that the size of the file to be downloaded is larger than the preset threshold and the network environment where the mobile device is located is not the wireless network type, it determines that the file to be downloaded needs to be downloaded in a fragmented manner. Compared with the prior art, when the mobile equipment downloads the file directly from the Internet, long downloading time consumption and high mobile traffic consumption may exist, the method and the device perform fragment downloading processing on the file to be downloaded when determining that the downloading of the file to be downloaded needs to consume a large amount of mobile traffic according to the size and the network type of the file to be downloaded, so that the sharing of multiple mobile equipment of the downloading task is realized, the mobile traffic consumption of a single mobile equipment is reduced, and the downloading time is shortened. The problems that the downloading time is long and the mobile flow consumption is high in the process that the mobile equipment downloads the file directly from the Internet are solved, and the use experience of a user is improved.
Fig. 6 is a schematic flowchart of a fifth embodiment of a file downloading method based on Wi-Fi direct according to the present application. Referring to fig. 6, the file downloading method specifically includes the following steps:
step S601: and the mobile equipment acquires the size of the file to be downloaded corresponding to the identifier of the file to be downloaded in the downloading request according to the acquired downloading request.
Step S602: the mobile device obtains the network environment information where the mobile device is located and the identification of other mobile devices which are directly connected with the mobile device through Wi-Fi.
Step S603: the mobile equipment judges whether the size of the file to be downloaded and the network environment information meet the fragment downloading condition or not.
The mobile device can judge whether the file to be downloaded meets the fragment downloading condition according to the size of the file to be downloaded and the network environment information. If the size of the file to be downloaded and the network environment do not meet the fragment downloading condition, executing step S604; if the size of the file to be downloaded and the network environment meet the fragmented download condition, step S605 is executed.
Step S604: and downloading the file to be downloaded.
Step S605: and distributing the fragment downloading tasks for the mobile equipment and other mobile equipment according to the size of the file to be downloaded.
Step S606: and the mobile equipment respectively sends the fragment downloading tasks to the mobile equipment corresponding to the identifiers of other mobile equipment so as to enable other mobile equipment to download the fragment files according to the fragment downloading tasks.
Step S607: and the mobile equipment downloads the fragment file according to the fragment downloading task to acquire the downloaded fragment file.
Step S608: the mobile equipment acquires the downloading progress of the fragment files generated and sent by other mobile equipment.
In this embodiment, during the process of performing the fragment downloading according to the fragment downloading task, the mobile device and the other mobile devices may generate a fragment file downloading progress, and for example, the fragment file downloading progress may be 20%.
The mobile device can acquire the downloading progress of the fragment files sent by other mobile devices through Wi-Fi direct connection.
It can be understood that, when the mobile device and other mobile devices generate the slicing file downloading progress, the slicing file downloading progress can be displayed through the display interface. When the mobile device obtains the downloading progress of the fragment file sent by other mobile devices, the downloading progress of the file can be generated according to the downloading progress of the fragment file of the mobile device and the downloading progress of the fragment file of other mobile devices, and the downloading progress of the file is displayed through the display interface, so that a user can obtain the downloading progress of the file to be downloaded.
In addition, the mobile device can also obtain the download duration of other mobile devices. Optionally, the mobile device may obtain, through Wi-Fi direct, the download duration generated and sent by another mobile device. Optionally, the mobile device may start timing when allocating the fragment downloading task to the other mobile device, so as to generate the downloading duration of the other mobile device when acquiring the downloading progress of the fragment file sent by the other mobile device.
Step S609: and the mobile equipment determines the mobile equipment to be adjusted according to the fragment file downloading progress and the preconfigured downloading progress threshold, and allocates the distributed fragment downloading tasks corresponding to the mobile equipment to be adjusted to the mobile equipment except the mobile equipment to be adjusted in other mobile equipment.
In this embodiment, the mobile device stores a corresponding relationship between the download progress threshold and the download duration.
When the mobile device obtains the downloading progress of the fragmented file sent by other mobile devices, the mobile device may determine a preconfigured downloading progress threshold corresponding to the downloading time according to the downloading time of other mobile devices. The mobile device can compare the download progress of the fragmented files of other mobile devices with the preconfigured download progress threshold value, and determine that the mobile device with the download progress of the fragmented files smaller than the preconfigured download progress threshold value is the mobile device to be adjusted.
The mobile device allocates the allocated fragmentation download tasks corresponding to the mobile device to be adjusted to the mobile devices other than the mobile device to be adjusted. It can be understood that, when the segment download task is configured, the mobile device may obtain a part of the segment download file downloaded by the mobile device to be adjusted, generate a new segment download task according to the starting byte offset and the byte length of the downloaded part of the segment download file, and configure the new segment download task to the mobile device with a higher segment file download progress in the other mobile device.
Step S610: and the mobile equipment combines the downloaded slicing file and the downloaded slicing file sent by other acquired mobile equipment into a downloaded file.
In this embodiment, the mobile device may obtain a download progress of the fragmented file generated and sent by another mobile device, and determine the mobile device to be adjusted with a slow download progress according to the download progress of the fragmented file and a preconfigured download progress threshold, so as to implement reallocation of the fragmented download task, thereby ensuring that each mobile device in the mobile device and another mobile device can complete the fragmented download task quickly, and avoiding the problem that the download time is long due to incomplete download tasks of the remaining mobile devices when part of the mobile devices complete the fragmented download task, and the mobile device executes the fragmented download task.
On the basis of the four embodiments, the following describes the situation after the download of the file to be downloaded is completed through the fifth embodiment.
Fig. 7 is a flowchart illustrating a sixth embodiment of a file downloading method based on Wi-Fi direct according to the present application. Referring to fig. 7, the file downloading method specifically includes the following steps:
step S701: the mobile equipment receives file acquisition requests sent by other mobile equipment.
In this embodiment, after the download of the file to be downloaded is completed, the mobile device may obtain, based on Wi-Fi direct, a file obtaining request sent by another mobile device, where the file obtaining request includes an identifier of the mobile device that sends the file obtaining request in the other mobile device, and the file obtaining request further includes an identifier of the downloaded file.
Step S702: the mobile device sends the downloaded file to other mobile devices.
After the mobile device acquires the file acquisition request, the downloaded file can be sent to the mobile device corresponding to the identifier of the mobile device which sends the file acquisition request through Wi-Fi direct connection, so that the file can be rapidly transferred between the devices which are connected through the Wi-Fi direct connection without mobile traffic consumption.
In this embodiment, the mobile device receives a file acquisition request sent by another mobile device, and sends the downloaded file to the other mobile device. Compared with the prior art, each mobile device needs to directly download the file from the server, and the network bandwidth consumption of the server is large, in the application, other mobile devices do not need to consume time and flow to download the file from the server, and only need to use Wi-Fi direct connection to realize rapid downloading of the file, so that the file downloading efficiency is improved, and the network bandwidth pressure of the service is reduced.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
FIG. 8 is a schematic structural diagram of a file downloading device based on Wi-Fi direct according to the present application; as shown in fig. 8, the Wi-Fi direct-based file downloading apparatus 80 includes: the device comprises an obtaining module 81, a processing module 82 and a sending module 83, wherein the obtaining module 81 is configured to obtain, according to an obtained downloading request, a size of a file to be downloaded corresponding to an identifier of the file to be downloaded in the downloading request; the obtaining module 81 is further configured to obtain network environment information where the mobile device is located and identifiers of other mobile devices that are directly connected to the mobile device through Wi-Fi; the processing module 82 is used for judging whether the size of the file to be downloaded and the network environment information meet the fragment downloading condition; the processing module 82 is further configured to, when it is determined that the size of the file to be downloaded and the network environment information satisfy the fragmented download condition, allocate fragmented download tasks to the mobile device and other mobile devices according to the size of the file to be downloaded; the sending module 83 is configured to send the fragmented download tasks to the mobile devices corresponding to the identifiers of the other mobile devices, respectively, so that the other mobile devices perform fragmented file download processing according to the fragmented download tasks; the processing module 82 is further configured to perform fragment file downloading processing according to the fragment downloading task to obtain a downloaded fragment file; the processing module 82 is further configured to combine the downloaded slicing file and the obtained downloaded slicing files sent by other mobile devices into a downloaded file.
The Wi-Fi direct connection-based file downloading device provided in the embodiment of the present application may execute the technical solution shown in the first embodiment of the method, and the implementation principle and the beneficial effects are similar, which are not described herein again.
In a possible embodiment, the network environment information includes a network speed and/or a network type, and the processing module 82 is specifically configured to: determining the time to be downloaded according to the size and the network speed of the file to be downloaded; judging whether the time to be downloaded is greater than a preset time threshold value or not; and when the time to be downloaded is judged to be greater than the preset time threshold value, determining that the fragment downloading condition is met.
The Wi-Fi direct connection-based file downloading device provided by the embodiment of the present application may implement the technical solution shown in the first embodiment of the method, and the implementation principle and the beneficial effect thereof are similar and will not be described herein again.
In one possible embodiment, the processing module 82 is further configured to: when the time to be downloaded is judged to be less than or equal to a preset time threshold, judging whether the size of the file to be downloaded is greater than the preset threshold; when the size of the file to be downloaded is judged to be larger than a preset threshold value, judging whether the network type is a wireless network type; and when the network type is judged not to be the wireless network type, determining that the fragment downloading condition is met.
The Wi-Fi direct connection-based file downloading device provided by the embodiment of the present application may implement the technical solution shown in the first embodiment of the method, and the implementation principle and the beneficial effect thereof are similar and will not be described herein again.
In a possible embodiment, the obtaining module 81 is further configured to obtain a downloading progress of the fragmented file generated and sent by another mobile device; the processing module 82 is further configured to determine a mobile device to be adjusted according to the fragmented file download progress and a preconfigured download progress threshold, and allocate an allocated fragmented download task corresponding to the mobile device to be adjusted to a mobile device other than the mobile device to be adjusted in other mobile devices.
The Wi-Fi direct connection-based file downloading device provided by the embodiment of the present application may implement the technical solution shown in the first embodiment of the method, and the implementation principle and the beneficial effect thereof are similar and will not be described herein again.
In a possible embodiment, the obtaining module 81 is further configured to receive a file obtaining request sent by another mobile device; the sending module 83 is further configured to send the downloaded file to other mobile devices.
The Wi-Fi direct connection-based file downloading device provided in the embodiment of the present application may execute the technical solution shown in the first embodiment of the method, and the implementation principle and the beneficial effects are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of an electronic device provided in the present application. As shown in fig. 9, the electronic apparatus 90 includes: a processor 91, a memory 92, and a communication interface 93; wherein, the memory 92 is used for storing executable instructions of the processor 91; the processor 91 is configured to perform the solution in any of the method embodiments described above via execution of executable instructions.
Alternatively, the memory 92 may be separate or integrated with the processor 91.
Optionally, when the memory 92 is a device independent of the processor 91, the electronic device 90 may further include: and the bus is used for connecting the devices.
The electronic device is configured to execute the technical solution in any one of the foregoing method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
The embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, the computer-executable instructions are used to implement the technical solution provided by any one of the foregoing method embodiments.
The embodiment of the present application further provides a computer program product, which includes a computer program, and the computer program is used for implementing the technical solution provided by any of the foregoing method embodiments when being executed by a processor.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and these modifications or substitutions do not depart from the scope of the technical solutions of the embodiments of the present application.

Claims (13)

1. A file downloading method based on Wi-Fi direct is characterized by comprising the following steps:
the mobile equipment acquires the size of the file to be downloaded corresponding to the identifier of the file to be downloaded in the downloading request according to the acquired downloading request;
the mobile equipment acquires network environment information where the mobile equipment is located and identifications of other mobile equipment which are directly connected with the mobile equipment through Wi-Fi;
the mobile equipment judges whether the size of the file to be downloaded and the network environment information meet the fragment downloading condition or not;
when the mobile equipment judges that the size of the file to be downloaded and the network environment information meet the fragment downloading condition, distributing fragment downloading tasks for the mobile equipment and other mobile equipment according to the size of the file to be downloaded;
the mobile equipment respectively sends the fragment downloading tasks to the mobile equipment corresponding to the identifiers of the other mobile equipment so that the other mobile equipment can download fragment files according to the fragment downloading tasks;
the mobile equipment downloads the fragment file according to the fragment downloading task to acquire the downloaded fragment file;
and the mobile equipment combines the downloaded fragment file and the acquired downloaded fragment files sent by the other mobile equipment into a downloaded file.
2. The Wi-Fi direct-based file downloading method of claim 1, wherein if the network environment information includes an internet speed and/or a network type, the determining whether the size of the file to be downloaded and the network environment information satisfy a fragmented download condition comprises:
the mobile equipment determines the time to be downloaded according to the size of the file to be downloaded and the network speed;
the mobile equipment judges whether the time to be downloaded is greater than a preset time threshold value;
and when judging that the time to be downloaded is greater than the preset time threshold value, the mobile equipment determines that the fragment downloading condition is met.
3. The Wi-Fi direct-based file download method of claim 2, further comprising:
when the mobile equipment judges that the time to be downloaded is less than or equal to the preset time threshold, judging whether the size of the file to be downloaded is greater than a preset threshold or not;
when the mobile equipment judges that the size of the file to be downloaded is larger than the preset threshold value, judging whether the network type is a wireless network type;
and when the mobile equipment judges that the network type is not the wireless network type, determining that the fragment downloading condition is met.
4. The Wi-Fi direct based file download method of any one of claims 1-3, further comprising:
the mobile equipment acquires the downloading progress of the fragment files generated and sent by the other mobile equipment;
and the mobile equipment determines the mobile equipment to be adjusted according to the fragment file downloading progress and a preconfigured downloading progress threshold, and allocates the distributed fragment downloading tasks corresponding to the mobile equipment to be adjusted to the mobile equipment except the mobile equipment to be adjusted in the other mobile equipment.
5. The Wi-Fi direct-based file download method of claim 4, further comprising:
the mobile equipment receives file acquisition requests sent by other mobile equipment;
and the mobile equipment sends the downloaded file to the other mobile equipment.
6. A Wi-Fi direct based file downloading apparatus, comprising:
the acquisition module is used for acquiring the size of the file to be downloaded corresponding to the identifier of the file to be downloaded in the downloading request according to the acquired downloading request;
the acquisition module is further configured to acquire network environment information where the mobile device is located and identifiers of other mobile devices directly connected to the mobile device through Wi-Fi;
the processing module is used for judging whether the size of the file to be downloaded and the network environment information meet the fragment downloading condition or not;
the processing module is further configured to, when it is determined that the size of the file to be downloaded and the network environment information satisfy the fragmented download condition, allocate fragmented download tasks to the mobile device and the other mobile devices according to the size of the file to be downloaded;
the sending module is used for respectively sending the fragment downloading tasks to the mobile devices corresponding to the identifiers of the other mobile devices so that the other mobile devices can download the fragment files according to the fragment downloading tasks;
the processing module is further used for downloading the fragment file according to the fragment downloading task to obtain the downloaded fragment file;
the processing module is further configured to combine the downloaded slicing file and the acquired downloaded slicing files sent by the other mobile devices into a downloaded file.
7. The Wi-Fi direct-based file downloading device of claim 6, wherein the network environment information comprises a network speed and/or a network type, and the processing module is specifically configured to:
determining the time to be downloaded according to the size of the file to be downloaded and the network speed;
judging whether the time to be downloaded is greater than a preset time threshold value or not;
and when the time to be downloaded is judged to be greater than the preset time threshold value, determining that the fragment downloading condition is met.
8. The Wi-Fi direct based file download device of claim 7, wherein the processing module is further configured to:
when the time to be downloaded is judged to be less than or equal to the preset time threshold, judging whether the size of the file to be downloaded is greater than a preset threshold;
when the size of the file to be downloaded is judged to be larger than the preset threshold value, judging whether the network type is a wireless network type;
and when the network type is judged not to be the wireless network type, determining that the fragment downloading condition is met.
9. The Wi-Fi direct based file download apparatus of any of claims 6-8,
the acquisition module is further configured to acquire a download progress of the fragment file generated and sent by the other mobile device;
the processing module is further configured to determine a mobile device to be adjusted according to the slicing file downloading progress and a preconfigured downloading progress threshold, and allocate an allocated slicing downloading task corresponding to the mobile device to be adjusted to a mobile device other than the mobile device to be adjusted in the other mobile devices.
10. The Wi-Fi direct based file downloading device of claim 9,
the acquisition module is further configured to receive a file acquisition request sent by the other mobile device;
the sending module is further configured to send the downloaded file to the other mobile devices.
11. An electronic device, comprising:
a processor, a memory, a communication interface;
the memory is used for storing executable instructions executable by the processor;
wherein the processor is configured to perform the Wi-Fi direct based file download method of any of claims 1-5 via execution of the executable instructions.
12. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the Wi-Fi direct-based file download method of any one of claims 1 to 5.
13. A computer program product comprising a computer program which, when executed by a processor, is configured to implement the Wi-Fi direct-based file download method of any one of claims 1 to 5.
CN202211103567.2A 2022-09-09 2022-09-09 File downloading method, device, equipment and medium based on Wi-Fi direct connection Active CN115622992B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211103567.2A CN115622992B (en) 2022-09-09 2022-09-09 File downloading method, device, equipment and medium based on Wi-Fi direct connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211103567.2A CN115622992B (en) 2022-09-09 2022-09-09 File downloading method, device, equipment and medium based on Wi-Fi direct connection

Publications (2)

Publication Number Publication Date
CN115622992A true CN115622992A (en) 2023-01-17
CN115622992B CN115622992B (en) 2024-05-14

Family

ID=84859343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211103567.2A Active CN115622992B (en) 2022-09-09 2022-09-09 File downloading method, device, equipment and medium based on Wi-Fi direct connection

Country Status (1)

Country Link
CN (1) CN115622992B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109561138A (en) * 2018-11-19 2019-04-02 Oppo广东移动通信有限公司 Document down loading method and Related product
CN109862065A (en) * 2018-12-06 2019-06-07 北京字节跳动网络技术有限公司 Document down loading method, device and electronic equipment
CN114650281A (en) * 2020-12-17 2022-06-21 腾讯科技(深圳)有限公司 File downloading method, device, equipment and storage medium based on complex network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109561138A (en) * 2018-11-19 2019-04-02 Oppo广东移动通信有限公司 Document down loading method and Related product
CN109862065A (en) * 2018-12-06 2019-06-07 北京字节跳动网络技术有限公司 Document down loading method, device and electronic equipment
CN114650281A (en) * 2020-12-17 2022-06-21 腾讯科技(深圳)有限公司 File downloading method, device, equipment and storage medium based on complex network

Also Published As

Publication number Publication date
CN115622992B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
CN102413150B (en) Server and virtual desktop control method and virtual desktop control system
CN110896355B (en) Network slice selection method and device
EP2619961B1 (en) Cloud phone with distributed processing
CN107645561B (en) Picture preview method of cloud mobile phone
CN108683613B (en) Resource scheduling method, device and computer storage medium
CN111163130B (en) Network service system and data transmission method thereof
CN110377440B (en) Information processing method and device
CN109218356B (en) Method and apparatus for managing stateful applications on a server
CN105791254B (en) Network request processing method and device and terminal
KR102266089B1 (en) Mec(mobile edge computing) system and control method thereof
CN103685496A (en) Transmission method and device of file data
JP2020534760A (en) RBG division method and user terminal
CN111510493A (en) Distributed data transmission method and device
CN106686635B (en) Data transmission method and device based on control and configuration protocol of wireless access point
CN111431818A (en) Cross-domain request traffic distribution method and device, storage medium and computer equipment
CN109471713B (en) Method and device for inquiring information
CN114327846A (en) Cluster capacity expansion method and device, electronic equipment and computer readable storage medium
CN115622992B (en) File downloading method, device, equipment and medium based on Wi-Fi direct connection
CN101146107B (en) A method and device for data download
CN107426114B (en) Resource allocation method and system
CN107371263B (en) Method and device for scheduling uplink resources
CN110266814B (en) Transmission method and transmission device
CN110362575B (en) Method and device for generating global index of data
CN110324377B (en) Push interaction method and device, electronic equipment and medium
CN112804298B (en) Method, apparatus, computer device and readable storage medium for reducing cross-zone traffic

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