CN113382065A - File downloading method, device, system, equipment and storage medium - Google Patents

File downloading method, device, system, equipment and storage medium Download PDF

Info

Publication number
CN113382065A
CN113382065A CN202110638615.7A CN202110638615A CN113382065A CN 113382065 A CN113382065 A CN 113382065A CN 202110638615 A CN202110638615 A CN 202110638615A CN 113382065 A CN113382065 A CN 113382065A
Authority
CN
China
Prior art keywords
file
target
equipment
downloading
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.)
Granted
Application number
CN202110638615.7A
Other languages
Chinese (zh)
Other versions
CN113382065B (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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110638615.7A priority Critical patent/CN113382065B/en
Publication of CN113382065A publication Critical patent/CN113382065A/en
Application granted granted Critical
Publication of CN113382065B publication Critical patent/CN113382065B/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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention discloses a file downloading method, a device, a system, equipment and a storage medium.A first device downloads a target file from a cloud end, and sends a download file notification to a second device determined from other edge terminal devices in a target network point, so that the second device downloads the target file from the first device, then each device which finishes the target file download is used as a target device, a third device is determined from the edge terminal devices which do not download the target file in the target network point, and sends the download file notification to the respective determined third device, so that the third device downloads the target file from the corresponding target device based on the received download file notification, and so on until all the edge terminal devices in the target network point finish the target file download. Therefore, the bandwidth occupation of the cloud server can be reduced, and the file downloading efficiency can be improved.

Description

File downloading method, device, system, equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a system, a device, and a storage medium for downloading a file.
Background
In recent years, applications based on software and hardware are more and more extensive, screen display devices with android intelligent terminals are gradually applied to multiple industries such as transportation, retail, medical treatment and education, and digital signage is one of representative works. The digital signage replaces the traditional information presentation form, can remotely push information and update display content in real time by carrying an information publishing system, improves the overall operation efficiency for customers, and becomes a new landing direction of IOT. The core program file management module provides data support for integral display.
At present, in an information distribution system, a user stores a program file in a file server after making a program, and then all terminals download the program file from the file server to play the program file. Therefore, when the program file is large and the number of terminals is large, a single-point problem exists, a plurality of terminals request the same server to download the file, the file downloading efficiency is greatly reduced due to the network bandwidth of the server, the network bandwidth of the server is occupied for a long time, the normal work of other functions of the server is affected, and the user experience is seriously affected.
Disclosure of Invention
In view of the above, the present invention has been made to provide a file downloading method, apparatus, system, device and storage medium that overcome or at least partially solve the above-mentioned problems.
In a first aspect, an embodiment of the present specification provides a file downloading method, including: a method of file download, the method comprising:
the method comprises the steps that a first device downloads a target file from a cloud end and sends a download file notification to a second device determined from other edge end devices in a target network point;
the second device downloading the target file from the first device based on the download file notification;
and each device which finishes the target file downloading is taken as a target device, a third device is determined from the edge terminal devices which do not download the target file in the target network point, and a download file notification is issued to the determined third devices, so that the third devices download the target file from the corresponding target devices based on the received download file notification until all the edge terminal devices in the target network point finish the target file downloading.
Further, before the first device downloads the target file from the cloud, the method further includes:
and the candidate edge terminal equipment in the target network point responds to a file downloading instruction issued by the cloud, initiates election of the first equipment, and determines the first equipment from the candidate edge terminal equipment.
Further, the initiating election of the first device, determining the first device from the candidate edge devices, includes:
the candidate edge end device initiates a voting request to other edge end devices in the target network point based on the storage capacity of the available storage space of the candidate edge end device, and elects the first device from the candidate edge end device based on the storage capacity.
Further, the electing the first device from the candidate edge devices based on the storage capacity includes:
and electing the candidate edge device with the largest storage capacity as the first device.
Further, the issuing of the download file notification includes:
generating a download link of the target file by starting a pre-configured file service;
and issuing a download file notification of the target file based on the download link.
Further, the file service is a lightweight file service.
Further, the file downloading method further comprises:
and after determining that all edge terminal devices in the target network point finish downloading the target file, the target device closes the file service.
Further, the issuing of the download file notification to a second device determined from other edge devices in the target node includes:
discovering other edge devices in the target network point by using an mDNS service, and selecting part of edge devices from the discovered edge devices as the second devices;
and issuing a download file notification to the second equipment.
Furthermore, the edge device is a digital sign with an information distribution system.
In a second aspect, an embodiment of the present specification provides a file downloading method, which is applied to an edge device in a target node, and the method includes:
initiating election of the leader equipment in the target network point in response to a file downloading instruction issued by the cloud;
if the target file becomes the leader device, downloading the target file from the cloud based on the file downloading instruction, and issuing a downloading file notification to a device to be downloaded determined from other edge end devices in the target network point so that the determined device to be downloaded downloads the target file from the leader device;
if the target equipment becomes the following equipment, when a target equipment download file notification is received, downloading the target file from the target equipment, determining equipment to be downloaded from edge end equipment which does not download the target file in the target network point, and issuing a download file notification to the determined equipment to be downloaded, so that the equipment to be downloaded which receives the download file notification downloads the target file from the following equipment, wherein the target equipment is one edge end equipment which finishes downloading the target file in the target network point.
Further, the initiating election of the leader device in the target mesh point includes:
based on the storage capacity of the available storage space of the target network point, initiating a voting request to other edge terminal equipment in the target network point;
and determining whether the equipment becomes the leader equipment or not based on the voting result fed back by the other edge equipment.
Further, the issuing of the download file notification includes:
generating a download link of the target file by starting a pre-configured file service;
and issuing a download file notification of the target file based on the download link.
In a third aspect, an embodiment of the present specification provides a file downloading system, where the system includes: the system comprises a cloud server and a plurality of edge end devices arranged at a target network point, wherein each edge end device is in communication connection with the cloud server, and the edge end devices are in communication connection with each other;
the cloud server is used for issuing a file downloading instruction of a target file to each edge terminal device;
the plurality of edge devices are configured to execute the file downloading method according to the first aspect.
In a fourth aspect, an embodiment of the present specification provides a file downloading apparatus, which is applied to an edge device in a target node, and the apparatus includes:
the election module is used for responding to a file downloading instruction issued by a cloud end and initiating election of the leader equipment in the target network point;
the first downloading module is used for downloading a target file from the cloud based on the file downloading instruction if the target file becomes the leader equipment, and issuing a downloading file notification to equipment to be downloaded determined from other edge end equipment in the target network point so that the determined equipment to be downloaded downloads the target file from the leader equipment;
and the second downloading module is used for downloading the target file from the target equipment when receiving a target equipment file downloading notification if the target equipment is a following equipment, determining equipment to be downloaded from edge end equipment which does not download the target file in the target network point, and issuing a file downloading notification to the determined equipment to be downloaded so as to enable the equipment to be downloaded which receives the file downloading notification to download the target file from the following equipment, wherein the target equipment is one edge end equipment which finishes downloading the target file in the target network point.
In a fifth aspect, the present specification provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and when executed by the processor, the electronic device implements the steps of the file downloading method according to the second aspect.
In a sixth aspect, the present specification provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the steps of the file downloading method according to the second aspect.
The technical scheme provided in the embodiment of the specification at least has the following technical effects or advantages:
in the file downloading method, apparatus, system, device and storage medium provided in this description, a first device downloads a target file from a cloud, and sends a download file notification to a second device determined from other edge devices in a target site, so that the second device downloads the target file from the first device, and then each device that completes downloading the target file includes the first device and the second device both serving as target devices, and determines a third device from the edge devices that do not download the target file in the target site, and sends a download file notification to the respective determined third device, so that the third device downloads the target file from the corresponding target device based on the received download file notification, and so on until all the edge devices in the target site complete downloading of the target file. Therefore, distributed downloading of the target file can be achieved, network flow of the cloud server, which is relied on for downloading the original file, is distributed to each edge device, bandwidth occupation of the cloud server is reduced, file transmission cost is reduced, the problem of low downloading efficiency caused by network congestion during file downloading is effectively solved, and file downloading efficiency is improved.
The above description is only an overview of the technical solutions provided by the embodiments of the present specification, and in order to make the technical means of the embodiments of the present specification more clearly understood, the embodiments of the present specification may be implemented according to the content of the description, and in order to make the above and other objects, features, and advantages of the embodiments of the present specification more clearly understood, the following detailed description of the embodiments of the present specification is given.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic diagram of an exemplary file download system in an embodiment of the present disclosure;
fig. 2 is a flowchart of a file downloading method provided in the first aspect of the embodiments of the present disclosure;
FIG. 3 is a schematic diagram of an exemplary file downloading process in an embodiment of the present disclosure;
fig. 4 is a flowchart of a file downloading method provided in a second aspect of the embodiments of the present specification;
fig. 5 is a block diagram illustrating a file downloading apparatus according to a third aspect of the embodiments of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device provided in the fourth aspect of the embodiments of the present description.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a schematic diagram illustrating an exemplary file download system provided by an embodiment of the present specification. As shown in fig. 1, the file downloading system is divided into a cloud 100 and an edge node, where the cloud 100 is provided with a cloud server, the edge node includes one or more nodes 110 (only one node is shown in fig. 1), and each node 110 includes a plurality of edge node devices (such as an edge node device 111, an edge node device 112, an edge node device 113, and an edge node device 114 shown in fig. 1).
The cloud server establishes a communication connection with each edge device in each node 110, and the edge devices of the same node establish a communication connection with each other. Specifically, the edge devices of the same node 110 are in a local area network, the network devices in the local area network are linked to the same router or gateway, and the gateway assigns an IP address to each device in the local area network, so as to implement the mutual communication between these devices according to the IP addresses.
For example, the cloud server may include an application server 101, a file server 102, and an IoT (Internet of Things) server 103. The application server 101 corresponds to a client, and is configured to provide an information distribution service for a user. The file server 102 is used for storing and downloading files issued by users, and providing file downloading service for edge devices in the system. The IoT server 103 is configured to perform communication connection with each edge device in the system, and perform data interaction with each edge device. The application server 101, the IoT server 103, and the file server 102 may be provided separately or integrally.
In actual application, when a user needs to publish a target file to each edge device of each website, the target file can be published through a client corresponding to the application server 101, and the published target file is stored by the file server 102 at the cloud. When receiving the publishing instruction sent by the application server 101, the IoT server 103 may issue a file downloading instruction of the target file to each edge device in each network point through a message queue and a message Topic (Topic), and the edge devices in the same network point 110 download the target file by executing the file downloading method provided in this embodiment of the present disclosure. The specific implementation process of the file downloading method will be described in the method embodiments provided below.
Specifically, the type of the edge device and the object file may be determined based on the actual application scenario. For example, in an application scenario, the information distribution system may be applied to distribute a multimedia file, such as a program file or an advertisement file, the target file may be the multimedia file, the edge device may be a digital signage equipped with the information distribution system, and the digital signage may play the multimedia file after completing downloading the multimedia file. For another example, in another application scenario, the information distribution system may be applied to distribution of a conference file of a teleconference system, the target file may be the conference file, the edge device may be a conference terminal equipped with the teleconference system, and the conference file may be displayed after the conference terminal finishes downloading the conference file, so that participants can know the conference content. For example, the conference terminal may be a PC (Personal Computer), a smart phone, a smart tv, a wearable device, or the like.
The file downloading method provided by the embodiments of the present specification is further described in detail below with reference to the drawings of the specification.
In a first aspect, referring to fig. 2, a file downloading method provided in an embodiment of the present disclosure may include the following steps S201 to S203.
In step S201, the first device downloads the target file from the cloud, and issues a download file notification to the second device determined from other edge devices in the target website.
In step S202, the second device downloads the target file from the first device based on the download file notification.
Step S203, each device which finishes the target file downloading is taken as a target device, a third device is determined from the edge terminal devices which do not download the target file in the target network point, and a download file notification is issued to the respective determined third device, so that the third device downloads the target file from the corresponding target device based on the received download file notification until all the edge terminal devices in the target network point finish the target file downloading.
It is understood that, before performing step S201, the first device may be determined from the edge devices included in the target mesh point. For example, an edge device may be specified in advance from edge devices included in the target node as the first device, or a standby device of the first device may be further specified from other edge devices of the target node, so that when the first device fails or is disconnected before the target file is downloaded from the cloud, the standby device serves as the first device to download the target file from the cloud.
In an optional embodiment, in order to improve the fault tolerance of the file downloading process and avoid that a device is disconnected or other faults affect the whole file downloading process, the first device may be determined in an election manner. At this time, before performing step S201, the file downloading method provided in the embodiment of the present specification may further include: and the candidate edge end equipment in the target network point responds to a file downloading instruction issued by the cloud, initiates election of the first equipment, and determines the first equipment (Leader equipment) from the candidate edge end equipment.
Each edge device in the target mesh point can be used as a candidate edge device. Or, the edge device in the target mesh point may obtain its own available storage space, and if the storage amount of the available storage space is greater than a preset threshold, the available storage space is used as a candidate edge device, where the preset threshold may be configured according to the needs of the actual application scenario.
When a file release task is triggered, the cloud end can issue a file download instruction to each candidate edge end device in the target network point. And when receiving a file downloading instruction issued by the cloud, each candidate edge terminal device initiates an election request to perform election of the first device.
In an alternative embodiment, the edge device in the target node may discover other edge devices in the local area network by starting an mDNS (multicast DNS) service of the local area network. The mDNS protocol is a zero configuration service, which enables each edge device in the local area network to realize mutual discovery and communication, and the used port is 5353 port, which complies with the DNS protocol. Therefore, the edge terminal equipment can be flexibly increased and decreased in the target network point conveniently, and the expandability of the system is improved.
For example, when each edge device in the target node accesses the lan, the port 5353 may be opened to monitor the message in the lan. When a file downloading instruction sent by the cloud is received, a message can be sent to other devices in the local area network through the 5353 port, and the IP address of the message sender is informed. Therefore, the edge end devices in the local area network can discover each other, establish an IP address list of other edge end devices in the local area network, and send voting requests to the other edge end devices in the local area network based on the IP address list so as to obtain an election result of the first device.
Of course, in other embodiments of this specification, other ways of discovering other edge devices in the target node may also be adopted, or a routing list may also be configured in advance in each edge device, where the routing list stores the identifiers and address information of other edge devices in the node where the routing list is located, which is not limited herein.
For example, the election of the first device may employ a Raft election algorithm. Alternatively, other suitable consensus election algorithms such as the other Leader election algorithms in ZooKeeper may be used.
Because most election algorithms such as the Raft election algorithm are random election methods which are not controlled by the outside, election of the Leader is completely random, candidate equipment with high performance is difficult to be elected as the Leader equipment, and the working performance of the system is not improved. In an optional implementation manner, in order to elect a higher-performance edge device as the first device to ensure stability of the file service, parameter information capable of reflecting device performance may be added to the voting request initiated by each candidate edge device, so that each device may determine the affiliation of the vote according to the parameter information after receiving the voting request.
In specific implementation, the parameter information may be determined according to an actual application scenario. In an application scenario, considering that the edge device needs to perform a file downloading task without performing a computation-intensive task, the parameter information may be a storage capacity of an available storage space. At this time, the initiating election of the first device, and the determining the first device from the candidate edge devices may include: the candidate edge terminal equipment initiates a voting request to other edge terminal equipment in the target network point based on the storage capacity of the available storage space of the candidate edge terminal equipment, and elects the first equipment from the candidate edge terminal equipment based on the storage capacity.
For example, the voting request may include a storage capacity of an available storage space of the candidate edge-end device, or the voting request may include a voting weight value obtained based on the storage capacity of the available storage space, where the voting weight value reflects a size of the storage capacity.
After receiving the voting request, the edge device may compare the storage capacity of its available storage space with the storage capacities of other devices, and vote for a candidate edge device with a larger available storage space. As an embodiment, the candidate edge device with the largest storage capacity may be elected as the first device.
Taking the improved Raft election algorithm as an example, the specific election process may include:
(1) the candidate edge terminal equipment initiates a voting request to other edge terminal equipment in the target network point according to the IP address lists of other edge terminal equipment in the target network point;
(2) after receiving the voting request, the edge terminal equipment determines the attribution of the votes by comparing the storage capacity of the available storage space;
(3) when the number of votes obtained by a certain candidate edge device exceeds N/2 (N is the total number of the edge devices), the candidate edge device becomes a Leader.
(4) The Leader device broadcasts to inform other edge devices that the Leader has elected, and the other edge devices switch to a following (follow) state after receiving the notification, so as to become following devices.
It should be noted that, in other embodiments of this specification, the parameter information may be other performance parameters besides the storage capacity of the available storage space, such as a calculation speed and/or a data transmission speed, which is not limited in this embodiment.
After the first device is determined, the step S201 may be executed, and the first device downloads the target file from the cloud based on the file downloading instruction issued by the cloud. It can be understood that the file downloading instruction may include a downloading link of the target file in the cloud file server, and the target file may be remotely downloaded from the cloud file server through the downloading link.
After the first device finishes downloading the target file, the second device determined from other edge end devices in the target network point can provide the target file downloading service for the second device. In particular, the second device may be selected from devices discovered using the mDNS service. The second device may be selected randomly, or may be selected according to a priority order configured for each edge device in the target mesh point in advance. The specific selection number of the second devices can be determined according to the network bandwidth of the target mesh point in the actual application scene and the loaded capacity of the first device. For example, in one application scenario, two edge devices may be selected as the second device. After the second device is selected, a notification of downloading the file can be issued to the second device.
In an optional implementation manner, in order to enable the first device to have a capability of providing a file download service for other devices, that is, to have a function of a file server, an http service may be configured in the first device in advance to serve as a file service for a local folder in the first device, where the local folder is used to store a target file (to provide the file service for an edge device), and after the first device completes downloading of the target file, the file service may be opened, so that the first device has the function of the file server. At this time, in step S201, the process of issuing the download file notification may include: generating a download link of a target file in first equipment by starting a pre-configured file service; and issuing a download file notification of the target file based on the download link. For example, to reduce the hardware requirements for edge-end devices, lightweight file services may be employed. The lightweight class has low requirements on equipment, and equipment with lower hardware configuration can also be suitable. For example, nginx file service may be adopted, the function of a file server is realized by using a local folder of a nginx proxy for storing a target file, and sharing of the target file in the first device may be realized by starting nginx.
Of course, in other embodiments of the present description, if the edge device itself has a file service function, that is, has the capability of providing a file download service for other devices, it is also not necessary to start the proxy file service in the above process.
In step S202, the download file notification may include a download link of the target file, and after receiving the download file notification, the second device may parse the download link from the download file notification, and download the target file from the first device through the download link.
It can be understood that, in this embodiment, except for the first device, each edge device that completes downloading the target file may be used as a target device together with the first device, and is used to provide a target file downloading service for the edge devices that do not download the target file in the target website.
That is, after the second device finishes downloading the target file, the second device may be used as a target device together with the first device, and step S203 is executed to provide a target file downloading service for other edge devices that do not download the target file in the target website. In addition, in order to enable the second device to have the capability of providing the file downloading service for other devices, the second device may start the pre-configured file service after downloading the target file from the first device.
In step S203, for each target device, a third device needs to be determined from the edge devices that do not download the target file in the target node, and the third device downloads the target file from the corresponding target device. The third device which finishes downloading the target file can also be used as the target device, a new third device is determined from the edge terminal devices which do not download the target file in the target network point together with the previous target device, and the step of issuing the download file notification to the respective corresponding third devices is repeatedly executed, so that the third devices download the target file from the corresponding target devices based on the received download file notification, and the like is repeated until all the edge terminal devices in the target network point finish downloading the target file. It should be noted that, for each target device, the third device may be selected randomly each time, or may be selected according to a priority order configured for each edge device in the target mesh point in advance.
Therefore, the target file is remotely downloaded from the cloud end by the first equipment, and the residual edge end equipment except the first equipment in the target network point downloads the target file from other edge end equipment in multiple rounds, so that distributed downloading of the target file is realized, network flow of a cloud end server depending on original file downloading is distributed to each edge end equipment, and compared with a unified mode of downloading the file from the cloud end, occupation of bandwidth of the cloud end network is greatly reduced, file transmission cost is reduced, and file downloading efficiency is improved. In addition, after the first device finishes downloading the target file, even if the cloud server network fails, the target file downloading of other edge-end devices in the target network point cannot be influenced, and the network dependence of the terminal on the cloud server is effectively reduced.
In an alternative embodiment, in order to determine which edge devices in the target node have not downloaded the target file, each edge device, other than the first device, that completes downloading the target file and opens the file service may feed back completion information to the first device. Therefore, the first device can mark the edge devices which have finished downloading the target file according to the received finishing information, determine third devices for the edge devices which can be used as target devices from the remaining unmarked edge devices in the target network point, and instruct the edge devices to issue downloading file notifications to the respective corresponding third devices. It should be noted that the third device determined for different target devices is different.
In another alternative embodiment, in addition to the first device, each edge device that completes downloading the target file and starts the file service may broadcast the completion information to other edge devices in the target network point, so that each edge device may mark the edge device that has completed downloading the target file. For the target devices, a third device can be selected from the unmarked edge devices, and other edge devices are broadcasted after the selection to inform that the third device is selected, so as to avoid the duplication of the third device selected by different target devices.
It should be noted that, for convenience of configuration, the number of the third devices corresponding to each target device may be the same as the number of the second devices selected by the first device. For example, two edge devices selected by the first device are used as the second device, and two third devices may be selected by each target device. Alternatively, in other embodiments of the present disclosure, the number of the third devices selected by each target device may also be different according to the self-loading capability, and is not limited herein.
If in the foregoing process, a file service starting manner is adopted, so that each target device has a file service function, and considering that the file service is always started and occupies resources of the edge terminal device, thereby affecting functions to be implemented by the edge terminal device itself, the file downloading method provided in the embodiment of the present specification further includes: and after determining that all edge end devices in the target network point finish downloading the target file, each target device closes the file service.
In specific implementation, after the target file is downloaded, each edge device feeds back completion information to the first device. If the first device determines that all edge end devices in the target network point finish downloading the target file according to the received finish information, the first device considers that the whole downloading task is finished, can close the file service of the first device, and sends a close notice to other target devices except the first device in the target network point through the mDNS. And when other target devices receive the closing notification, closing the file service.
Or, after the edge device finishes downloading the target file, the edge device may broadcast the finish information to all other edge devices, so that each target device may determine whether the edge device which does not download the target file still exists in the target network point according to the received finish information, and if not, close the file service.
In order to more clearly understand the technical solutions provided by the embodiments of the present disclosure, a file downloading process is described below by taking an exemplary implementation process as an example.
Assuming that the target network point comprises N edge end devices, after a user issues a target file, the cloud end issues a file downloading instruction to each edge end device in the target network point, and when each edge end device receives the file downloading instruction, a voting request is sent to other edge end devices to elect a first device.
As shown in fig. 3, assuming that the selected first device is denoted as device 1, the device 1 first downloads the target file from the cloud according to the file download instruction, and starts the file service after the downloading is completed.
Then, a first round of downloading in the target network point is carried out, the equipment 1 randomly selects the equipment 2 and the equipment 3 from other edge end equipment which does not download the target file, the downloading file notification is respectively issued to the equipment 2 and the equipment 3, and the equipment 2 and the equipment 3 are indicated to respectively download the target file from the equipment 1. After the download is completed, the device 2 and the device 3 each start a file service.
Then, a second round of downloading in the target network point is carried out. Device 1, device 2 and device 3 determine two devices from the remaining undeleted edge devices, respectively, assuming device 3 selects device 4 and device 5, device 2 selects device 6 and device 7, and device 1 selects device 8 and device 9. Similarly, device 4 and device 5 download the object file from device 3, device 6 and device 7 download the object file from device 2, and device 8 and device 9 download the object file from device 1, respectively. After the target file downloading is completed, the devices 4 to 9 respectively start file services.
Further, a third round of downloading within the target site is performed. The devices 1 to 9 determine two devices from the edge devices of the remaining undeleted object files, respectively, assuming that the device 1 selects the device 10 and the device 11, the device 2 selects the device 12 and the device 13, … …, and the device 9 selects the device 26 and the device 27, and then each notifies the selected device to download the object file. And the equipment which finishes downloading the target file in the current round respectively starts file service, and provides downloading service for other equipment which does not download the target file.
And repeating the steps until the m-th round of downloading is carried out, and the target file downloading of the last equipment N is completed, then the downloading tasks of all the edge-end equipment in the target network point to the target file are completed, and the file service started in each equipment is closed.
By the file downloading method provided by the embodiment of the specification, distributed downloading of the target file is achieved, network flow of the cloud server, which is relied on by file downloading originally, is distributed to each edge device, bandwidth occupation of the cloud server is reduced, file transmission cost is reduced, the problem of low downloading efficiency caused by network congestion during file downloading is effectively solved, and file downloading efficiency is improved.
In a second aspect, an embodiment of the present specification provides a file downloading method, which is applied to an edge device in a target node. As shown in fig. 4, the method may include the following steps S401 to S403.
Step S401, responding to a file downloading instruction issued by the cloud, and initiating election of the leader equipment in the target network point.
Step S402, if the target file becomes the leader device, downloading the target file from the cloud based on the file downloading instruction, and issuing a downloading file notification to the device to be downloaded determined from other edge devices in the target network point, so that the determined device to be downloaded downloads the target file from the leader device.
Step S403, if the target device becomes a follower device, when receiving a notification of downloading the target file from the target device, determining a device to be downloaded from the edge device that does not download the target file in the target website, and issuing a notification of downloading the file to the determined device to be downloaded, so that the device to be downloaded that receives the notification of downloading the file downloads the target file from the follower device.
The target device is one of the edge devices which have finished downloading the target file in the target network point.
It should be noted that, for the specific implementation process from step S401 to step S403, reference may be made to the related description in the method embodiment described in the foregoing first aspect, and details are not described here again. The leader device is the first device in the embodiment of the method according to the first aspect, and the remaining edge devices in the target mesh point except for the first device may be referred to as follower devices.
In an optional implementation manner, the initiating election of a leader device in a target mesh point includes: based on the storage capacity of the available storage space of the target network point, initiating a voting request to other edge terminal equipment in the target network point; and determining whether the equipment becomes the leader equipment or not based on the voting result fed back by other edge equipment. For a specific implementation process, reference may be made to the related description in the method embodiment described in the first aspect, and details are not described here.
In an optional implementation manner, the issuing of the download file notification includes: generating a download link of a target file by starting a pre-configured file service; and issuing a download file notification of the target file based on the download link.
By the file downloading method provided by the embodiment of the specification, distributed downloading of the target file is achieved, network flow of the cloud server, which is relied on by file downloading originally, is distributed to each edge device, bandwidth occupation of the cloud server is reduced, file transmission cost is reduced, the problem of low downloading efficiency caused by network congestion during file downloading is effectively solved, and file downloading efficiency is improved. And moreover, leader equipment for downloading the file from the cloud is flexibly determined in a election mode, so that the fault tolerance of the file downloading process is improved, and the phenomenon that the designated equipment is disconnected or other faults influence the whole file downloading process is avoided.
In a third aspect, based on the same inventive concept, an embodiment of the present specification further provides a file downloading apparatus, which is applied to an edge device in a target node. As shown in fig. 5, the file downloading apparatus 50 includes:
an election module 501, configured to initiate election of a leader device in the target website in response to a file download instruction issued by a cloud;
a first downloading module 502, configured to, if the target file becomes the leader device, download the target file from the cloud based on the file downloading instruction, and send a download file notification to a device to be downloaded determined from other edge devices in the target website, so that the determined device to be downloaded downloads the target file from the leader device;
a second downloading module 503, configured to, if becoming a following device, download the target file from the target device when receiving a notification of downloading the target file from the target device, determine a device to be downloaded from edge devices that do not download the target file in the target website, and issue a notification of downloading the file to the determined device to be downloaded, so that the device to be downloaded that receives the notification of downloading the file downloads the target file from the following device, where the target device is one of the edge devices that have completed downloading the target file in the target website.
In an optional implementation manner, the election module 501 is configured to initiate a voting request to other edge devices in the target node based on a storage capacity of an available storage space of the election module; and determining whether the equipment becomes the leader equipment or not based on the voting result fed back by other edge equipment.
In an optional implementation manner, the first downloading module 502 and the second downloading module 503 are configured to: generating a download link of a target file by starting a pre-configured file service; and issuing a download file notification of the target file based on the download link.
The modules may be implemented by software codes, or may be implemented by hardware, for example, an integrated circuit chip.
It should be further noted that, for the specific process of implementing the respective function by each module, please refer to the specific content described in the foregoing method embodiments, which is not described herein again.
In a fourth aspect, based on the same inventive concept, as shown in fig. 6, an embodiment of the present specification further provides an electronic device 60, which includes a processor 602, a memory 601, and a computer program stored on the memory 601 and executable on the processor 602. When executed by the processor, the computer program implements the processes of the file downloading method embodiment provided in the second aspect, and can achieve the same technical effect, and is not described herein again to avoid repetition.
For example, the electronic device may be a digital signage equipped with an information distribution system. Or, the target file may be distributed in the same network point, and the number of the terminal devices is large, and the terminal devices need to download the same target file from the cloud. For example, when the electronic device is applied to an electronic conference room scene, the electronic device may also be a conference terminal, such as a PC (Personal Computer), a smart phone, a smart television, or a wearable device. It can be understood that, in an electronic conference room scenario, a plurality of conference terminals are arranged in the same network point so as to perform an online conference, and each conference terminal needs to download the same conference file.
In a fifth aspect, based on the same inventive concept, an embodiment of the present specification further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer instruction, and when the computer instruction runs on a computer, the computer executes each process of the file downloading method embodiment provided in the second aspect, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. The term "plurality" means more than two, including two or more.
While preferred embodiments of the present specification have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all changes and modifications that fall within the scope of the specification.

Claims (17)

1. A method for downloading a file, the method comprising:
the method comprises the steps that a first device downloads a target file from a cloud end and sends a download file notification to a second device determined from other edge end devices in a target network point;
the second device downloading the target file from the first device based on the download file notification;
and each device which finishes the target file downloading is taken as a target device, a third device is determined from the edge terminal devices which do not download the target file in the target network point, and a download file notification is issued to the determined third devices, so that the third devices download the target file from the corresponding target devices based on the received download file notification until all the edge terminal devices in the target network point finish the target file downloading.
2. The method of claim 1, wherein prior to the first device downloading the target file from the cloud, further comprising:
and the candidate edge terminal equipment in the target network point responds to a file downloading instruction issued by the cloud, initiates election of the first equipment, and determines the first equipment from the candidate edge terminal equipment.
3. The method of claim 2, wherein the initiating election of the first device, determining the first device from among the candidate edge end devices, comprises:
the candidate edge end device initiates a voting request to other edge end devices in the target network point based on the storage capacity of the available storage space of the candidate edge end device, and elects the first device from the candidate edge end device based on the storage capacity.
4. The method of claim 3, wherein the electing the first device from the candidate edge devices based on the storage capacity comprises:
and electing the candidate edge device with the largest storage capacity as the first device.
5. The method of claim 1, wherein said issuing a download file notification comprises:
generating a download link of the target file by starting a pre-configured file service;
and issuing a download file notification of the target file based on the download link.
6. The method of claim 5, wherein the file service is a lightweight file service.
7. The method of claim 5, wherein the method further comprises:
and after determining that all edge terminal devices in the target network point finish downloading the target file, the target device closes the file service.
8. The method as claimed in claim 1, wherein said issuing the notification of the downloaded file to the second device determined from other edge devices in the target node comprises:
discovering other edge devices in the target network point by using an mDNS service, and selecting part of edge devices from the discovered edge devices as the second devices;
and issuing a download file notification to the second equipment.
9. The method of claim 1, wherein the edge device is a digital sign carrying an information distribution system.
10. A file downloading method, applied to an edge device in a target network point, the method comprising:
initiating election of the leader equipment in the target network point in response to a file downloading instruction issued by the cloud;
if the target file becomes the leader device, downloading the target file from the cloud based on the file downloading instruction, and issuing a downloading file notification to a device to be downloaded determined from other edge end devices in the target network point so that the determined device to be downloaded downloads the target file from the leader device;
if the target equipment becomes the following equipment, when a target equipment download file notification is received, downloading the target file from the target equipment, determining equipment to be downloaded from edge end equipment which does not download the target file in the target network point, and issuing a download file notification to the determined equipment to be downloaded, so that the equipment to be downloaded which receives the download file notification downloads the target file from the following equipment, wherein the target equipment is one edge end equipment which finishes downloading the target file in the target network point.
11. The method of claim 10, wherein the initiating election of a leader device in the target mesh point comprises:
based on the storage capacity of the available storage space of the target network point, initiating a voting request to other edge terminal equipment in the target network point;
and determining whether the equipment becomes the leader equipment or not based on the voting result fed back by the other edge equipment.
12. The method of claim 10, wherein said issuing a download file notification comprises:
generating a download link of the target file by starting a pre-configured file service;
and issuing a download file notification of the target file based on the download link.
13. A file download system, the system comprising: the system comprises a cloud server and a plurality of edge end devices arranged at a target network point, wherein each edge end device is in communication connection with the cloud server, and the edge end devices are in communication connection with each other;
the cloud server is used for issuing a file downloading instruction of a target file to each edge terminal device;
the edge devices are used for executing the file downloading method of any one of claims 1-9.
14. A file downloading apparatus, applied to an edge device in a target network point, the apparatus comprising:
the election module is used for responding to a file downloading instruction issued by a cloud end and initiating election of the leader equipment in the target network point;
the first downloading module is used for downloading a target file from the cloud based on the file downloading instruction if the target file becomes the leader equipment, and issuing a downloading file notification to equipment to be downloaded determined from other edge end equipment in the target network point so that the determined equipment to be downloaded downloads the target file from the leader equipment;
and the second downloading module is used for downloading the target file from the target equipment when receiving a target equipment file downloading notification if the target equipment is a following equipment, determining equipment to be downloaded from edge end equipment which does not download the target file in the target network point, and issuing a file downloading notification to the determined equipment to be downloaded so as to enable the equipment to be downloaded which receives the file downloading notification to download the target file from the following equipment, wherein the target equipment is one edge end equipment which finishes downloading the target file in the target network point.
15. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the file download method according to any of claims 10-12.
16. The electronic device according to claim 15, wherein the electronic device is a digital signage equipped with an information distribution system.
17. A computer-readable storage medium storing computer instructions which, when executed on a computer, cause the computer to perform the steps of the file download method according to any of claims 10-12.
CN202110638615.7A 2021-06-08 2021-06-08 File downloading method, device, system, equipment and storage medium Active CN113382065B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110638615.7A CN113382065B (en) 2021-06-08 2021-06-08 File downloading method, device, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110638615.7A CN113382065B (en) 2021-06-08 2021-06-08 File downloading method, device, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113382065A true CN113382065A (en) 2021-09-10
CN113382065B CN113382065B (en) 2023-04-07

Family

ID=77572742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110638615.7A Active CN113382065B (en) 2021-06-08 2021-06-08 File downloading method, device, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113382065B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002098A (en) * 2022-05-13 2022-09-02 聚投科技(珠海)有限公司 File publishing method based on local area network autonomous discovery and election, computer device and computer readable storage medium
CN115102950A (en) * 2022-06-30 2022-09-23 京东方科技集团股份有限公司 File downloading method, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878473A (en) * 2017-04-20 2017-06-20 腾讯科技(深圳)有限公司 A kind of message treatment method, server cluster and system
CN107483224A (en) * 2017-05-16 2017-12-15 上海博达数据通信有限公司 Wireless routing version upgrading method based on DR election
US20200186588A1 (en) * 2018-12-06 2020-06-11 Beijing Bytedance Network Technology Co., Ltd. File downloading method, apparatus, and non-transitory computer-readable storage medium
CN111835856A (en) * 2020-07-17 2020-10-27 北京百度网讯科技有限公司 File downloading method, device, equipment and storage medium
CN112532754A (en) * 2021-02-08 2021-03-19 浙江学海教育科技有限公司 Method and system for rapidly serving school network files
CN112565319A (en) * 2019-09-25 2021-03-26 中兴通讯股份有限公司 Transmission control method, network management server, base station and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878473A (en) * 2017-04-20 2017-06-20 腾讯科技(深圳)有限公司 A kind of message treatment method, server cluster and system
CN107483224A (en) * 2017-05-16 2017-12-15 上海博达数据通信有限公司 Wireless routing version upgrading method based on DR election
US20200186588A1 (en) * 2018-12-06 2020-06-11 Beijing Bytedance Network Technology Co., Ltd. File downloading method, apparatus, and non-transitory computer-readable storage medium
CN112565319A (en) * 2019-09-25 2021-03-26 中兴通讯股份有限公司 Transmission control method, network management server, base station and storage medium
CN111835856A (en) * 2020-07-17 2020-10-27 北京百度网讯科技有限公司 File downloading method, device, equipment and storage medium
CN112532754A (en) * 2021-02-08 2021-03-19 浙江学海教育科技有限公司 Method and system for rapidly serving school network files

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002098A (en) * 2022-05-13 2022-09-02 聚投科技(珠海)有限公司 File publishing method based on local area network autonomous discovery and election, computer device and computer readable storage medium
CN115102950A (en) * 2022-06-30 2022-09-23 京东方科技集团股份有限公司 File downloading method, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113382065B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
Oliveira et al. VELVET: an adaptive hybrid architecture for very large virtual environments
CN110830564B (en) CDN scheduling method, device, system and computer readable storage medium
CN105847464B (en) IP address management method and DHCP client under a kind of more Dynamic Host Configuration Protocol server network environments
CN113382065B (en) File downloading method, device, system, equipment and storage medium
KR101859235B1 (en) System and method of multi-media conferencing between universal plug and play (upnp) enabled telephony devices and wireless area network (wan) devices
EP3709664B1 (en) Stream pushing method, system and server
CN111163130B (en) Network service system and data transmission method thereof
JP7375203B2 (en) Account access methods and devices, storage media, and electronic devices
CN106210049B (en) Cluster communication method and system based on message queue
CN105847398A (en) Business scheduling method, scheduling server and business server
CN110225146B (en) Intranet and extranet mapping method and device, electronic equipment, medium and video conference system
US11102319B2 (en) Method, system and server for stream-pushing
CN111935306B (en) Node scheduling method and device
CN108924609A (en) Method, electronic equipment, device and the storage medium of transmission of flow media data
CN106411713B (en) State notification method and server
CN107959704B (en) Data processing method and home gateway
CN109218447B (en) Media file distribution method and file distribution platform
EP3998754B1 (en) Data distribution method, storage server and subscription server
Putra et al. Node discovery scheme of DDS for combat management system
CN105991377A (en) Discovery and communication method between universal plug and play (UPnP) devices
CN113595749B (en) Communication method and device for realizing multi-party network node intercommunication based on IRC platform
CN114979097B (en) Message pushing method and device based on MQTT and electronic equipment
US11671515B2 (en) Methods, network node and client device for acquisition and delivery of resources in a communications network
CN113810775B (en) Voice and video connection system and method
CN110891028B (en) Method, device and storage medium for determining load balancing strategy

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