A method and system for downloading resources

A resource downloading and resource technology, applied in the field of communication, can solve the problems of unable to perform P2SP accelerated download, unable to query the hash of the full text, etc.

Active Publication Date: 2018-03-27
TENCENT TECH (SHENZHEN) CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The purpose of the embodiments of the present invention is to provide a method for downloading resources, aiming to solve the problem that in the prior art, the full-text hash of the resource file corresponding to the changed download link cannot be queried, so it is impossible to perform P2SP accelerated downloading.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and system for downloading resources
  • A method and system for downloading resources
  • A method and system for downloading resources

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] figure 1 A flowchart showing the implementation of the resource downloading method provided by Embodiment 1 of the present invention is described in detail as follows:

[0037] In S101, a download link URL of a download resource is obtained, and the hash server is inquired whether the full-text hash of the resource file corresponding to the URL is stored.

[0038] In the embodiment of the present invention, if the full-text hash of the resource file corresponding to the URL is stored in the hash server, the P2SP download is performed according to the full-text hash of the resource file corresponding to the URL.

[0039] In S102, if the hash server does not store the full-text hash of the resource file corresponding to the URL, download the header data of the resource file through the source server, and calculate the header hash of the resource file.

[0040] In this embodiment, the header hash of the resource file is calculated according to the header data of the resou...

Embodiment 2

[0045] figure 2 A flow chart showing the implementation of the resource downloading method provided by Embodiment 2 of the present invention is shown, and the method is described in detail as follows:

[0046] In step S201, obtain a download link URL of the download resource, inquire whether the hash server stores the full-text hash of the resource file corresponding to the URL, and if inquire the hash server stores the full-text hash of the resource file corresponding to the URL, Step S202 is executed, and if the hash server does not store the full-text hash of the resource file corresponding to the URL, step S203 is executed.

[0047] In step S202, P2SP download is performed according to the full-text hash of the resource file corresponding to the URL.

[0048] In this embodiment, according to the full-text hash of the resource file corresponding to the header hash, the process of performing P2SP downloading is specifically: according to the full-text hash of the resource ...

Embodiment 3

[0057] image 3 A flow chart showing the implementation of the resource downloading method provided by Embodiment 3 of the present invention is shown, and the method is described in detail as follows:

[0058] In S301, a download link URL of a download resource is obtained, and the hash server is inquired whether the full-text hash of the resource file corresponding to the URL is stored.

[0059] In S302, if the full-text hash of the resource file corresponding to the URL is not stored in the hash server, obtain the length of the resource file, download the header data of the resource file through the source server, and calculate the hash of the resource file. header hash.

[0060] In S303, different download strategies are adopted according to whether the hash server stores the full-text hash of the resource file corresponding to the header hash and the resource file length.

[0061] In this embodiment, for different resource files, there may be the same header file. At thi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention is applicable to the field of communication technology, and provides a method and system for downloading resources. The method includes: obtaining a download link URL of a download resource, and querying whether the hash server stores the full-text hash of the resource file corresponding to the URL; if Querying that the hash server does not store the full-text hash of the resource file corresponding to the URL, download the header data of the resource file through the source server, and calculate the header hash of the resource file; according to whether the hash server stores Different download strategies are adopted for the full-text hash of the resource file corresponding to the header hash. The present invention realizes that for the same download resource, no matter how the download link changes, the full-text hash of the resource file can be found according to the header of the file, which can effectively ensure that the user can perform P2SP accelerated downloading.

Description

technical field [0001] The invention belongs to the technical field of communication, and in particular relates to a resource downloading method and system. Background technique [0002] At present, peer-to-server and peer (Peer to Server & Peer, P2SP) downloading methods have become the mainstream way for users to download resources. In P2SP downloading, a network node user (Peer) needs to download a download link, that is, a uniform resource locator (Uniform Resource Locator, URL) corresponding resource file, you can download the required resource file peer-to-peer (Peer to Peer, P2P) from other network node users (Peer), and you can also query other resource files of the resource file Download link URL, and perform peer-to-peer (P2S) accelerated downloading of required resources from other servers. In the above process of P2SP downloading resources, the full-text Hash of the resource file is used as the unique identifier of the resource to realize fast downloading of the...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/08
CPCG06F11/00H04L67/108H04L65/40H04L67/10
Inventor 庞勇强
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products