CN109347991B - File distribution method, device, equipment and medium - Google Patents

File distribution method, device, equipment and medium Download PDF

Info

Publication number
CN109347991B
CN109347991B CN201811580831.5A CN201811580831A CN109347991B CN 109347991 B CN109347991 B CN 109347991B CN 201811580831 A CN201811580831 A CN 201811580831A CN 109347991 B CN109347991 B CN 109347991B
Authority
CN
China
Prior art keywords
file
distribution
request
target
nodes
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
CN201811580831.5A
Other languages
Chinese (zh)
Other versions
CN109347991A (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.)
China Mobile Communications Group Co Ltd
China Mobile Group Jiangsu Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Jiangsu 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 China Mobile Communications Group Co Ltd, China Mobile Group Jiangsu Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811580831.5A priority Critical patent/CN109347991B/en
Publication of CN109347991A publication Critical patent/CN109347991A/en
Application granted granted Critical
Publication of CN109347991B publication Critical patent/CN109347991B/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/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

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

Abstract

The embodiment of the invention provides a file distribution method, a file distribution device, equipment and a medium. The method comprises the following steps: receiving a file distribution request from a request terminal; acquiring a performance index of a request end; receiving a request distribution decision for a request to distribute a file; selecting a target node group to which a file distribution request is distributed according to a distribution strategy of the request distribution decision and a performance index of a request end; selecting a plurality of target nodes to which the file distribution request is distributed from the target node group; receiving file distribution requests from a plurality of target nodes; and sending a file downloading command to the target nodes, and distributing the file to the target nodes, so that the request terminal downloads the file from the target nodes, and the file distribution is realized. According to the scheme of the embodiment of the invention, the file can be distributed to the nodes in the shortest time as possible according to the distribution strategy of the request distribution decision and the performance index of the request end, so that the distribution efficiency is improved.

Description

File distribution method, device, equipment and medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a medium for distributing files.
Background
In the prior art, a common file distribution method is as follows:
the resource distribution server obtains operation information aiming at the target file; when the operation information is judged to be the updating information, dividing the target file into file blocks and generating a target seed file corresponding to the target file; sending operation information to a download server meeting a preset distribution condition; the method comprises the steps that a downloading server obtains a target seed file from a distribution server under the condition that the downloading server receives operation information and determines to download a target file; determining a first server based on the target seed file, wherein the first server is the other download servers for determining to download the target file based on the operation information; downloading file blocks of the target file from the distribution server and/or the determined first server; and under the condition that all the file blocks of the target file are downloaded, generating the target file by using all the downloaded file blocks. By the scheme, the consumption of a Central Processing Unit (CPU) of the distribution server can be reduced.
In summary, the prior art adopts some strategies for file distribution management, and achieves certain results in reducing CPU consumption of the distribution server, but the following disadvantages still exist: the target node with the optimal speed and the optimal multimedia resource can not be distributed to the request end, and the distribution efficiency is low.
Disclosure of Invention
Embodiments of the present invention provide a file distribution method, apparatus, device, and medium, which can distribute a file to a node in as short a time as possible according to a distribution policy of a request distribution decision and a performance index of a request end, thereby improving distribution efficiency.
In a first aspect, an embodiment of the present invention provides a file distribution method, including:
receiving a file distribution request from a request terminal;
acquiring a performance index of the request end;
receiving a request distribution decision for the distribution file request;
selecting a target node group to which the file distribution request is distributed according to the distribution strategy of the request distribution decision and the performance index of the request end;
selecting a plurality of target nodes to which the distribution file request is distributed from the target node group;
receiving requests for distributing files from the plurality of target nodes;
and sending a file downloading command to the target nodes, and distributing the file to the target nodes, so that the request terminal downloads the file from the target nodes, and the file distribution is realized.
According to the file distribution method of the present invention, the receiving of a file distribution request from a request terminal includes:
and receiving a file distribution request from the request terminal through a portal interface or a programming interface.
According to the file distribution method of the present invention, the performance index includes at least one of:
processing power, storage power, and presentation power, wherein the presentation power includes resolution.
According to the file distribution method of the present invention, the target node group includes a plurality of target nodes and a plurality of candidate nodes, wherein the plurality of candidate nodes are used as a plurality of target nodes for receiving files from a resource pool when the plurality of target nodes cannot receive the files from the resource pool.
According to the file distribution method of the present invention, the method further comprises:
and receiving the file uploaded from the mobile terminal, and judging whether the file to be uploaded exists in the resource pool or not according to the information summary MD5 code.
According to the file distribution method of the present invention, the receiving a file uploaded from a mobile terminal, and determining whether a file to be uploaded exists in a resource pool according to an information summary MD5 code includes:
when receiving the file uploaded from the mobile terminal, the mobile terminal cuts the file to be uploaded into a target seed file with a preset size based on a preset protocol, and judges whether the target seed file to be received already exists in a resource pool according to the MD5 code of the target seed file to be received;
if the target seed file to be received exists in the resource pool, the target seed file to be received is not uploaded any more, and the mobile terminal is enabled to subscribe the existing target seed file to be received;
and if the target seed file to be received does not exist in the resource pool, uploading the target seed file to be received and enabling the mobile terminal to subscribe the target seed file to be received.
According to the file distribution method of the present invention, the method further comprises:
and when any target seed file is not subscribed by the mobile terminal and the maintaining time exceeds the preset time, releasing the target seed file which is not subscribed by the mobile terminal.
According to the file distribution method of the present invention, the method further comprises:
when the file resource of any target seed file changes, updating the MD5 code of the target seed file with the changed file resource, and notifying all mobile terminals subscribing the target seed file with the changed file resource, so that the mobile terminals select whether to download the target seed file with the changed file resource.
According to the file distribution method of the present invention, the distributing the file to the plurality of target nodes includes:
a plurality of target nodes receiving the file downloading command in the target node group form a working group;
the main nodes in the working group download files from the resource pool, other main nodes in the working group and other main nodes outside the working group;
and downloading the file from the main node in the working group by the common node in the working group.
According to the file distribution method of the present invention, the downloading of the file from the resource pool, the other master nodes in the workgroup, and the other master nodes outside the workgroup by the master node in the workgroup includes:
and downloading files from the resource pool, other main nodes in the working group and other main nodes outside the working group by the main node in the working group in a point-to-point P2P mode.
In a second aspect, an embodiment of the present invention provides a file distribution apparatus, including:
the first receiving module is used for receiving a file distribution request from a request terminal;
the acquisition module is used for acquiring the performance index of the request end;
a second receiving module, configured to receive a request distribution decision for the request for distributing files;
a selecting module, configured to select a target node group to which the file distribution request is distributed according to a distribution policy of the request distribution decision and a performance index of the request end;
a first distribution module, configured to select, from the target node group, a plurality of target nodes to which the distribution file request is distributed;
a third receiving module, configured to receive a file distribution request from the plurality of target nodes;
and the second distribution module is used for sending a file downloading command to the target nodes and distributing the file to the target nodes, so that the request terminal downloads the file from the target nodes and the file distribution is realized.
According to the file distribution apparatus of the present invention, the first receiving module is specifically configured to:
and receiving a file distribution request from the request terminal through a portal interface or a programming interface.
According to the file distribution apparatus of the present invention, the performance index includes at least one of:
processing power, storage power, and presentation power, wherein the presentation power includes resolution.
According to the file distribution device of the present invention, the target node group includes a plurality of target nodes and a plurality of candidate nodes, wherein the plurality of candidate nodes are used as a plurality of target nodes for receiving files from a resource pool when the plurality of target nodes cannot receive the files from the resource pool.
The file distribution apparatus according to the present invention further includes:
and the fourth receiving module is used for receiving the file uploaded from the mobile terminal and judging whether the file to be uploaded exists in the resource pool or not according to the information summary MD5 code.
According to the file distribution apparatus of the present invention, the fourth receiving module is specifically configured to:
when receiving the file uploaded from the mobile terminal, the mobile terminal cuts the file to be uploaded into a target seed file with a preset size based on a preset protocol, and judges whether the target seed file to be received already exists in a resource pool according to the MD5 code of the target seed file to be received;
if the target seed file to be received exists in the resource pool, the target seed file to be received is not uploaded any more, and the mobile terminal is enabled to subscribe the existing target seed file to be received;
and if the target seed file to be received does not exist in the resource pool, uploading the target seed file to be received and enabling the mobile terminal to subscribe the target seed file to be received.
The file distribution apparatus according to the present invention further includes:
and the releasing module is used for releasing the target seed file which is not subscribed by the mobile terminal when any target seed file is not subscribed by the mobile terminal and the maintaining time exceeds the preset time.
The file distribution apparatus according to the present invention further includes:
and the updating module is used for updating the MD5 code of the target seed file with changed file resources and notifying all mobile terminals subscribing the target seed file with changed file resources when the file resources of any target seed file change, so that the mobile terminals select whether to download the target seed file with changed file resources.
According to the file distribution device of the present invention, the second distribution module is specifically configured to:
a plurality of target nodes receiving the file downloading command in the target node group form a working group;
the main nodes in the working group download files from the resource pool, other main nodes in the working group and other main nodes outside the working group;
and downloading the file from the main node in the working group by the common node in the working group.
According to the file distribution device of the present invention, the second distribution module is specifically configured to:
and downloading files from the resource pool, other main nodes in the working group and other main nodes outside the working group by the main node in the working group in a point-to-point P2P mode.
In a third aspect, an embodiment of the present invention provides a file distribution apparatus, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method of the first aspect of the embodiments described above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which computer program instructions are stored, which, when executed by a processor, implement the method of the first aspect in the foregoing embodiments.
The file distribution method, the file distribution device, the file distribution equipment and the file distribution medium can distribute the files to the nodes in the shortest time as possible according to the distribution strategy of the request distribution decision and the performance index of the request end, so that the distribution efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 shows a flowchart of a file distribution method of an embodiment of the present invention;
fig. 2 is a schematic structural view showing a file distribution apparatus of an embodiment of the present invention;
FIG. 3 is a schematic diagram of a system for fast distributed downloading of file resources according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating resource download timing according to an embodiment of the present invention;
FIG. 5 is a timing diagram illustrating resource release at a resource end according to an embodiment of the present invention;
FIG. 6 is a timing diagram illustrating an electronic terminal actively releasing resources according to an embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating a reserved resource distribution timing sequence according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating a logical structure of a network file distribution system according to an embodiment of the present invention;
fig. 9 is a schematic diagram showing a hardware configuration of a file distribution apparatus according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, 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 … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Although some strategies are adopted in the file distribution management in the prior art, certain achievements are achieved in reducing the CPU consumption of the distribution server, but the following major disadvantages still exist:
1) the management and communication protocols between the resource distribution server and the download server are not specified;
2) the minimum resource unit of the resource distribution server is a target seed file, the target file is divided into a plurality of target seed files, but the prior art does not consider the problem of how to cut the target seed files and how to set the size of file blocks, and a specific scheme is not provided;
3) the target files of different versions and even some target seed files of different target files may be identical, so that the waste of resource storage exists, how to avoid the waste and maximally utilize resources is avoided, and the prior art does not consider the waste and does not provide a specific scheme.
Based on the prior art, the embodiment of the invention mainly provides the following technical scheme:
1) firstly, defining a protocol of target file cutting: each file block is fixed in size to a preset size (e.g., 4KB (kilobyte) size), and the target file contains MD5 codes for all target seed files; calculating the MD5 codes of the target seed files through the MD5 codes of all the target seed files;
2) the resource center maintains all target seed file information and uniquely identifies indexes according to MD5 codes;
3) the resource center maintains all file information and uniquely identifies indexes according to MD5 codes;
4) when a client uploads a target file, the target file is cut into a target seed file according to a protocol, when the target seed file is uploaded, whether the file exists in a resource distribution server is judged according to an MD5 code, and if the file exists, the success is immediately returned;
5) when the client updates the local file, the target seed files of the two target files with different versions of the resource distribution server are compared, and the different target seed files are downloaded and updated according to the comparison result.
An embodiment of the present invention may provide a file distribution method, and referring to fig. 1, fig. 1 shows a schematic flow diagram of a file distribution method 100 according to an embodiment of the present invention, where the method includes:
s110, receiving a file distribution request from a request end;
s120, acquiring a performance index of the request end;
s130, receiving a request distribution decision aiming at a file distribution request;
s140, selecting a target node group to which a file distribution request is distributed according to a distribution strategy of the request distribution decision and the performance index of a request end;
s150, selecting a plurality of target nodes to which the file distribution request is distributed from the target node group;
s160, receiving file distribution requests from a plurality of target nodes;
s170, sending a file downloading command to the target nodes, and distributing the file to the target nodes, so that the request terminal downloads the file from the target nodes, and the file distribution is realized.
By utilizing the scheme provided by the invention, the file is distributed to the nodes in the shortest time as possible according to the distribution strategy of the request distribution decision and the performance index of the request end, so that the distribution efficiency is improved.
An embodiment of the present invention may provide a file distribution apparatus, and referring to fig. 2, fig. 2 shows a schematic structural diagram of a file distribution apparatus 200 according to an embodiment of the present invention, where the apparatus includes:
a first receiving module 210, configured to receive a file distribution request from a requesting end;
an obtaining module 220, configured to obtain a performance index of a request end;
a second receiving module 230, configured to receive a request distribution decision for a request to distribute a file;
a selecting module 240, configured to select a target node group to which a file distribution request is distributed according to a distribution policy of the request distribution decision and a performance index of a request end;
a first distribution module 250, configured to select, from the target node group, a plurality of target nodes to which the distribution file request is distributed;
a third receiving module 260, configured to receive a request for distributing files from multiple target nodes;
the second distributing module 270 is configured to send a file downloading command to the multiple target nodes, and distribute the file to the multiple target nodes, so that the requesting end downloads the file from the multiple target nodes, and file distribution is achieved.
By utilizing the scheme provided by the invention, the selection module is utilized to select the nodes to which the files are distributed according to the distribution strategy of the request distribution decision and the performance index of the request end, and the files are distributed to the nodes in the shortest time possible, so that the distribution efficiency is improved.
The following describes, by way of specific examples, alternative specific processes of embodiments of the present invention. It should be noted that the scheme of the present invention does not depend on a specific algorithm, and in practical applications, any known or unknown hardware, software, algorithm, program, or any combination thereof may be used to implement the scheme of the present invention, and the scheme of the present invention is within the protection scope of the present invention as long as the essential idea of the scheme of the present invention is adopted.
One of the objectives of the embodiments of the present invention is to provide a method and a system for fast distributing network files, which can monitor dynamic and static information of nodes in real time, and distribute files to the nodes according to user requirements.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a system for fast distribution and downloading of file resources according to an embodiment of the present invention.
As an example, the system shown in fig. 3 mainly relates to a file resource requester, a provider, and a distribution download control and distribution policy service, etc.
In some embodiments, a network file fast distribution system may include: the following describes each component of the network file fast distribution system in detail, including resource request access, distribution download decision, policy service, file version management, mobile terminal resource demand monitoring, security and resource monitoring, and resource pool.
First, in some embodiments, the resource request access may include a portal interface, a programming interface, and the like.
The portal interface is used for providing a client software downloading address for a user, and after the client software downloaded by the user is installed locally, a series of operations such as uploading of files, reference of uploaded files, addition and deletion of candidate nodes, selection of target nodes, file distribution, checking of distribution progress and the like can be realized; the programming interface is used for carrying out secondary development interface for a user or carrying out operation of finishing the user interface through a code program.
Second, in some embodiments, the distribution download decision is a hub that is responsible for evaluating the client's request and current resource conditions, issuing commands related to file distribution to the resource pool, and providing node publishing and discovery services for file sharing of resource requests.
The distribution downloading decision is the core of the system, and the aim of distributing the files as soon as possible can be achieved through a distribution mode such as the combination of a collection multi-level distribution technology and a file sharing technology.
In addition, the distribution system also comprises a decision service, a safety mechanism unit, a mobile terminal resource demand monitoring and resource monitoring unit and the like.
Among other things, in some embodiments, the security mechanism may include two aspects: access control and communication security; access control is used to protect the system from unauthorized users and communication security is used to secure communications between layers and between entities within a layer.
Thirdly, the file version management is to perform unique identification management on different content versions of all files through the information summary MD5 codes of the files.
The MD5Message Digest Algorithm (MD5Message-Digest Algorithm) is a widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value (hash value) to ensure the integrity of Message transmission.
The mobile terminal resource requirement monitoring refers to the unified management of the access requirements of all the accessed mobile terminal file resources. The resource center dynamically maintains a shared use list of all resource files.
In addition, the resource monitoring comprises collection, release, query and the like of dynamic and static information of the system and the nodes.
The decision service provides policies, as well as rules, for distributing downloads. Including the capabilities of the resource requestor (e.g., processing capabilities, storage capabilities, resolution rendering capabilities, etc.).
Referring to table 1, table 1 shows the terminal capabilities carried by the resource download request.
TABLE 1
Serial number Field(s) Description of the invention
1 filename Request resource name
2 terminalCPU Terminal computing power
3 resolution Exhibiting resolution
4 memo Spare field
The following describes, by way of specific examples, a specific processing flow of the file distribution method according to the embodiment of the present invention with reference to fig. 4, fig. 5, fig. 6, fig. 7, and fig. 8.
FIG. 4 is a schematic diagram of a resource downloading sequence according to an embodiment of the present invention; FIG. 5 is a timing diagram illustrating resource release at a resource end according to an embodiment of the present invention; FIG. 6 is a timing diagram illustrating an electronic terminal actively releasing resources according to an embodiment of the present invention; FIG. 7 is a schematic diagram illustrating a reserved resource distribution timing sequence according to an embodiment of the present invention; fig. 8 is a schematic diagram showing a logical structure of the network file distribution system according to the embodiment of the present invention.
As an example, referring to fig. 4, the file resource requesting step shown in fig. 4 is as follows:
1) the request terminal sends a resource request to the resource management module;
2) the resource management module receives the resource request and calls a distribution decision module interface to inquire whether a request end has the file access authority or not;
3) if the request end does not have the authority, returning an authority error, otherwise, executing 4);
4) the resource management module receives the resource pool address returned by the distribution decision module and forwards the resource pool address to the request terminal, and reports the file access request to the resource monitoring module, and the resource monitoring module receives the notification and then monitors the whole process of the resource access in real time;
5) the request terminal downloads corresponding file resources from the returned resource pool;
6) and the resource pool selects a proper resource node and then returns file resource data to the request terminal.
As an example, referring to fig. 5, after the file resource request is completed, the system automatically starts the release process at regular time, and the specific steps are as follows:
1) after the file resource request is finished, the request terminal sends a notice to the distribution decision module;
2) the distribution decision module sends a resource release request to the resource pool according to the release strategy of the file resource;
3) and after the resource release is finished, the distribution decision module sends a notice to the request terminal.
As an example, referring to fig. 6, in addition to the system automatically releasing resources, in order to release resources in time and improve the utilization efficiency of the system space, the electronic terminal may also actively release unnecessary file resources, which includes the following specific steps:
1) after the file resource access request is finished, requesting a resource pool to send a resource release request;
2) the resource pool finds out the resource node where the resource is located and releases the file resource;
3) and after the resource release is finished, the distribution decision module sends a notice to the request terminal.
As an example, referring to fig. 7, the system further supports a reserved resource downloading function, and the specific steps are as follows:
1) a request terminal sends a resource reservation request to a resource pool, and specifies a file resource ID and access time;
2) selecting proper nodes from the resource pool, and allocating resources in advance;
3) the request end automatically downloads the required file resources within the designated time.
As an example, referring to fig. 8, the system architecture shown in fig. 8 includes the following parts:
1. interface layer: the layer is the uppermost layer of the system and provides a program calling and developing interface for a portal website system and a third-party system;
2. and (3) a service layer: the business service implementation layer is used for realizing the business logic functions of command issuing, node issuing implementation, request response and the like;
3. a control layer: and the bottom layer basic function implementation layer comprises basic functions of point-to-point P2P file sharing, multi-level distribution and the like.
4. A safety mechanism layer: and carrying out real-time monitoring and processing on the system safety.
5. And a resource monitoring layer: and monitoring and early warning the system resource access process in real time.
In summary, the following describes a file distribution method provided in the embodiments of the present invention with specific embodiments, and the specific steps are as follows:
1) the resource center dynamically maintains the sharing use condition of all resource files: media Access Control (MAC) Address of the mobile terminal subscribing to the file and MD5 code for downloading the file most recently;
2) when the mobile terminal uploads the file, the file resource center can be retrieved according to the MD5 code of the file, if the file exists, the file is not uploaded, the existing file can be subscribed, and if the file does not exist, the newly uploaded file is subscribed after the file is uploaded;
3) the mobile terminal can release the local resources when a certain file is not needed, and cancel subscription of the file from the resource center;
4) if a certain file subscription mobile terminal list is empty and the maintaining time exceeds a certain set value, the resource center can release the resource;
5) the resource center maintains a white list of MD5 codes of all resource files, when the resources of the published updated file change, the MD5 of the file is updated, and all mobile terminals subscribing the file are notified, so that the mobile terminals can download the updated file resources according to the requirements;
6) a user sends a file distribution request to a resource pool through a portal interface or a system programming interface so as to request resources from the resource pool;
7) the system acquires performance indexes from a request end to resources, such as network conditions, processing capacity and/or display capacity and the like, after passing the security authentication;
8) and after a request distribution decision of the request terminal for distributing the file request is analyzed and evaluated according to a distribution strategy and the capability condition of the request terminal, selecting a target node group to which the file distribution request is distributed, and distributing the target node group to the target node group of the resource pool. Wherein the distribution policy includes, for example, sequential distribution and bulk distribution;
9) the resource pool distributes resources to target nodes in a target node group of the resource pool according to the evaluation strategy and the rule of the request distribution decision, so that the request end downloads the file resources from the target nodes;
10) a file distribution request of a request end is distributed to a target node in a target node group with better flow and/or speed, such as a resource pool node A;
11) meanwhile, the resource pool is a candidate node for requesting resource allocation for distributing the file, and when the target node cannot receive the file from the resource pool, the candidate node is used as the target node for receiving the file from the resource pool;
12) a request terminal downloads resources from resource pool nodes distributed by a resource pool;
13) the resource pool node sends a file distribution request to the resource pool;
14) the resource pool sends a 'download file' command to a target node of the file to be sent;
15) target nodes receiving the same download command in the resource pool node group form a working group (for example: workgroup G1 and workgroup S1);
16) the main nodes in the working group download files from the resource pool, other main nodes in the group and other main nodes outside the group in a point-to-point P2P mode;
17) downloading files from the main node in the group by the common nodes in the working group;
18) and the resource pool node feeds back the distribution result to the user.
Wherein, the explanation of each noun in the foregoing steps is as follows:
mobile end MAC address: the network card physical address of the mobile terminal uniquely identifies the mobile terminal;
file MD5 code: calculating a 128-bit hash value according to the binary content of the file by using a password hash function, wherein the 128-bit hash value is used for confirming the uniqueness of the content of the file and is equivalent to the 'fingerprint' of the file;
resource pool: that is, one node (used in an independent manner) is selected from the resource pool node group to form a resource pool as the first level of the multi-level distribution.
The working group: the most common and simplest resource management mode is that each node is respectively listed in different groups according to different categories. The workgroup is thus divided into 3 categories: directory service nodes, host nodes, and regular nodes.
The directory service node: the node is used for generating a main node and a common node, a target node receiving a downloading command is registered to a directory service node in a working group, the directory service node assigns a number to the target node, and the node judges the role of the node (for example, judges whether the node is the main node or the common node) according to the number;
a master node: in the second stage of multi-level distribution, a working group contains a plurality of main nodes, the main nodes split the target file, and the mode of P2P is adopted, so that on one hand, files are downloaded from the resource pool, other main nodes in the group and other main nodes outside the group, on the other hand, the files are uploaded for other nodes, and the serial number of the main node determines which block of files can be downloaded by the main node from outside the working group;
and (3) common nodes: and at the last stage of multi-stage distribution, the common node acquires the resource file from the designated main node in the group. The number of the ordinary node determines from which master node in the group the master node gets the resource file.
In summary, the technical solutions provided in the embodiments of the present invention can perform comprehensive evaluation according to the conditions of the resource request end and the resource pool (e.g., the network, processing capability, resolution, and other display capabilities of the request end and the resource pool), and allocate the download resource pool of the optimal speed and multimedia resources to the request end.
And the resource request terminal automatically downloads the resources according to the replied resource downloading time and the service address and the reservation condition; the uniqueness of the file is confirmed through the MD5 code, so that repeated uploading of the file is avoided, and content changes of different versions of the file are effectively distinguished.
Compared with the prior art, the technical scheme provided by the embodiment of the invention makes up the problem that only the network bandwidth of a network path is considered in the existing resource downloading, the embodiment of the invention not only tests the network bandwidth, but also considers the resolution capability of the terminal supported and shown on the processing capability, distributes the capability of a corresponding request terminal and the network resource after comprehensive evaluation, and simultaneously distributes the downloading according to the reservation of the resource condition.
In addition, the technical scheme provided by the embodiment of the invention can efficiently manage the file identification and version through the uniqueness of the MD5 code of the file content, thereby avoiding the repeated and redundant file uploading.
In addition, the file distribution method of the embodiment of the present invention described in conjunction with fig. 1 may be implemented by a file distribution apparatus. Fig. 9 is a schematic diagram illustrating a hardware structure of a file distribution apparatus according to an embodiment of the present invention.
The file distribution device may comprise a processor 1003 and a memory 1004 storing computer program instructions.
Fig. 9 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing a communication method and a network server according to an embodiment of the present invention. As shown in fig. 9, computing device 1000 includes input device 1001, input interface 1002, processor 1003, memory 1004, output interface 1005, and output device 1006.
The input interface 1002, the processor 1003, the memory 1004, and the output interface 1005 are connected to each other via a bus 1010, and the input device 1001 and the output device 1006 are connected to the bus 1010 via the input interface 1002 and the output interface 1005, respectively, and further connected to other components of the computing device 1000.
Specifically, the input device 1001 receives input information from the outside and transmits the input information to the processor 1003 via the input interface 1002; the processor 1003 processes the input information based on computer-executable instructions stored in the memory 1004 to generate output information, stores the output information temporarily or permanently in the memory 1004, and then transmits the output information to the output device 1006 through the output interface 1005; output device 1006 outputs the output information external to computing device 1000 for use by a user.
The computing device 1000 may perform the steps of the communication method described herein.
Processor 1003 may be one or more Central Processing Units (CPUs). In the case where the processor 1003 is one CPU, the CPU may be a single-core CPU or a multi-core CPU.
The memory 1004 may be, but is not limited to, one or more of Random Access Memory (RAM), Read Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), compact disc read only memory (CD-ROM), a hard disk, and the like. The memory 1004 is used to store program codes.
It is understood that, in the embodiment of the present application, the functions of any one or all of the first receiving module 210 to the second distributing module 270 provided in fig. 2 may be implemented by using the central processor 1003 shown in fig. 9.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When used in whole or in part, can be implemented in a computer program product that includes one or more computer instructions. When loaded or executed on a computer, cause the flow or functions according to embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.)). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
All parts of the specification are described in a progressive mode, the same and similar parts of all embodiments can be referred to each other, and each embodiment is mainly introduced to be different from other embodiments. In particular, as to the apparatus and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple and reference may be made to the description of the method embodiments in relevant places.

Claims (13)

1. A file distribution method, comprising:
receiving a file distribution request from a request terminal;
acquiring a performance index of the request end;
receiving a request distribution decision for the distribution file request;
selecting a target node group to which the file distribution request is distributed according to the distribution strategy of the request distribution decision and the performance index of the request end;
selecting a plurality of target nodes to which the distribution file request is distributed from the target node group;
receiving requests for distributing files from the plurality of target nodes;
and sending a file downloading command to the target nodes, and distributing the file to the target nodes, so that the request terminal downloads the file from the target nodes, and the file distribution is realized.
2. The method of claim 1, wherein receiving a request for distributing files from a requesting end comprises:
and receiving a file distribution request from the request terminal through a portal interface or a programming interface.
3. The method of claim 1, wherein the performance indicators comprise at least one of:
processing power, storage power, and presentation power, wherein the presentation power includes resolution.
4. The method of claim 1, wherein the set of target nodes comprises a plurality of target nodes and a plurality of candidate nodes, wherein the plurality of candidate nodes are configured to act as a plurality of target nodes for receiving files from a resource pool when the plurality of target nodes are unable to receive files from the resource pool.
5. The method of claim 1, further comprising:
and receiving the file uploaded from the mobile terminal, and judging whether the file to be uploaded exists in the resource pool or not according to the information summary MD5 code.
6. The method according to claim 5, wherein the receiving the file uploaded from the mobile terminal and determining whether the file to be uploaded exists in the resource pool according to the information summary MD5 code comprises:
when receiving the file uploaded from the mobile terminal, the mobile terminal cuts the file to be uploaded into a target seed file with a preset size based on a preset protocol, and judges whether the target seed file to be received already exists in a resource pool according to the MD5 code of the target seed file to be received;
if the target seed file to be received exists in the resource pool, the target seed file to be received is not uploaded any more, and the mobile terminal is enabled to subscribe the existing target seed file to be received;
and if the target seed file to be received does not exist in the resource pool, uploading the target seed file to be received and enabling the mobile terminal to subscribe the target seed file to be received.
7. The method of claim 6, further comprising:
and when any target seed file is not subscribed by the mobile terminal and the maintaining time exceeds the preset time, releasing the target seed file which is not subscribed by the mobile terminal.
8. The method of claim 6, further comprising:
when the file resource of any target seed file changes, updating the MD5 code of the target seed file with the changed file resource, and notifying all mobile terminals subscribing the target seed file with the changed file resource, so that the mobile terminals select whether to download the target seed file with the changed file resource.
9. The method of claim 1, wherein distributing the file to the plurality of target nodes comprises:
a plurality of target nodes receiving the file downloading command in the target node group form a working group;
the main nodes in the working group download files from a resource pool, other main nodes in the working group and other main nodes outside the working group;
and downloading the file from the main node in the working group by the common node in the working group.
10. The method of claim 9, wherein downloading files from the resource pool, other master nodes within the workgroup, and other master nodes outside the workgroup by master nodes within the workgroup comprises:
and downloading files from the resource pool, other main nodes in the working group and other main nodes outside the working group by the main node in the working group in a point-to-point P2P mode.
11. A file distribution apparatus comprising:
the first receiving module is used for receiving a file distribution request from a request terminal;
the acquisition module is used for acquiring the performance index of the request end;
a second receiving module, configured to receive a request distribution decision for the request for distributing files;
a selecting module, configured to select a target node group to which the file distribution request is distributed according to a distribution policy of the request distribution decision and a performance index of the request end;
a first distribution module, configured to select, from the target node group, a plurality of target nodes to which the distribution file request is distributed;
a third receiving module, configured to receive a file distribution request from the plurality of target nodes;
and the second distribution module is used for sending a file downloading command to the target nodes and distributing the file to the target nodes, so that the request terminal downloads the file from the target nodes and the file distribution is realized.
12. A file distribution apparatus characterized by comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any of claims 1-10.
13. A computer-readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1-10.
CN201811580831.5A 2018-12-24 2018-12-24 File distribution method, device, equipment and medium Active CN109347991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811580831.5A CN109347991B (en) 2018-12-24 2018-12-24 File distribution method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811580831.5A CN109347991B (en) 2018-12-24 2018-12-24 File distribution method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN109347991A CN109347991A (en) 2019-02-15
CN109347991B true CN109347991B (en) 2021-06-29

Family

ID=65297170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811580831.5A Active CN109347991B (en) 2018-12-24 2018-12-24 File distribution method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN109347991B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112738255A (en) * 2020-12-30 2021-04-30 江西格灵如科科技有限公司 Downloading and distributing processing method, terminal and system for VR resources
CN115834568A (en) * 2022-11-11 2023-03-21 超聚变数字技术有限公司 File downloading method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102368776A (en) * 2011-11-25 2012-03-07 中国科学技术大学 Optimization function module of node list in content distribution/delivery network (CDN)
CN105847382A (en) * 2016-04-20 2016-08-10 乐视控股(北京)有限公司 CDN file distribution method and system
CN108173953A (en) * 2017-12-29 2018-06-15 北京奇虎科技有限公司 A kind of document distribution method and device based on content distributing network CDN
CN108206862A (en) * 2017-12-27 2018-06-26 努比亚技术有限公司 The distribution method and diostribution device of Web content point
CN108337276A (en) * 2017-01-19 2018-07-27 贵州白山云科技有限公司 A kind of document distribution method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101791901B1 (en) * 2016-03-30 2017-10-31 재단법인차세대융합기술연구원 The apparatus and method of smart storage platfoam for efficient storage of big data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102368776A (en) * 2011-11-25 2012-03-07 中国科学技术大学 Optimization function module of node list in content distribution/delivery network (CDN)
CN105847382A (en) * 2016-04-20 2016-08-10 乐视控股(北京)有限公司 CDN file distribution method and system
CN108337276A (en) * 2017-01-19 2018-07-27 贵州白山云科技有限公司 A kind of document distribution method and system
CN108206862A (en) * 2017-12-27 2018-06-26 努比亚技术有限公司 The distribution method and diostribution device of Web content point
CN108173953A (en) * 2017-12-29 2018-06-15 北京奇虎科技有限公司 A kind of document distribution method and device based on content distributing network CDN

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于虚拟代理的大规模流媒体分发技术研究 ";魏楠青;《中国优秀硕士学位论文全文数据库》;20130715;全文 *

Also Published As

Publication number Publication date
CN109347991A (en) 2019-02-15

Similar Documents

Publication Publication Date Title
EP3334123B1 (en) Content distribution method and system
US9052962B2 (en) Distributed storage of data in a cloud storage system
US8126914B2 (en) Selecting a resource manager to satisfy a service request
EP1639502B1 (en) Retrieving a replica of an electronic document in a computer network
US8886690B2 (en) Distributed data storage and access systems
US8954976B2 (en) Data storage in distributed resources of a network based on provisioning attributes
CN107872489A (en) A kind of file section method for uploading, device and cloud storage system
JP2008537816A5 (en)
JP2007538326A (en) Method, system, and program for maintaining a fileset namespace accessible to clients over a network
CN111273863B (en) Cache management
CN109302448B (en) Data processing method and device
US9009196B2 (en) Discovery and client routing to database nodes
CN111708743A (en) File storage management method, file management client and file storage management system
EP2307991A2 (en) Distributed data storage and access systems
CN109347991B (en) File distribution method, device, equipment and medium
US20100161585A1 (en) Asymmetric cluster filesystem
CN117407159A (en) Memory space management method and device, equipment and storage medium
CN112422611A (en) Virtual bucket storage processing method and system based on distributed object storage
US12020081B2 (en) Method to implement multi-tenant/shared redis cluster using envoy
CN111857548B (en) Data reading method, device and system
CN113438331A (en) Short domain name management method, system, electronic device and storage medium
JP2017123040A (en) Server device, distribution file system, distribution file system control method, and program
CN113873052B (en) Domain name resolution method, device and equipment of Kubernetes cluster
CN116846979B (en) Scheduling method and scheduling system for resources in cloud computing environment
CN115914202A (en) File downloading method, file caching method and server

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