CN112769887B - File downloading method, system, equipment and computer readable storage medium - Google Patents

File downloading method, system, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112769887B
CN112769887B CN201911077809.3A CN201911077809A CN112769887B CN 112769887 B CN112769887 B CN 112769887B CN 201911077809 A CN201911077809 A CN 201911077809A CN 112769887 B CN112769887 B CN 112769887B
Authority
CN
China
Prior art keywords
downloading
intelligent device
file
site
download
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
CN201911077809.3A
Other languages
Chinese (zh)
Other versions
CN112769887A (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.)
Foshan Viomi Electrical Technology Co Ltd
Original Assignee
Foshan Viomi Electrical Technology 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 Foshan Viomi Electrical Technology Co Ltd filed Critical Foshan Viomi Electrical Technology Co Ltd
Priority to CN201911077809.3A priority Critical patent/CN112769887B/en
Publication of CN112769887A publication Critical patent/CN112769887A/en
Application granted granted Critical
Publication of CN112769887B publication Critical patent/CN112769887B/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]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application provides a file downloading method, a system, equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring a downloading site set of a target file, and determining network communication quality between each intelligent device in at least two intelligent devices and each downloading site in the downloading site set; determining the downloading site corresponding to each intelligent device according to the network communication quality between each intelligent device and each downloading site and the downloading site set; determining the number of file blocks corresponding to each intelligent device according to the network communication quality between each intelligent device and the corresponding download site; according to the number of the file blocks and the downloading sites corresponding to each intelligent device, controlling each intelligent device to download the file blocks of the target file; and executing file block reorganization operation according to the file blocks obtained by downloading of each intelligent device to generate the target file. The file downloading method and device can effectively improve the speed of downloading files.

Description

File downloading method, system, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of file downloading technologies, and in particular, to a method, a system, an apparatus, and a computer readable storage medium for downloading a file.
Background
With the development of the home internet technology, some home appliances have been connected to each other through a wireless transmission mode and download network files. However, the current home appliance mainly downloads network files through BT modules or Wifi modules, and due to limitations of these modules in terms of bandwidth and firmware functions, the home appliance cannot quickly download online network files. However, some home appliances such as high-definition televisions, to which fixed optical fibers are connected, access only to a fixed-range network file provided by an operator, and other network files cannot be downloaded.
Therefore, how to increase the speed of downloading files by intelligent devices such as home appliances is a current urgent problem to be solved.
Disclosure of Invention
The main objective of the present application is to provide a method, a system, a device and a computer readable storage medium for file downloading, which aim to increase the speed of downloading files by an intelligent device.
In a first aspect, the present application provides a file downloading method, including the steps of:
acquiring a downloading site set of a target file, and determining network communication quality between each intelligent device in at least two intelligent devices and each downloading site in the downloading site set;
Determining a downloading site corresponding to each intelligent device according to the network communication quality between each intelligent device and each downloading site and the downloading site set;
determining the number of file blocks corresponding to each intelligent device according to the network communication quality between each intelligent device and the corresponding downloading site;
according to the number of the file blocks and the downloading sites corresponding to each intelligent device, controlling each intelligent device to download the file blocks of the target file;
and executing file block reorganization operation according to the file blocks obtained by downloading each intelligent device to generate the target file.
In a second aspect, the present application further provides a file downloading system, the file downloading system including: at least two smart devices, master control device and server, wherein:
the server is used for crawling the downloading site of the target file, obtaining a downloading site set of the target file and sending the downloading site set to the main control equipment;
the main control equipment is used for receiving the downloading site set sent by the server and determining the network communication quality between each intelligent equipment and each downloading site in the downloading site set;
The main control equipment is further used for determining the downloading site corresponding to each intelligent device according to the network communication quality between each intelligent device and each downloading site and the downloading site set;
the main control equipment is further used for determining the number of the file blocks corresponding to each intelligent equipment according to the network communication quality between each intelligent equipment and the corresponding downloading site;
the main control equipment is further used for sending the download sites and the number of file blocks corresponding to each intelligent equipment to the corresponding intelligent equipment;
each intelligent device is used for receiving the downloading site and the number of file blocks sent by the main control device, downloading the file blocks of the target file according to the downloading site and the number of file blocks, and sending the downloaded file blocks to the main control device;
the main control equipment is also used for receiving the file blocks of the target file sent by each intelligent equipment, and executing file block reorganization operation according to the received file blocks to generate the target file.
In a third aspect, the present application also provides a master control device comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program when executed by the processor implements the steps of the file downloading method as described above.
In a fourth aspect, the present application also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the file downloading method as described above.
The application provides a file downloading method, a system, equipment and a computer readable storage medium, wherein the number of downloading sites and file blocks corresponding to each intelligent device can be obtained through the obtained downloading site set of the target file and the determined network communication quality between each intelligent device and each downloading site, then the file blocks of the target file are downloaded by each intelligent device according to the number of the file blocks corresponding to each intelligent device and the downloading sites, file block reorganization operation is carried out on the file blocks obtained by downloading, the target file is generated, network congestion caused by downloading the target file in one downloading site by a plurality of intelligent devices is avoided, meanwhile, the file blocks of the target file are reasonably distributed to each intelligent device, and the speed of downloading the file is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a file downloading method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating another method for downloading files according to an embodiment of the present disclosure;
FIG. 3 is a schematic block diagram of a file download system according to an embodiment of the present application;
fig. 4 is a schematic block diagram of a master control device according to an embodiment of the present application.
The realization, functional characteristics and advantages of the present application will be further described with reference to the embodiments, referring to the attached drawings.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
Embodiments of the present application provide a fraud identification method, apparatus, device, and computer readable storage medium. The file downloading method can be applied to intelligent equipment, wherein the intelligent equipment can be electronic equipment such as mobile phones, tablet computers, notebook computers, desktop computers and televisions, and can also be intelligent household appliances such as intelligent refrigerators, intelligent air conditioners and intelligent washing machines.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a flow chart of a file downloading method according to an embodiment of the present application.
As shown in fig. 1, the file downloading method includes steps S101 to S105.
Step S101, acquiring a downloading site set of a target file, and determining network communication quality between each intelligent device in at least two intelligent devices and each downloading site in the downloading site set.
When the network file needs to be downloaded, a user can send a downloading instruction through an operation page or a menu bar, a server receives the downloading instruction, crawls the network IP address of the network file on the Internet according to the downloading instruction, and then sends the network IP address of the crawled network file to the main control equipment, so that a downloading site set of the file is obtained. The master control device is used for receiving the downloading site set sent by the server, or receiving each downloading site sent by the server in preset time, and generating the downloading site set on the master control device. The preset time can be set according to specific conditions, and the application is not particularly limited.
For example, when a user wants to download a movie, an instruction to download the movie can be issued to the television through a television operation interface or a remote controller, and the instruction is sent to the server. Based on the instruction, the server crawls the IP addresses capable of downloading the movie through the Internet, the IP addresses are usually a plurality of, and then the crawled IP addresses capable of downloading the movie are sent to the main control equipment, so that a downloading site set of the movie can be obtained.
In an embodiment, the method for acquiring the downloading site set of the target file specifically includes: searching the keywords of the target file through a network search engine to obtain a plurality of websites storing the keywords of the target file; screening a plurality of websites storing keywords of the target files, and reserving websites storing downloading paths of the target files to obtain downloading websites of the plurality of target files; through the download websites of the plurality of target files, the download links of the plurality of target files can be obtained; and sending the download links of the plurality of target files to the main control equipment, so as to obtain a download site set of the target files. The target file is a file to be downloaded.
Further, after the master control device completes receiving the download site set of the target file, each download site in the download site set is verified, and the download sites with inconsistent formats and contents of the target file in the download sites are eliminated. The specific method for verifying each download site in the download site set is as follows: acquiring the format and the size of a target file in each downloading site, and determining the number of downloading sites with the same format and size of the target file; and reserving the downloading sites with the same format and size of the target file, and deleting the downloading sites with different formats and/or sizes of the target file to update the downloading site set. The format of the target file is not particularly limited, and the target files downloaded through different downloading sites can be compatible. By verifying each download site in the download site set, the consistency of the downloaded target file is ensured.
In one embodiment, the method for acquiring the downloading site set of the target file includes: the user sends a target file downloading request through a button or a control, the server acquires the target file downloading request, crawls the downloading address of the target file on the Internet according to the format and the size of the target file carried in the target file downloading request, and then sends the crawled downloading address to the main control equipment, so that a downloading site set of the target file is obtained. It should be noted that, a preset size difference may exist between the file size in the obtained download address and the size of the target file, and the preset size difference may be defined according to a specific situation, for example, when the size of the target file is 1G, the preset size difference may be 1M.
After the download site set of the target file is acquired, network communication quality between each of the at least two intelligent devices and each of the download sites in the download site set is determined. It should be noted that, the network communication quality includes, but is not limited to, network bandwidth, time delay, jitter, load, etc., and the network bandwidth, time delay, jitter, load, etc. of the network communication quality are counted by the master control device, and the counted result is stored in a local file form, where the intelligent device may be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a television, etc., or may be an intelligent household appliance such as an intelligent refrigerator, an intelligent air conditioner, an intelligent washing machine, etc. According to the network communication quality between each intelligent device and each downloading site in the downloading site set, each intelligent device can select the optimal downloading site to download the target file, and the speed of downloading the target file is improved.
The main control equipment is provided with a signaling management module which is used for monitoring information interaction between each intelligent equipment and each downloading site. The signaling management module comprises a signaling management unit, wherein the signaling management unit is used for maintaining information in the interaction process between each intelligent device and each downloading site. In the standard P2P protocol, each node performs periodic information interaction, and network bandwidth, time delay, jitter, load and the like between each intelligent device and each download site can be detected through real-time information interaction. It should be noted that, the master control device may also count network bandwidth, delay, jitter, load, etc. between each intelligent device and each download site at regular time.
Step S102, determining the downloading site corresponding to each intelligent device according to the network communication quality between each intelligent device and each downloading site and the downloading site set.
And selecting the downloading sites from the downloading site set to be distributed to each intelligent device according to the downloading site set of the target file acquired by the main control device and the network communication quality between each intelligent device and each downloading site, so that each intelligent device is distributed to the corresponding downloading site. By distributing the corresponding downloading sites for each intelligent device, network congestion caused by downloading the target file in one downloading site by a plurality of intelligent devices is avoided, and the speed of downloading the target file by each intelligent device at the same time is improved.
It should be noted that, according to the quality of the network communication between each intelligent device and each download site, a download site with better network communication quality may be allocated to each intelligent device, and each intelligent device downloads the target file through the download site. The quality of the network communication quality can be judged through preset network communication quality conditions, the preset network communication quality conditions can be set according to specific situations, the application is not particularly limited herein, and optionally, the preset network communication quality conditions are set to be that the network bandwidth is larger than 1M/S and the time delay is smaller than 100ms.
Further, under the condition that the number of the downloading sites in the downloading site set is large, a main downloading site and one or more backup downloading sites can be distributed to each intelligent device, and when the downloading rate of the corresponding main downloading site is lower than a preset rate, each intelligent device can be switched to the backup downloading site to download, so that each intelligent device can finish own downloading task.
In an embodiment, the determining manner of the download site corresponding to each intelligent device specifically includes: ordering the network communication quality between each intelligent device and each download site to generate a network communication quality list of each intelligent device; determining the priority of each intelligent device according to the arrangement sequence of each intelligent device in the network communication quality list; and determining the downloading site corresponding to each intelligent device from the downloading site set according to the priority of each intelligent device, wherein the intelligent devices are uniquely corresponding to the downloading sites, so that each intelligent device selects different downloading sites in the same time period.
It should be noted that, the network communication quality between each intelligent device and each download site may be ordered, or the network bandwidth or time delay between each intelligent device and each download site may be ordered according to at least two combinations of the network bandwidth, time delay, load and jitter between each intelligent device and each download site, which is not limited in this application. According to the arrangement sequence of each intelligent device in the network communication quality list, determining the corresponding priority label for each intelligent device, and according to the corresponding priority label of each intelligent device, determining the priority of each intelligent device, wherein the intelligent device with the front arrangement sequence has high priority. According to the priority of each intelligent device, firstly selecting a corresponding downloading site for the intelligent device with high priority, and then selecting a corresponding downloading site for the intelligent device with low priority, wherein each intelligent device selects different downloading sites in the same time period. Illustratively, when the higher priority smart device a selects the download site 1, the smart device B having a lower priority than the smart device a cannot select the download site 1, but can select the download site which is not selected by the smart device temporarily even though the network communication quality with the download site 1 is good.
Step S103, determining the number of file blocks corresponding to each intelligent device according to the network communication quality between each intelligent device and the corresponding downloading site.
After determining the download site corresponding to each intelligent device, the number of file blocks to be downloaded by each intelligent device at the download site corresponding to each intelligent device needs to be determined. Specifically, according to the network communication quality between each intelligent device and the corresponding download site, determining the number of the file blocks corresponding to each intelligent device, wherein the better the network communication quality between each intelligent device and the corresponding download site is, the more the number of the file blocks required to be downloaded by each intelligent device at the corresponding download site is, otherwise, the worse the network communication quality between each intelligent device and the corresponding download site is, and the fewer the number of the file blocks required to be downloaded by each intelligent device at the corresponding download site is. The number of the file blocks corresponding to each intelligent device is determined according to the network communication quality between each intelligent device and the corresponding downloading site, so that the downloading time required by downloading the file blocks corresponding to each intelligent device is consistent, and the problem that the target file cannot be downloaded in time due to overlong time of downloading the file blocks of a certain intelligent device is avoided.
After each intelligent device determines the corresponding downloading site, the server blocks the target file in each downloading site. Specifically, the master control device includes a file block splitting module, where the file block splitting module is configured to calculate, according to a size of a target file to be downloaded, a number N of splitting the target file into file blocks, and send a splitting request to the server, where the splitting request requests splitting of the file to be downloaded into N file blocks. It can be understood that the size of the split file block is fixed, and the server can split the target file in each download site according to the size of the file block in the split request sent by the master control device.
In an embodiment, the network communication quality includes a network bandwidth, and the specific method for determining the number of file blocks corresponding to each intelligent device includes: acquiring the total number of file blocks of a target file, and accumulating the network bandwidth between each intelligent device and the corresponding downloading site to obtain the total network bandwidth; calculating the proportion of the network bandwidth between each intelligent device and the corresponding download site to the total network bandwidth; and determining the number of the file blocks corresponding to each intelligent device according to the total number of the file blocks and the proportion of the network bandwidth between each intelligent device and the corresponding downloading site to the total network bandwidth.
It should be noted that, the master control device multiplies the total number of file blocks by the ratio of the network bandwidth between each intelligent device and the corresponding download site to the total network bandwidth to obtain the number of file blocks corresponding to each intelligent device, so that it can be known that the larger the network bandwidth between each intelligent device and the corresponding download site is, the higher the ratio of the total network bandwidth is, and the more the number of file blocks corresponding to each intelligent device is. By the distribution mode of the downloaded file blocks, the number of the file blocks of the corresponding downloaded target file of each intelligent device is more reasonable.
And step S104, controlling each intelligent device to download the file blocks of the target file according to the number of the file blocks and the download sites corresponding to each intelligent device.
After determining the number of the file blocks and the downloading sites corresponding to each intelligent device, the master control device controls each intelligent device to download the file blocks of the target file. Specifically, each file block of the target file has a corresponding identifier, the identifier uniquely corresponds to the file block, and the file block can be accurately found through the identifier. Before downloading the file blocks, the main control equipment sends identifiers of the file blocks corresponding to the number of the file blocks to each intelligent equipment, and each intelligent equipment downloads the file blocks of the target file in a downloading site according to the identifiers of the corresponding file blocks.
For example, the number of file blocks corresponding to the intelligent device a is 100, the download site corresponding to the intelligent device a is "http:// download.1717.com/", the total number of file blocks is 500, the number of identifiers is 500, the master control device may send the identifiers in the interval 201 to 300 to the intelligent device a, and the intelligent device a corresponds to the file blocks of the download target file on the download site "http:// download.1717.com/", according to the 100 identifiers in the interval.
In an embodiment, according to the number of file blocks and the downloading sites corresponding to each intelligent device, generating a file downloading task corresponding to each intelligent device; and controlling each intelligent device to download the file block of the target file from the corresponding download site according to the file download task corresponding to each intelligent device. The file downloading task comprises the number of file blocks and downloading sites corresponding to each intelligent device, the downloading progress and the downloading rate of each intelligent device can be displayed through the file downloading task, and a user can execute operations such as pause downloading, re-downloading and the like on a file downloading task interface.
And step 105, executing file block reorganization operation according to the file blocks obtained by downloading each intelligent device, and generating the target file.
And when the file blocks of the target file are downloaded by each intelligent device, the central control device executes file block reorganization operation so as to generate the target file in the central control device. It should be noted that, after the central control device completes the reorganization operation on the file block of the target file, the target file may also be sent to any memory for storage.
In an embodiment, the target file is segmented into file blocks with unique corresponding identifiers in the download website, when the central control device executes file block reorganization operation, each file block is corresponding to the corresponding unique identifier, when the unique identifier of the file block exists, the file block is skipped and not processed, and when the unique identifier of the file block does not exist, the file block is re-downloaded and filled into the reorganized target file through the intelligent device.
According to the file downloading method provided by the embodiment, through the obtained downloading site set of the target file and the determined network communication quality between each intelligent device and each downloading site, the respective corresponding downloading site and the respective number of file blocks of each intelligent device can be obtained, then the file blocks of the target file are downloaded by each intelligent device are controlled according to the respective corresponding number of the file blocks and the respective downloading sites of each intelligent device, and file block reorganization operation is carried out on the file blocks obtained by downloading, so that the target file is generated. Network congestion caused by the fact that a plurality of intelligent devices simultaneously download target files in one downloading site is avoided, meanwhile, file blocks of the target files are reasonably distributed to each intelligent device, and the speed of downloading the files is effectively improved.
Referring to fig. 2, fig. 2 is a flowchart of another file downloading method according to an embodiment of the present application.
As shown in fig. 2, the file downloading method includes steps S201 to S208.
Step S201, obtaining a downloading site set of the target file, and determining network communication quality between each intelligent device in at least two intelligent devices and each downloading site in the downloading site set.
After the download site set of the target file is acquired, network communication quality between each of the at least two intelligent devices and each of the download sites in the download site set is determined. The target file is a file to be downloaded, and it should be noted that the network communication quality includes, but is not limited to, network bandwidth, delay, jitter, load, and the like.
Step S202, determining the downloading site corresponding to each intelligent device according to the network communication quality between each intelligent device and each downloading site and the downloading site set.
And selecting the downloading sites from the downloading site set to be distributed to each intelligent device according to the downloading site set of the target file acquired by the main control device and the network communication quality between each intelligent device and each downloading site, so that each intelligent device is distributed to the corresponding downloading site. By distributing the corresponding downloading sites for each intelligent device, network congestion caused by downloading the target file in one downloading site by a plurality of intelligent devices is avoided, and the speed of downloading the target file is improved.
Step S203, determining the number of file blocks corresponding to each intelligent device according to the network communication quality between each intelligent device and the corresponding download site.
After determining the download site corresponding to each intelligent device, the number of file blocks to be downloaded by each intelligent device at the download site corresponding to each intelligent device needs to be determined. Specifically, according to the network communication quality between each intelligent device and the corresponding download site, determining the number of file blocks corresponding to each intelligent device, wherein the number of file blocks is the number of file blocks obtained by splitting the target file into the file blocks by the main control device according to the size of the target file to be downloaded.
And step S204, controlling each intelligent device to download the file blocks of the target file according to the number of the file blocks and the download sites corresponding to each intelligent device.
After determining the number of the file blocks and the downloading sites corresponding to each intelligent device, the master control device controls each intelligent device to download the file blocks of the target file. Specifically, each file block of the target file has a corresponding identifier, the identifier uniquely corresponds to the file block, and the file block can be accurately found through the identifier.
Step S205, when at least one intelligent device is detected to be in an idle state, acquiring an identifier set of a file block which is not downloaded and the current network communication quality between each intelligent device and a corresponding downloading site.
By detecting the network communication quality of the intelligent devices, judging whether the intelligent devices are in an idle state according to the network communication quality of the intelligent devices, when at least one intelligent device is detected to be in the idle state, acquiring an identifier set of a file block which is not downloaded by other intelligent devices, and acquiring the current network communication quality between each intelligent device and a corresponding downloading site. The central control device can send the identifier in the identifier set to the intelligent device which completes the downloading task so as to download the corresponding file blocks through the intelligent device which completes the downloading task.
Whether the intelligent device is in an idle state is judged by determining whether the network communication quality of the intelligent device reaches a preset communication quality threshold, and the preset communication quality threshold can be set according to specific conditions, so that the application is not limited in particular.
Step S206, determining the respective identifier subset of each intelligent device according to the identifier set and the current network communication quality between each intelligent device and the respective download site.
And determining the respective identifier subset of each intelligent device according to the identifier set and the current network communication quality between each intelligent device and the respective corresponding downloading site. Specifically, determining the number of identifiers corresponding to each intelligent device according to the identifier set and the current network communication quality between each intelligent device and the corresponding download site; and determining the identifier subset corresponding to each intelligent device according to the identifier number and the identifier set corresponding to each intelligent device.
It should be noted that the identifier set includes a plurality of identifier subsets, each identifier subset includes a plurality of identifiers, each file block of the target file has a corresponding identifier, and the identifier uniquely corresponds to the file block; when the current network communication quality between each intelligent device and the corresponding download site is high, the number of identifiers corresponding to each intelligent device is large, and the subset of identifiers corresponding to each intelligent device is large; when the current network communication quality between each intelligent device and the corresponding download site is low, the number of identifiers corresponding to each intelligent device is small, and the subset of identifiers corresponding to each intelligent device is small.
The method for determining the number of the identifiers corresponding to each intelligent device specifically comprises the following steps: and acquiring a preset mapping relation table of the current network communication quality and the number of identifiers, and determining the number of the identifiers corresponding to each intelligent device according to the mapping relation table and the current network communication quality between each intelligent device and the corresponding downloading site. The preset mapping relation table of the current network communication quality and the number of identifiers can be set according to specific situations, and optionally, the mapping relation table comprises a plurality of grades, the current network communication quality is in different grades, and the number of the identifiers corresponding to the current network communication quality is different.
And S207, controlling each intelligent device to download the file block of the target file according to the identifier subset and the downloading site corresponding to each intelligent device.
After determining the identifier subset corresponding to each intelligent device, controlling the intelligent device to download the file block of the target file according to the identifier subset corresponding to each intelligent device and the downloading site. Each intelligent device downloads the file block of the target file at the corresponding downloading site according to the identifiers in the corresponding identifier subset.
In one embodiment, detecting a current network communication quality between each smart device and a respective corresponding download site; when the current network communication quality between one intelligent device and the corresponding downloading site is smaller than a preset network communication quality threshold value, determining the current network communication quality between the intelligent device and each downloading site; and re-determining the downloading site corresponding to the intelligent device according to the current network communication quality between the intelligent device and each downloading site.
It should be noted that, when the current network communication quality of any one intelligent device is smaller than a preset network communication quality threshold, the downloading site corresponding to the intelligent device needs to be determined again, so that the intelligent device downloads the file block, and the preset network communication quality threshold can be set according to specific conditions, without applying for specific limitation. By redefining the download site corresponding to the intelligent device, the influence on the speed of downloading the target file by the intelligent device can be eliminated in the special case when the network communication quality between the intelligent device and the download site is interrupted or regarded as interrupted.
And step S208, executing file block reorganization operation according to the file blocks obtained by downloading each intelligent device, and generating the target file.
And when the file blocks of the target file are downloaded by each intelligent device, the central control device executes file block reorganization operation so as to generate the target file in the central control device. It should be noted that, after the central control device completes the reorganization operation on the file block of the target file, the target file may also be sent to any memory for storage.
According to the file downloading method provided by the embodiment, when the downloading task of one intelligent device is completed, the intelligent device cooperates with other intelligent devices which do not complete the downloading task to download the file blocks. The downloading time of the target file can be shortened through collaborative downloading, and the downloading speed of the target file is improved.
Referring to fig. 3, fig. 3 is a schematic block diagram of a file downloading system according to an embodiment of the present application. The file downloading system in the embodiment of the present application will be described below with reference to fig. 3.
As shown in fig. 3, the file download system 300 includes: at least two intelligent devices 301, a master device 302 and a server 303.
The server 303 is configured to crawl a download site of the target file, obtain a download site set of the target file, and send the download site set to the master control device 302;
a master control device 302, configured to receive the download site set sent by the server 303, and determine network communication quality between each intelligent device 301 and each download site in the download site set;
The master control device 302 is further configured to determine a download site corresponding to each intelligent device according to the network communication quality between each intelligent device and each download site and the download site set;
the master control device 302 is further configured to determine, according to network communication quality between each intelligent device and a corresponding download site, a number of file blocks corresponding to each intelligent device;
the master control device 302 is further configured to send the download site and the number of file blocks corresponding to each intelligent device to the corresponding intelligent device;
the at least two intelligent devices 301 are configured to receive the download site and the number of file blocks sent by the master control device 302, download the file blocks of the target file according to the download site and the number of file blocks, and send the file blocks obtained by downloading to the master control device 302;
the master control device 302 is further configured to receive a file block of the target file sent by each intelligent device, and execute a file block reorganization operation according to the received file block, so as to generate the target file.
In an embodiment, the master device 302 is further configured to:
generating a file downloading task corresponding to each intelligent device according to the number of the file blocks and the downloading sites corresponding to each intelligent device;
And sending a file downloading task to each corresponding intelligent device so as to control each intelligent device to download the file block of the target file from the corresponding downloading site.
In an embodiment, the master device 302 is further configured to:
detecting the current network communication quality between each intelligent device and the corresponding download site;
when detecting that the current network communication quality between one intelligent device and the corresponding downloading site is smaller than a preset network communication quality threshold value, determining the current network communication quality between the intelligent device and each downloading site;
re-determining the downloading site corresponding to the intelligent device according to the current network communication quality between the intelligent device and each downloading site;
and sending the redetermined downloading site to the corresponding intelligent device.
In an embodiment, the master device 302 is further configured to:
ordering the network communication quality between each intelligent device and each download site to generate a network communication quality list of each intelligent device;
determining the priority of each intelligent device according to the arrangement sequence of each intelligent device in the network communication quality list;
Determining the downloading site corresponding to each intelligent device from the downloading site set according to the priority of each intelligent device, wherein the intelligent device is uniquely corresponding to the downloading site;
and sending each determined downloading site to the corresponding intelligent device.
In an embodiment, the master device 302 is further configured to:
acquiring the total number of file blocks of the target file, and accumulating the network bandwidth between each intelligent device and the corresponding downloading site to obtain the total network bandwidth;
calculating the proportion of the network bandwidth between each intelligent device and the corresponding download site to the total network bandwidth;
determining the number of the file blocks corresponding to each intelligent device according to the total number of the file blocks and the proportion of the network bandwidth between each intelligent device and the corresponding downloading site to the total network bandwidth;
and sending the determined number of each file block to the corresponding intelligent device.
In an embodiment, the master device 302 is further configured to:
when at least one intelligent device is detected to be in an idle state, acquiring an identifier set of a file block which is not downloaded and the current network communication quality between each intelligent device and a corresponding downloading site;
Determining a subset of identifiers corresponding to each intelligent device according to the identifier set and the current network communication quality between each intelligent device and the corresponding downloading site;
and sending the identifier subset and the downloading site to each corresponding intelligent device so as to control each intelligent device to download the file block of the target file.
In an embodiment, the master device 302 is further configured to:
determining the number of identifiers corresponding to each intelligent device according to the identifier set and the current network communication quality between each intelligent device and the corresponding downloading site;
determining a subset of identifiers corresponding to each intelligent device according to the number of identifiers corresponding to each intelligent device and the identifier set;
and sending the identifier subsets to each corresponding intelligent device.
It should be noted that, for convenience and brevity of description, the specific working process of the above-described system and each device may refer to the corresponding process in the foregoing embodiment of the file downloading method, which is not described herein again.
The system provided by the above embodiment may be implemented in the form of a computer program that can be run on a master control device as shown in fig. 4.
Referring to fig. 4, fig. 4 is a schematic block diagram of a structure of a master control device according to an embodiment of the present application. The master device may be an intelligent device.
As shown in fig. 4, the master device includes a processor, a memory, and a network interface connected by a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program comprises program instructions that, when executed, cause a processor to perform any of a number of file download methods.
The processor is used for providing computing and control capabilities and supporting the operation of the entire master control device.
The internal memory provides an environment for the execution of a computer program in a non-volatile storage medium that, when executed by a processor, causes the processor to perform any of a number of file download methods.
The network interface is used for network communication such as transmitting assigned tasks and the like. It will be appreciated by those skilled in the art that the structure shown in fig. 4 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the master device to which the present application is applied, and that a particular master device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-Programmable gate arrays (FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein in one embodiment the processor is adapted to run a computer program stored in a memory to implement the steps of the file downloading method as described above.
It should be noted that, for convenience and brevity of description, other embodiments and specific working processes of the master control device described above may refer to the corresponding processes in the foregoing file downloading method embodiment or the file downloading system embodiment, which are not described herein again.
Embodiments of the present application also provide a computer readable storage medium, where a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed, a method implemented by the computer program may refer to various embodiments of the downloading method of the present application.
The computer readable storage medium may be an internal storage unit of the master device according to the foregoing embodiment, for example, a hard disk or a memory of the master device. The computer readable storage medium may also be an external storage device of the master device, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the master device.
It is to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments. While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. The file downloading method is characterized by being applied to the master control equipment and comprising the following steps of:
acquiring a downloading site set of a target file, and determining network communication quality between each intelligent device in at least two intelligent devices and each downloading site in the downloading site set; the download site set comprises a download link; the network communication quality is the communication quality of a network broadband;
determining a downloading site corresponding to each intelligent device according to the network communication quality between each intelligent device and each downloading site and the downloading site set; each intelligent device is distributed with a main downloading site and one or more backup downloading sites;
Determining the number of file blocks corresponding to each intelligent device according to the network communication quality between each intelligent device and the corresponding downloading site;
according to the number of the file blocks and the downloading sites corresponding to each intelligent device, controlling each intelligent device to download the file blocks of the target file;
and executing file block reorganization operation according to the file blocks obtained by downloading each intelligent device to generate the target file.
2. The method for downloading files according to claim 1, wherein said controlling each of said intelligent devices to download the file blocks of said target file according to the respective number of file blocks and download sites of each of said intelligent devices comprises:
generating a file downloading task corresponding to each intelligent device according to the number of the file blocks and the downloading sites corresponding to each intelligent device;
and controlling each intelligent device to download the file block of the target file from the corresponding downloading site according to the file downloading task corresponding to each intelligent device.
3. The method for downloading files according to claim 1, wherein after controlling each intelligent device to download the file blocks of the target file according to the number of the file blocks and the download site corresponding to each intelligent device, the method further comprises:
When at least one intelligent device is detected to be in an idle state, acquiring an identifier set of a file block which is not downloaded and the current network communication quality between each intelligent device and a corresponding downloading site;
determining a subset of identifiers corresponding to each intelligent device according to the identifier set and the current network communication quality between each intelligent device and the corresponding downloading site;
and controlling each intelligent device to download the file block of the target file according to the identifier subset and the downloading site corresponding to each intelligent device.
4. A method of downloading a file as claimed in claim 3, wherein said determining a respective subset of identifiers for each of said smart devices based on said set of identifiers and a current network communication quality between each of said smart devices and a respective corresponding download site comprises:
determining the number of identifiers corresponding to each intelligent device according to the identifier set and the current network communication quality between each intelligent device and the corresponding downloading site;
and determining the identifier subset corresponding to each intelligent device according to the identifier number corresponding to each intelligent device and the identifier set.
5. The method for downloading files according to claim 1, wherein after controlling each intelligent device to download the file blocks of the target file according to the number of the file blocks and the download site corresponding to each intelligent device, the method further comprises:
detecting the current network communication quality between each intelligent device and the corresponding download site;
when the current network communication quality between one intelligent device and the corresponding downloading site is smaller than a preset network communication quality threshold value, determining the current network communication quality between the intelligent device and each downloading site;
and re-determining the downloading site corresponding to the intelligent device according to the current network communication quality between the intelligent device and each downloading site.
6. The file downloading method as claimed in any one of claims 1 to 4, wherein said determining a respective download site for each of said smart devices based on the network communication quality between each of said smart devices and each of said download sites and said set of download sites comprises:
ordering the network communication quality between each intelligent device and each download site to generate a network communication quality list of each intelligent device;
Determining the priority of each intelligent device according to the arrangement sequence of each intelligent device in the network communication quality list;
and determining the downloading site corresponding to each intelligent device from the downloading site set according to the priority of each intelligent device, wherein the intelligent device is uniquely corresponding to the downloading site.
7. The file downloading method as claimed in any one of claims 1 to 4, wherein the network communication quality includes network bandwidth; the determining the number of the file blocks corresponding to each intelligent device according to the network communication quality between each intelligent device and the corresponding download site includes:
acquiring the total number of file blocks of the target file, and accumulating the network bandwidth between each intelligent device and the corresponding downloading site to obtain the total network bandwidth;
calculating the proportion of the network bandwidth between each intelligent device and the corresponding download site to the total network bandwidth;
and determining the number of the file blocks corresponding to each intelligent device according to the total number of the file blocks and the proportion of the network bandwidth between each intelligent device and the corresponding downloading site to the total network bandwidth.
8. A file download system, the file download system comprising: at least two smart devices, master control device and server, wherein:
the server is used for crawling the downloading site of the target file, obtaining a downloading site set of the target file and sending the downloading site set to the main control equipment;
the main control equipment is used for receiving the downloading site set sent by the server and determining the network communication quality between each intelligent equipment and each downloading site in the downloading site set; the download site set comprises a download link; the network communication quality is the communication quality of a network broadband;
the main control equipment is further used for determining the downloading site corresponding to each intelligent device according to the network communication quality between each intelligent device and each downloading site and the downloading site set; each intelligent device is distributed with a main downloading site and one or more backup downloading sites;
the main control equipment is further used for determining the number of the file blocks corresponding to each intelligent equipment according to the network communication quality between each intelligent equipment and the corresponding downloading site;
The main control equipment is further used for sending the download sites and the number of file blocks corresponding to each intelligent equipment to the corresponding intelligent equipment;
each intelligent device is used for receiving the downloading site and the number of file blocks sent by the main control device, downloading the file blocks of the target file according to the downloading site and the number of file blocks, and sending the downloaded file blocks to the main control device;
the main control equipment is also used for receiving the file blocks of the target file sent by each intelligent equipment, and executing file block reorganization operation according to the received file blocks to generate the target file.
9. A master control device comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program when executed by the processor implements the steps of the file downloading method according to any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the file downloading method according to any of claims 1 to 7.
CN201911077809.3A 2019-11-06 2019-11-06 File downloading method, system, equipment and computer readable storage medium Active CN112769887B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911077809.3A CN112769887B (en) 2019-11-06 2019-11-06 File downloading method, system, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911077809.3A CN112769887B (en) 2019-11-06 2019-11-06 File downloading method, system, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112769887A CN112769887A (en) 2021-05-07
CN112769887B true CN112769887B (en) 2023-05-09

Family

ID=75692709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911077809.3A Active CN112769887B (en) 2019-11-06 2019-11-06 File downloading method, system, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112769887B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105491087A (en) * 2014-09-17 2016-04-13 联想(北京)有限公司 File downloading method and device and electronic equipment
CN106657383A (en) * 2017-01-12 2017-05-10 腾讯科技(深圳)有限公司 Data downloading method and relevant equipment
CN109040213A (en) * 2018-07-23 2018-12-18 Oppo广东移动通信有限公司 Document down loading method and Related product
CN109246185A (en) * 2018-07-31 2019-01-18 Oppo广东移动通信有限公司 Document down loading method and Related product

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105491087A (en) * 2014-09-17 2016-04-13 联想(北京)有限公司 File downloading method and device and electronic equipment
CN106657383A (en) * 2017-01-12 2017-05-10 腾讯科技(深圳)有限公司 Data downloading method and relevant equipment
CN109040213A (en) * 2018-07-23 2018-12-18 Oppo广东移动通信有限公司 Document down loading method and Related product
CN109246185A (en) * 2018-07-31 2019-01-18 Oppo广东移动通信有限公司 Document down loading method and Related product

Also Published As

Publication number Publication date
CN112769887A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
US20210337046A1 (en) Intelligent scheduling method, terminal device, edge node cluster and intelligent scheduling system
RU2605919C2 (en) Method and apparatus for displaying push messages
CN107592367B (en) Resource sharing method and device for household appliances and computer readable storage medium
CN109964507B (en) Network function management method, management unit and system
WO2011085625A1 (en) Method, system and client for downloading software installation packages
CN110968331B (en) Method and device for running application program
CN105553870A (en) Method and device for allocating service request
CN104410660A (en) Method and device of downloading multimedia resources as well as router and server
CN110933733B (en) Network distribution method, device, computer equipment and storage medium
CN111212154B (en) Service binding method, device, terminal, server and storage medium
CN106713395B (en) Data downloading method and device
CN109446445B (en) Resource acquisition method and device
CN105530323B (en) File upgrading method, related equipment and system
CN110741617A (en) Resource updating method and device, computer equipment and storage medium
CN110955460B (en) Service process starting method and device, electronic equipment and storage medium
CN109471713B (en) Method and device for inquiring information
CN112769887B (en) File downloading method, system, equipment and computer readable storage medium
CN113132958B (en) Fusion networking method, device, system and computer readable storage medium
CN108124021B (en) Method, device and system for obtaining Internet Protocol (IP) address and accessing website
CN109525417B (en) Household appliance access method based on internet access, household appliance controller and storage medium
CN101146107B (en) A method and device for data download
KR20210043654A (en) Method, apparatus and storage medium for resource organization
CN113721936A (en) Application management method, intelligent terminal, device and storage medium
CN110602221A (en) Notification level processing method and device and readable storage medium
CN113448607B (en) Method and device for firmware upgrading and intelligent household appliance

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