Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

File downloading method based on P2P network, electronic device and storage medium

A P2P network and file download technology, applied to electronic equipment and storage media, in the field of file download based on P2P network, can solve the problems of many file fragments and high IO, and achieve less file fragments, good continuity, and easy verification. Effect

Inactive Publication Date: 2018-09-07
SHENZHEN ONETHING TECH CO LTD
View PDF8 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to overcome the deficiencies in the prior art, one of the purposes of the present invention is to provide a file download method based on the P2P network, which can solve the high IO situation caused by the random scheduling of the existing P2P file download method and write the disk out of order, and the file The problem of high fragmentation
[0005] The second object of the present invention is to provide electronic equipment, which can solve the high IO situation caused by the random scheduling of the existing P2P file download method and the disorderly writing of the disk, and the problem of more file fragments
[0006] The third object of the present invention is to provide a storage medium that stores computer programs, which can solve the high IO situation caused by random scheduling and random writing of disks in the existing P2P file download method, and the problem of more file fragments

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
  • File downloading method based on P2P network, electronic device and storage medium
  • File downloading method based on P2P network, electronic device and storage medium
  • File downloading method based on P2P network, electronic device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] Such as figure 1 The method for downloading files based on the P2P network includes the following steps:

[0047] Step S110, creating a scheduling window according to the task information of the file to be downloaded.

[0048] The file to be downloaded may be a file provided by other nodes in the P2P network, or a file backed up by the node on other nodes in the P2P network. The task information of the file to be downloaded may include the file name of the file to be downloaded, the size of the file, the address of the Tracker server, the segment check code SHA1 for verifying the integrity and correctness of the data, and the like.

[0049] In another embodiment, no Tracker server is needed in the P2P network, and the addressing of files in the DHT network can be realized through the existing distributed hash table (Distributed Hash Table, DHT) technology.

[0050] Step S120, dividing the scheduling window into multiple segments.

[0051] For example, if the length o...

Embodiment 2

[0069] Such as Figure 4 The shown file download method based on the P2P network comprises the following steps:

[0070] Step S210, creating a scheduling window according to the task information of the file to be downloaded.

[0071] As a preferred implementation manner, scheduling windows of different lengths can be created according to the size of the files to be downloaded.

[0072] Because in the downloading process, some data in the scheduling window, such as one or more bytes, or the content of several M cannot be downloaded in time or the downloaded data is always wrong. In the file download method based on the P2P network, each data is requested to be downloaded from the peer nodes in the network respectively. Therefore, as a preferred embodiment, the larger the file to be downloaded, the smaller the scheduling window can be created. At this time, there is less data in the scheduling window, so the same data can be requested from more peer nodes, and the probability ...

Embodiment 3

[0096] Such as Figure 5 The electronic device shown includes a memory 300, a processor 400, and a program stored in the memory 300. The program is configured to be executed by the processor 400. When the processor 400 executes the program, the above-mentioned file download method based on the P2P network is realized. A step of.

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 invention discloses a file downloading method based on a P2P network, an electronic device and a storage medium, wherein the method comprises the steps of: creating a scheduling window according to task information of a file to be downloaded; dividing the scheduling window into multiple segments; sending the data requests of various segments; writing received data into the corresponding segments; and, if N continuous segments at one side of the head part of the scheduling window are written with data, sliding the head part of the scheduling window to the tail part of the N segments, wherein N is a natural number satisfying the sliding condition. The scheduling window is created; segment data in the scheduling window is downloaded at first; when the multiple continuous segments at one side of the head part of the scheduling window are written with data, the scheduling window is slid, so that downloaded data has better continuity; when the downloaded data is written in a magnetic disk, a hard disk cannot frequently turn around, forward and suddenly stop; furthermore, the IO in the magnetic disk writing process can be reduced; downloaded file fragments are less; more continuous blocks exist; and thus, the file correctness is conveniently checked.

Description

technical field [0001] The invention relates to P2P file download technology, in particular to a P2P network-based file download method, electronic equipment and a storage medium. Background technique [0002] P2P (Peer-to-peer) network, that is, the peer-to-peer network uses distributed ideas to fully invoke the resources of client nodes in the system to provide services for client nodes distributed in many different regions, and each node obtains data as a client At the same time, it also acts as a server to provide services for other nodes. With data security and large-scale, P2P network is more and more widely used in network backup and download of data. [0003] Existing file downloads based on P2P networks usually use the entire file as a scheduling window to randomly allocate download path request data blocks. However, due to the different transmission speeds of different download paths in the P2P network, the data blocks received by the download node are not contin...

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
IPC IPC(8): H04L29/08
CPCH04L67/06H04L67/108
Inventor 赵干杰
Owner SHENZHEN ONETHING TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products