Title of Invention

NETWORK COMMUNICATION SYSTEM AND METHOD FOR FILE DOWNLOADING

Abstract A network communication system and a method for file downloading are disclosed. The network communication system includes: a Peer to Peer (P2P) server, a file server, a TPT server and a plurality of clients; one of the plurality of clients downloads a TPT file corresponding to a file faro the TPT server over the communication network, querying seed information corresponding to the file faro the P2P server, and download the file from other clients and/or the file server as the seed in the communication network according to the TPT file. By use of the network communication system and method in accordance with the present invention, the downloading speed of the clients in the communication network is not restricted by the server processing capability and the network bandwidth bottleneck; though there are many clients accessing a server simultaneously, the speed for a user downloading files is not reduced.
Full Text Network Communication System and Method for File
Downloading
Field of the Invention
The present invention relates to network communication technologies, and more particularly, to a network communication system and method for file downloading.
Background of the Invention
Along with the development of the communication network, more and more useful information can be acquired by a user from the communication network. File downloading is one of the primary modes for a user to acquire information from the communication network. A client of the communication network can download data from a server through maniple communication protocols such as File Transfer Protocol (FTP) or HyperText Transfer Protocol (HTTP), the operating principle of which is as shown in Figure 1, With reference to Figure 1, in the communication network, a client such as client A, client B, ... , or client F may communicate with a server through the communication protocol such as FTP or HTTP to download data from the server. In this way, data can be shared in the communication network, and system resources can be greatly saved.
The above method for a client downloading data from a server may satisfy the downloading requirement of each of clients effectively in the case that the number of the clients accessing the server simultaneously is small. However, when the number of the clients accessing the server simultaneously exceeds a threshold, the limitations of the hardware processing capability of the server and the network bandwidth will induce the downloading speed of the clients low. When a user is provided with online multimedia services in the communication network, such as listening online music or watching online video programs; the slowdown of the download speed will directly decrease the Quality of Service (QoS) of online multimedia services.
Summary of the Invention
The present invention provides a network communication system and method for file

downloading, so that the downloading speed of clients in the communication network is not restricted by the server processing capability and the network bandwidth bottleneck. In this way, though there are a larger number of clients accessing a server simultaneously, the speed for the clients downloading files is not reduced.
The present invention provides a method for file downloading, so that a user can enjoy online multimedia services, such as online music playing or online video program playing, which greatly meets the requirements of a user for the Quality of Service (QoS) of online multimedia services.
The network communication system according to an embodiment of the present invention for file downloading includes: a Peer to Peer (P2P) server, a file server, a TPT server and a plurality of clients; wherein the plurality of the clients are connected to the P2P server, the file server and the TPT server over a network communication network; and the plurality of the clients are connected to each other over the network communication network;
the P2P server is adapted to publish files for downloading, handle login and logout operations of the plurality of the clients over the communication network, and send seed information corresponding to a file and download configuration parameters to a client of the plurality of the clients when the client downloading the file;
the file server is adapted to store the files for downloading;
the TPT server is adapted to store TPT files corresponding to the files for downloading;
the client is adapted to download a TPT file corresponding to the file from the TPT server over the communication network, query other clients which have downloaded the file in the communication network and configuration parameters from the P2P server, and to download the file from the other clients which have downloaded the file and/or the file server according to the TPT file and the download configuration parameters.
The method according to the present invention for file downloading includes: -
after selecting a file to be downloaded, downloading, by a client, a TPT file corresponding to the file from a TPT server according to the file name of the file to be downloaded; wherein the TPT file includes a file ID of the file;
querying, by the client, the seed information corresponding to the file from a P2P server according to the file ID;
returning, by the P2P server, information of clients in a file grouping list

corresponding to the file ID as the seed information corresponding to the file to the client;
establishing, by the client, connections with the clients according to the information of the clients returned by the P2P server, and exchanging segments of the file from the clients.
As can be seen, the network communication system and method according to the present invention combines the P2P technology with the existing downloading method, so that a client may directly download a file from other clients in the communication network; in this way, the consumption of server and bandwidth are saved; the speed for a client downloading data is improved greatly; and the user's experience is enriched.
In addition, the method according to the present invention may also directly download the segments from a file server while downloading the segments from other clients, which not only guarantees the continuity and order of segments downloaded from the communication network and implements online muhimedia services, but also avoids the problem that the downloading speed is slow in the case that there are a few seeds.
Moreover, the method according to the present invention provides the exact information for the seed management of P2P server by recording the network type or firewall type of all seeds downloading the same file in the file grouping list, and selects optimization seeds for the client according to the type of the client which wants to download the file, so as to further guarantee the downloading speed of the client.
Brief description of the drawings
Figure 1 is a schematic diagram for a client downloading data from a server in the existing network communication system.
Figure 2 is a schematic diagram for a client downloading data from a server in the network communication system in accordance with a preferred embodiment of the present invention.
Figure 3 is a flowchart of the method for file downloading in accordance with a preferred embodiment of the present invention.
Detailed description of the invention
The present invention is further described in detail with reference to the accompanying drawings and embodiments so as to make the technical solution and merits

more apparent.
According to a preferred embodiment of the present invention, P2P technology is combined with the file downloading technology, the method for a client downloading data from a single server is changed to a downloading method for exchanging data between the clients. The scheme can overcome the defect that the number of the client for downloading a same file simultaneously is restricted by the processing bottleneck of the server.
In addition, in this embodiment, a file with large capacity is partitioned into multiple segments. A client can download different segments of the file faro muhiple clients or a server in the communication network to insure the further downloading speed. Because the client requiring to download data can download data from other clients, the more the number of the clients downloading data simultaneously in the communication network is and the more centralized the clients are distributed, the better the effect of the data interaction between the clients is, which may greatly improve the speed for downloading data.
On the basis of the embodiment above, a network communication system is provided by this embodiment. With reference to Figure 2, the network communication system includes a P2P server, a file server, a TPT server and more than one client. The P2P server, TPT server and file server are respectively connected to more than one client over a communication network to implement information interaction between the clients and the P2P server, TPT server and file server; each client in the communication network connects to the other clients over the communication network to implement data interaction between the clients.
The P2P server is mainly adapted to publish files for downloading, and processes a request of a client such as login, logout, downloading, querying seed and heartbeat maintenance over the communication network.
The file server is adapted to store the files for downloading.
The TPT server is adapted to store TPT files corresponding to the files for downloading.
A client of the more than one client downloads a TPT file corresponding to a file to be downloaded from the TPT server over the communication network, and downloads the segments of the file fi'om other clients and/or the file server in the communication network according to the TPT file corresponding to the file.

During file downloading, a client in the communication network may download the TPT file from the TPT server through HTTP, FTP or other communication protocols, and download the segments of the file from the file server, or download the segments of the file from the other clients in the communication network through Transfer Control Protocol (TCP) or User Datagram Protocol (UDP).
In the process for downloading files over the network communication system, the client selects the file to be doAvnloaded from the files published by the P2P server, downloads the TPT file corresponding to the file from the TPT server to acquire the information of the file, such as Filled, the number of the segments and the size of each segment of the file; the client queries information of other online clients who has downloaded the file from the P2P server according to the information of the file, i.e. the client queries seeds from the P2P server; after acquiring the seeds, the client downloads the segments of the file from the seeds; at the same time, in order to guarantee the continuity and order of the segments of the file downloaded, the client may also download the segments from the file server.
The method in accordance with the present invention for file downloading will be described as follows in details with respect to the preferred embodiments. With reference to Figure 3, the method in accordance with the present invention for file downloading is as follows.
Block A: Files for downloading are published at the P2P server, file server and TPT server in advance.
The publication includes the followings.
A TPT file corresponding to each file for downloading is generated and is uploaded to the TPT server.
The file for downloading is uploaded to the file server.
The file for downloading is published on the P2P server, so that a user can perform download query via a client.
The TPT file mainly includes a FilelD, the number and the size of each segment, the checking value of each segment of the file, and the checking value and version number of the TPT file.
The number of the segments and the size of each segment of the file are determined by the size of the file corresponding to the TPT file and the service type practically selected by the user. For example, if the service is online music playing, the size of each

segment is generally 16K bytes and the number of the segments of the file is equal to a value obtained by dividing the size of the file by 16K bytes. If the service is online video playing, the size of each segment is generally 50K bytes and the number of the segments of the file is equal to a value obtained by dividing the size of the file by 50K bytes.
The FilelD is a checking value obtained after checking the file name of the file; the FilelD, the checking value of each segment or the checking value of the TPT file may be calculated with different common checking algorithms, such as a HASH algorithm. For example, in a preferred embodiment of the present invention, the FilelD is a 32-bit integer value obtained by calculating the file name of the file with HASH algorithm.
Block B: After a user selects a file to be downloaded tom the published files through a client, the client downloads a TPT file corresponding to the file from the TPT server according to the file name of the file to be downloaded.
After downloading the TPT file, the client may further parse the TPT file and check the validity of the TPT file downloaded; if the TPT file is correct, proceeds to process C; otherwise, prohibits the user from downloading the file and terminate the procedure.
The checking includes: checking whether the format and the version of the TPT file are right.
The checking may fiirther includes: checking the TPT file by a checking algorithm, such as a HASH algorithm.
Block C: The client logs in a P2P server; the P2P server returns a unique identity number (UIN) to the client.
The UIN is selected in order by the P2P server from a preset value range which is associated with the maximum online user number that can be supported by the P2P server. For example, if a P2P server supports 100 thousands online users at most, the value range
Block D: After acquiring the UIN, the client sends a downloading request to the P2P server according to the file to be downloaded by the user; the downloading request includes the UIN of the client and the FilelD of the file to be downloaded.
Block E: The P2P server checks whether the UIN of the client and the FilelD of the file to be downloaded are right, and checks whether the file is published; if the UIN and FilelD are right and the file has been published, the process proceeds to block F; otherwise, the P2P server notifies the client that it is impossible to download the file, and the process is terminated.

The method for the P2P server checking whether the FilelD of the file to be downloaded is right includes: a 32-bit integer value obtained by calculating the file name of the file to be downloaded with the HASH algorithm is compared with the FilelD; if the 32-bit integer value is equal to the FilelD, the FilelD is right; otherwise, the FilelD is not right.
Block F: The P2P server puts the UIN of the client in a file grouping list corresponding to the file, and returns a download configuration parameter corresponding to the file to the client.
The file grouping list classifies all clients downloading the published files; all clients downloading the same file are associated with this file by the P2P server, and the information of the clients associated with the same file is recorded in the file grouping list corresponding to the file for a client to query. The information of a client includes the address of the client, the network type or firewall type of the network in which the client is located.
The download configuration parameter corresponding to the file mainly includes: the thread number initiated when downloading, the maximum and minimum speed limit of each thread when uploading and downloading, P2P uploading speed limit, P2P downloading speed limit, the maximum number of clients connected, the interval for querying seed information, the P2P downloading speed reached which can slowdown the speed for downloading food the file server, the P2P downloading speed reached which can improve the speed for downloading from the file server the percentage of the P2P uploading speed limit.
The configuration parameters are determined by the configuration file of P2P server which includes default configuration and special configuration. The debauch configuration includes the universal configuration parameters for all files. The special configuration includes special configuration parameters for some special files. If the file has no corresponding special configuration file, the P2P server returns a default configuration parameter to the client; if the file has a corresponding special configuration file, the P2P server returns both a default configuration parameter and a special configuration parameter to the client. It should be noted that, all configuration files of P2P server can be updated dynamically, and the configuration files can be modified or updated when the P2P server is running.
Block G: After receiving the download configuration parameter corresponding to the

file, the client sends the UIN of itself and the FilelD of the file to be downloaded to the P2P server, and queries the information of the other clients who has downloaded the file from the P2P server, i.e. queries seeds fiow the P2P server.
When sending a seed query request, the client may also send the network type or firewall type of the client to request the P2P server to query other clients having the same network type in the same group according to the network type of the client.
Block H: The P2P server returns the information of the other clients in the file grouping list corresponding to the file to the client according to the UIN and FilelD of the client, i.e. returns information of the other seeds to the client.
If the query request of the client includes the network type of the client, the P2P server may further return the information of the client located in the public network without firewall or a network with the same firewall type to the client according to the network type or firewall type of the client, and returns information of some clients with other network types. In this way, the connectivity for the client exchanging data with such seeds is high and the speed for transmitting data is also higher.
Block I: The client attempts to establish connections with the seeds, and queries whether the seeds have the file or the segments needed; if a seed has the file of the segment needed, exchanges data with the seed according to the TPT file and the download configuration parameter to obtain the segments of the file to be downloaded.
In this process, the client exchanges the segments of the file with the seeds through the TCP/UDR
After obtaining a segment, the client may check the segment according to the checking value of each segment parsed fiow the TPT file downloaded in process B; if the value is right, the client accepts the segment; otherwise, the client discards the segment.
In this process, because the segment data obtained the seeds are in a random order, the client needs to recombine the segments in a correct order to form the file to be downloaded, so as to get a complete file.
It can be seen faro the above process that, by using the P2P technology, the problem caused by the bottleneck of server can be solved effectively. At the same time, all online clients will share theirs downloaded files with other clients in the communication network, there are enough seeds in the communication network in general; the more the number of clients downloading the same file is and the more centralized the clients are distributed, the better the effect of the data interaction between the client will be; in this way, a server

may support the simultaneous downloading by a great number of users to guarantee the downloading speed of all users.
In addition, network type or firewall type of the seeds which has downloaded the same file is recorded in the file grouping list. The P2P server can manage the seeds according to the network type or firewall type of the seeds. The P2P server can select an optimization seed for the client according to the type of the client which wants to download the file currently, and the downloading speed of the client is further guaranteed.
However, because the segment obtained by the above method is in a random order, it is only possible to acquire a correct and complete file after the client downloads all segments of the file, which can be accepted by common file downloading services but brings a large delay for online multimedia services such as online music playing or online video program playing, thereby reducing playing effect.
In a preferred embodiment of the present invention, in order to guarantee the continuity and the order of segments downloaded by a client, the client may download the segments from a file server through HTTP or FTP downloading modes according to the download configuration parameter returned by the P2P server while exchanging segments with the seeds, and guarantee the continuity and the order of the segments downloaded by the client by using certain algorithm and communication mechanism.
For example, in the process for online music playing, for the music file which is being played, if the music file has not been downloaded completely, the client will acquire the segments of the music file which are needed for playing the music from a file server by using HTTP protocol first; at the same time, for the files or segments of the music which are not being played, it may still download by using the P2P downloading method.
The above downloading method not only improves the downloading speed and reduces the burden of file server, but also guarantee the continuity and order of the file downloaded.
The percent for a client downloading segments from a file server is controlled by the download configuration parameter returned by the P2P server and may be adjusted dynamically according to the practical condition, which may guarantee that most of segments are obtained by interacting with other clients in most cases, thereby saving a great deal of bandwidth resources of the file server.
The method in accordance with the preferred embodiment may support a large

number of users with online multimedia services simultaneously to satisfy the QoS requirement of users for online muhimedia services. For example, the online multimedia service may be online music playing service or online video program playing service.
In the method of the present invention, to maintain the connection between a client and the P2P server, the client will send heartbeat signals to the P2P server periodically after logging in the P2P server; at the same time, the P2P server also detects the heartbeat signals from all login clients periodically. If the P2P server does not receive a heartbeat signal from a client within a certain period, the P2P server kicks the client out, releases the resource allocated to the client, and deletes the information of the client from the file grouping list.
In addition, after an online multimedia service is terminated, for example an online music playing service or an online video program playing is terminated, the client sends a Logout request to the P2P server and logs out from the P2P server actively. After receiving the Logout request of the client, the P2P server releases the resource allocated to the client, and deletes the information of the client from the file grouping list.














We claim:
1. A network communication system for file downloading, comprising: a Peer to Peer
(P2P) server; a file server; a TPT server and a plurality of clients; wherein the plurality of
the clients are connected to the P2P server, the file server and the TPT server over a
network communication network; and the plurality of the clients are connected to each
other over the network communication network;
The P2P server is adapted to publish files for downloading, handle login and logout operations of the plurality of clients over the communication network, and send seed information corresponding to a file and download configuration parameters to a client of the plurality of the clients when the client downloading the file;
the file server is adapted to store the files for downloading;
the TPT server is adapted to store TPT files corresponding to the files for downloading;
the client is adapted to download a TPT file corresponding to the file the TPT server over the communication network, query other clients which have downloaded the file m the communication network and configuration parameters from the P2P server, and to download the file foot the other clients which have dovmloaded the file and/or the file server according to the TPT file and the download configuration parameters.
2. The network communication system of claim 1, wherein the client of the plurality of the clients downloads the TPT file corresponding to the file fiow the TPT server through a Hypertext Transfer Protocol (HTTP) or a File Transfer Protocol (FTP).
3. The network communication system of claim 1 or 2, wherein the client of the plurality of the clients downloads the file fiow the other clients who have downloaded the file in the communication network through a Transfer Control Protocol (TCP) or a User Datagram Protocol (UDP) or downloads the file fiow the file server through a HyperText Transfer Protocol (HTTP) or a File Transfer Protocol (FTP).
4. A method for file downloading, comprising:
after selecting a file to be downloaded, dovmloading, by a client, a TPT file corresponding to the file food a TPT server according to the file name of the file to be downloaded; wherein the TPT file includes a file ID of the file;
querying, by the client, seed information corresponding to the file faro a Peer to

Peer (P2P) server according to the file ID;
receiving, by the client faro the P2P server, information of clients in a file grouping list corresponding to the file ID as the seed information corresponding to the file;
establishing, by the client, connections with the clients according to the information of the clients returned by the P2P server, and exchanging segments of the file from the clients.
5. The method of claim 4, further comprising:
before selecting a file to be downloaded,
generating a TPT file corresponding to each of the files for downloading, and uploading the TPT files to the TPT server;
uploading the files for downloading to a file server;
publishing the files for downloading on the P2P server for the client to query and select.
6. The method of claim 4, further comprising:
before querying the seed information corresponding to the file,
logging in the P2P server, by the client, and acquiring a unique identity number of the client;
recording, by the P2P server, the client in the file grouping list corresponding to the file ID according to the unique identity number.
7. The method of claim 4, wherein the TPT file further comprises: the number, size
and checking value of each segment of the file, and the checking value and version
number of the TPT file;
the method further comprises:
after the client downloading the TPT file, querying, by the client, the seed information corresponding to the file, if the client checks that the format and version of the TPT file are right;
after exchanging segments fiow other clients in the communication network, accepting the segment by the client, if the client checks that the checking value of the segment is right.
8. The method of claim 7, wherein the client checks the checking value of the
segment by using HASH algorithm.

9. The method of claim 4, further comprising:
after the client querying the seed information corresponding to the file from the P2P server,
returning, by the P2P server, the seed information corresponding to the file, if the P2P server checks that the unique identity number of the client and the file ID of the file to be downloaded are right and the file is published.
10. The method of claim 9, wherein the P2P server checks the file ID of the file to be downloaded by comparing the file ID with 32-bit integer value obtained by calculating the file name of the file to be downloaded with HASH algorithm; if the file ID is the same to the integer value, the file ID is right.
11. The method of claim 4, further comprising:
sending, by the client, a network type or firewall type of the client to the P2P server, when querying the seed information corresponding to the file from the P2P server;
when returning the seed information correspond to the file, sending to the client, by the P2P server, information of the clients in the file grouping list which have the same network type or the same firewall type as the client according to the network type or the firewall type of the client.
12. The method of claim 4, further comprising:
returning, by the P2P server, download configuration parameters corresponding to the file to the client when returning the seed information corresponding to the file to the client;
the exchanging the segments of the file comprises:
exchanging, by the client, the segments of the file fiow the clients according to the download configuration parameters returned by the P2P server.
13. The method of claim 12, wherein the download configuration parameters are
determined by a configuration file of the P2P server, and the download configuration
parameters comprises:
a thread number initiated on downloading, the maximum and minimum speed limit of each thread on uploading and downloading, P2P uploading speed limit, P2P downloading speed limit, the maximum number of clients to be connected, the interval for querying seed information, the P2P downloading speed reached which can slowdown the speed for downloading from the file server, the P2P downloading speed reached

which can improve the speed for downloading from the file server and the percentage of the P2P uploading speed limit.
14. The method of claim 4, further comprising:
recombining, by the client, the segments to form the file to be downloaded according to an order in response to acquiring all segments by exchanging from the clients.
15. The method of claim 13, further comprising:
downloading, by the client, the segments from the file server when exchanging the segments with the clients.
16. The method of claim 4, further comprising:
after logging in a P2P server, sending, by the client, heartbeat signals to the P2P server periodically;
detecting, by the P2P server, the heartbeat signals from the client periodically; if receiving no heartbeat signal within a period, kicking the client out, releasing the resource allocated to the client, and deleting the information of the client from the file grouping list.
17. The method of claim 4 or 6, further comprising:
after receiving a logout request from the client, releasing, by the P2P server, the resource allocated to the client, and deleting the information of the client from the file grouping list.
18. A client for file downloading, comprising:
a unit adapted to select a file to be downloaded,
a unit adapted to download a TPT file corresponding to the file from a TPT server according to the file name of the file to be downloaded; wherein the TPT file includes a file ID of the file;
a unit adapted to query seed information corresponding to the file from a P2P server according to the file ID;
a unit adapted to receive from the P2P server information of clients in a file grouping list corresponding to the file ID as the seed information corresponding to the file;
a unit adapted to establish connections with the clients according to the information of the clients returned by the P2P server, and
a unit adapted to exchange segments of the file from the clients.

19. A Peer to Peer (P2P) server for file downloading, comprising:
a unit adapted to publish files for downloading,
a unit adapted to handle login and logout operations of the plurality of clients over the communication network, and
a unit adapted to send seed information corresponding to a file and download configuration parameters to a client of the plurality of the clients when the client downloading the file.

Documents:

750-CHENP-2008 AMENDED CLAIMS 13-09-2012.pdf

750-CHENP-2008 AMENDED PAGES OF SPECIFICATION 13-09-2012.pdf

750-CHENP-2008 EXAMINATION REPORT REPLY RECEIVED 13-09-2012.pdf

750-CHENP-2008 FORM-13 13-09-2012.pdf

750-CHENP-2008 FORM-3 13-09-2012.pdf

750-CHENP-2008 POWER OF ATTORNEY 13-09-2012.pdf

750-CHENP-2008 CORRESPONDENCE OTHERS 16-04-2012.pdf

750-CHENP-2008 CORRESPONDENCE OTHERS 22-03-2013.pdf

750-chenp-2008-abstract.pdf

750-chenp-2008-claims.pdf

750-chenp-2008-correspondnece-others.pdf

750-chenp-2008-description(complete).pdf

750-chenp-2008-drawings.pdf

750-chenp-2008-form 1.pdf

750-chenp-2008-form 18.pdf

750-chenp-2008-form 3.pdf

750-chenp-2008-form 5.pdf


Patent Number 255881
Indian Patent Application Number 750/CHENP/2008
PG Journal Number 13/2013
Publication Date 29-Mar-2013
Grant Date 27-Mar-2013
Date of Filing 13-Feb-2008
Name of Patentee TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Applicant Address 4/F, FAST 2 BLOCK, SEG PARK, ZHENXING ROAD, FUTIAN DISTRICT, SHENZHEN, GUANGDONG 518044.
Inventors:
# Inventor's Name Inventor's Address
1 ZHU, YE 4/F, FAST 2 BLOCK, SEG PARK, ZHENXING ROAD, FUTIAN DISTRICT, SHENZHEN, GUANGDONG 518044.
2 WU, HAIJUN 4/F, FAST 2 BLOCK, SEG PARK, ZHENXING ROAD, FUTIAN DISTRICT, SHENZHEN, GUANGDONG 518044.
3 FANG, BIN 4/F, FAST 2 BLOCK, SEG PARK, ZHENXING ROAD, FUTIAN DISTRICT, SHENZHEN, GUANGDONG 518044.
4 SONG, YANG 4/F, FAST 2 BLOCK, SEG PARK, ZHENXING ROAD, FUTIAN DISTRICT, SHENZHEN, GUANGDONG 518044.
PCT International Classification Number H04L29/06
PCT International Application Number PCT/CN06/02226
PCT International Filing date 2006-08-30
PCT Conventions:
# PCT Application Number Date of Convention Priority Country
1 200510095833.1 2005-09-02 China