CN102164157B - Downloading speed limiting method and system - Google Patents

Downloading speed limiting method and system Download PDF

Info

Publication number
CN102164157B
CN102164157B CN201010119147.4A CN201010119147A CN102164157B CN 102164157 B CN102164157 B CN 102164157B CN 201010119147 A CN201010119147 A CN 201010119147A CN 102164157 B CN102164157 B CN 102164157B
Authority
CN
China
Prior art keywords
speed
download
http
downloading
module
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
CN201010119147.4A
Other languages
Chinese (zh)
Other versions
CN102164157A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201010119147.4A priority Critical patent/CN102164157B/en
Publication of CN102164157A publication Critical patent/CN102164157A/en
Application granted granted Critical
Publication of CN102164157B publication Critical patent/CN102164157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a downloading speed limiting system, which comprises a hyper text transfer protocol (HTTP) downloading module, a peer-to-peer (P2P) downloading module, an HTTP downloading speed measurement module, a P2P downloading speed measurement module and a downloading speed limiting management module, wherein the HTTP downloading module and the P2P downloading module are used for executing data downloading under the control of the downloading speed limiting management module; the HTTP downloading speed measurement module is used for monitoring and measuring an HTTP downloading speed in real time, and providing the HTTP downloading speed to the downloading speed limiting management module; the P2P downloading speed measurement module is used for monitoring and measuring a P2P downloading speed in real time, and providing the P2P downloading speed to the downloading speed limiting management module; and the downloading speed limiting management module is used for obtaining an overall downloading speed according to the received HTTP downloading speed and the received P2P downloading speed, judging whether the overall downloading speed exceeds a speed limiting value preset by a user, and preferably limiting the HTTP downloading speed if the overall downloading speed exceeds the speed limiting value. The invention also provides a downloading speed limiting method. By the system and the method, the functions of P2P downloading can be fully developed, and the bandwidth cost of an HTTP server can be saved.

Description

A kind of method and system of downloading speed limiting
Technical field
The present invention relates to point-to-point (P2P, Peer-to-Peer) download technology of the Internet, relate in particular to a kind of method and system of downloading speed limiting.
Background technology
Compare with traditional distributed system, P2P technology has unrivaled advantage, thereby is with a wide range of applications, and the time, on the Internet, various P2P application software emerge in an endless stream, and number of users sharply increases.It is one of main application of current the Internet that P2P downloads, and is also to take the application that server bandwidth is maximum, and the file of downloading also presents increasing trend as game, other application software etc.The P2P download tool of main flow is all to adopt HTML (Hypertext Markup Language) (HTTP at present, HyperText Transfer Protocol) mode that multi-source is downloaded and P2P download combines, if left the support of HTTP loading source, P2P downloads also just cannot bring into play actual effect.Yet at present numerous P2P downloads software in pursuit speed of download simply, thereby causes server bandwidth expense to increase, user bandwidth is occupied full, and even cannot browse web sites.And existing P2P download tool, almost never considered how to save the problem of server bandwidth under the prerequisite that ensures certain speed of download as far as possible.
The system of a kind of downloading speed limiting providing in prior art, as shown in Figure 1, this system is mainly comprised of speed of download measurement module 10, HTTP download module 20 and P2P download module 30, and speed of download restriction completes jointly by speed of download measurement module 10, HTTP download module 20 and P2P download module 30.Wherein, speed of download measurement module 10 is for monitoring in real time current speed of download, and HTTP download module 20 and P2P download module 30 complete respectively the function that data are downloaded.User, pass through to download user interface of software (UI, User Interface) be provided with after the limits value of speed of download, if total speed of download (comprising HTTP speed of download and P2P speed of download) that speed of download measurement module 10 is measured has exceeded the limits value that user arranges, need to notify 30 pairs of speeds of download of HTTP download module 20 and P2P download module to adjust.For HTTP download module 20, it reaches by slowing down the inbound pacing of data the object that reduces HTTP speed of download; For P2P download module 30, it,, by reducing the speed of request msg, reaches the object that slows down speed of download.
This shows, downloading speed limiting scheme of the prior art, although can effectively control speed of download, but the speed of download of preferential restriction HTTP is not considered in the control of its speed of download, thereby easily cause the bandwidth expense of http server to remain in higher level, be unfavorable for saving the bandwidth of http server.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of method and system of downloading speed limiting, to realize the speed of download of preferential restriction HTTP, the bandwidth of saving http server.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of method that the invention provides downloading speed limiting, the method comprises:
Respectively HTTP(Hypertext Transport Protocol) speed of download and point-to-point (P2P) speed of download monitored in real time and measured, and obtaining total speed of download;
When described total speed of download exceeds the speed limit of user preset, preferentially HTTP speed of download is limited.
Describedly when total speed of download exceeds the speed limit of user preset, preferentially HTTP speed of download is limited, is specially:
Judge whether described P2P speed of download is more than or equal to default speed limit, if so, described P2P speed of download is set and equals described speed limit, and described HTTP speed of download is set is zero;
Otherwise, the difference that described HTTP speed of download equals described speed limit and P2P speed of download is set.
Describedly when total speed of download exceeds the speed limit of user preset, preferentially HTTP speed of download is limited, is specially:
When total speed of download exceeds the speed limit of user preset, successively reduce described HTTP speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset.
The method further comprises: if when described HTTP speed of download is reduced to zero, current total speed of download still exceeds the speed limit of user preset, successively reduce described P2P speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset.
The present invention also provides a kind of system of downloading speed limiting, and this system comprises: HTTP download module, P2P download module, HTTP speed of download measurement module, P2P speed of download measurement module and downloading speed limiting administration module, wherein,
Described HTTP download module and P2P download module, under controlling at downloading speed limiting administration module, executing data is downloaded;
Described HTTP speed of download measurement module, for HTTP speed of download is monitored in real time and measured, and offers described downloading speed limiting administration module by measurement gained HTTP speed of download;
Described P2P speed of download measurement module, for P2P speed of download is monitored in real time and measured, and offers described downloading speed limiting administration module by measurement gained P2P speed of download;
Described downloading speed limiting administration module, for obtaining total speed of download according to the HTTP speed of download and the P2P speed of download that receive, and judge that whether described total speed of download exceeds the speed limit of user preset, when judgement exceeds, preferentially limits HTTP speed of download.
Described downloading speed limiting administration module is further used for, when described total speed of download exceeds the speed limit of user preset, judge whether described P2P speed of download is more than or equal to default speed limit, if, described P2P speed of download is set and equals described speed limit, and described HTTP speed of download is set is zero; Otherwise, the difference that described HTTP speed of download equals described speed limit and P2P speed of download is set;
Accordingly, described HTTP download module and P2P download module are further used for, and according to the speed of described downloading speed limiting administration module, executing data are set and download.
Described downloading speed limiting administration module is further used for, and when total speed of download exceeds the speed limit of user preset, successively reduces described HTTP speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset.
Described downloading speed limiting administration module is further used for, in described HTTP speed of download, be reduced to zero, and when current total speed of download still exceeds the speed limit of user preset, successively reduce described P2P speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset.
The method and system of a kind of downloading speed limiting provided by the present invention, monitors in real time and measures HTTP speed of download and P2P speed of download respectively, and obtains total speed of download; When total speed of download exceeds the speed limit of user preset, preferentially HTTP speed of download is limited.By method and apparatus of the present invention, when total speed of download exceeds the speed limit of user preset, preferentially limit HTTP speed of download, thereby can give full play to the effect that P2P downloads, reach the object of saving http server bandwidth cost.
Accompanying drawing explanation
Fig. 1 is the system configuration schematic diagram of downloading speed limiting in prior art;
Fig. 2 is the system configuration schematic diagram of a kind of downloading speed limiting of the present invention;
Fig. 3 is the method flow diagram of a kind of downloading speed limiting of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the technical solution of the present invention is further elaborated.
The invention provides a kind of take save the downloading speed limiting method that http server bandwidth is object, its core concept is: respectively HTTP speed of download and P2P speed of download monitored in real time and measured, and obtaining total speed of download; When total speed of download exceeds the speed limit of user preset, preferentially HTTP speed of download is limited.
Based on above-mentioned thought, the system of a kind of downloading speed limiting provided by the present invention, as shown in Figure 2, this system is comprised of HTTP download module 20, P2P download module 30, HTTP speed of download measurement module 40, P2P speed of download measurement module 50 and downloading speed limiting administration module 60.
Wherein, HTTP download module 20 and P2P download module 30, under the control at downloading speed limiting administration module 60, executing data is downloaded.HTTP download module 20 is responsible for HTTP and is downloaded part, and P2P download module 30 is responsible for P2P and is downloaded part.
HTTP speed of download measurement module 40, for HTTP speed of download is monitored in real time and measured, and offers downloading speed limiting administration module 60 by measurement gained HTTP speed of download.P2P speed of download measurement module 50, for P2P speed of download is monitored in real time and measured, and offers downloading speed limiting administration module 60 by measurement gained P2P speed of download.
Downloading speed limiting administration module 60, for the HTTP speed of download providing according to HTTP speed of download measurement module 40, and the P2P speed of download that P2P speed of download measurement module 50 provides obtains total speed of download, and judge whether total speed of download exceeds the speed limit of user preset, when judgement exceeds, preferentially HTTP speed of download is limited.
What is called preferentially limits HTTP speed of download; can there is multiple implementation; and in the present invention, the strategy of preferential restriction HTTP speed of download is not limited, every various implementations based on preferential this thought of restriction HTTP speed of download all should belong to protection scope of the present invention.
The first implementation provided by the invention is: when total speed of download exceeds the speed limit of user preset, judge whether P2P speed of download is more than or equal to default speed limit, if so, P2P speed of download is set and equals speed limit, and HTTP speed of download is set is zero; Otherwise, the difference that HTTP speed of download equals speed limit and P2P speed of download is set; Accordingly, 30 speed executing datas that arrange according to downloading speed limiting administration module 60 of HTTP download module 20 and P2P download module are downloaded.
The second implementation provided by the invention is: when total speed of download exceeds the speed limit of user preset, successively reduce HTTP speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset; If when HTTP speed of download is reduced to zero, current total speed of download still exceeds the speed limit of user preset, successively reduces P2P speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset.For example: the predetermined speed limit of user is 100KB/S, and regulation HTTP speed of download and P2P speed of download are reduced to 10KB/S at every turn; If measuring HTTP speed of download is 50KB/S, P2P speed of download is 70KB/S, and so total speed of download is 120KB/S, has exceeded 100KB/S, thereby HTTP speed of download need to reduce (reducing 10KB/S) twice at every turn, just can make total speed of download not exceed 100KB/S.Again for example: the predetermined speed limit of user is 100KB/S, and regulation HTTP speed of download and P2P speed of download are reduced to 10KB/S at every turn; If measuring HTTP speed of download is 20KB/S, P2P speed of download is 100KB/S, and so total speed of download is 120KB/S, exceeded 100KB/S, thereby HTTP speed of download need to reduce (reducing 10KB/S) twice at every turn, be reduced to zero, just can make total speed of download not exceed 100KB/S.Again for example: the predetermined speed limit of user is 100KB/S, and regulation HTTP speed of download and P2P speed of download are reduced to 10KB/S at every turn; If measuring HTTP speed of download is 10KB/S, P2P speed of download is 110KB/S, and so total speed of download is 120KB/S, has exceeded 100KB/S, thereby has first reduced HTTP speed of download; When HTTP speed of download is reduced to zero, judge that current total speed of download still exceeds 100KB/S, and then reduce P2P speed of download, be reduced to 100KB/S, just can make total speed of download not exceed 100KB/S.
Compare the first implementation, the second implementation is in the situation that total speed of download exceeds the speed limit of user preset, no longer carry out the operation of any judgement and calculating, directly start tentative reduction HTTP speed of download, and judge while reducing whether current total speed of download still exceeds the speed limit of user preset, until judge that current total speed of download is less than or equal to the speed limit of user preset.That is to say, the first implementation, by judgement and calculating operation, is once adjusted accurately, can reach the speed of download of user's expectation; And the second implementation, the operation of having saved accurate Calculation, adopts tentative adjustment, conventionally need to repeatedly adjust the speed of download that just can reach user's expectation.
Again in conjunction with Fig. 3, the first implementation that the invention described above is provided further elaborates below.As shown in Figure 3, this downloading speed limiting method mainly comprises the following steps:
Step 301, by real-time monitoring and measurement, obtains total speed of download.
40 pairs of HTTP speeds of download of HTTP speed of download measurement module are monitored in real time and measure, and measurement gained HTTP speed of download is offered to downloading speed limiting administration module 60; 50 pairs of P2P speeds of download of P2P speed of download measurement module are monitored in real time and measure, and measurement gained P2P speed of download is also offered to downloading speed limiting administration module 60.Thereby, the HTTP speed of download that downloading speed limiting administration module 60 can provide according to HTTP speed of download measurement module 40, and the P2P speed of download that P2P speed of download measurement module 50 provides obtains total speed of download, i.e. total speed of download=HTTP speed of download+P2P speed of download.
Step 302, judges whether total speed of download is greater than user by downloading the default speed limit of software UI, if so, and execution step 303; Otherwise, return to step 301.
Step 303, obtains HTTP speed of download and P2P speed of download.
Step 304, judges whether P2P speed of download is more than or equal to speed limit, if so, and execution step 305; Otherwise, execution step 307.
Step 305, arranges P2P speed of download and equals speed limit, and P2P download module 30 carries out data download according to the P2P speed of download arranging.
Step 306, it is zero that HTTP speed of download is set, and after executing, returns to step 301.
Step 307, arranges the difference that HTTP speed of download equals speed limit and P2P speed of download, and P2P speed of download remains unchanged, and after executing, returns to step 301.
It should be noted that, HTTP download module 20 is by slowing down the inbound pacing of data, reaches the object that reduces HTTP speed of download; In HTTP downloading process of the present invention, whether the speed of download that HTTP download module 20 only detects current HTTP exceeds the set HTTP speed limit of speed limit administration module 60, controls according to this HTTP speed of download below the HTTP speed limit arranging.P2P download module 30 is by reducing the speed of request msg, reaches the object that reduces P2P speed of download; In P2P downloading process of the present invention, whether the speed of download that P2P download module 30 only detects current P2P exceeds the set P2P speed limit of speed limit administration module 60, controls according to this P2P speed of download below the P2P speed limit arranging.
In sum, by the method and system of downloading speed limiting of the present invention, when total speed of download exceeds the speed limit of user preset, preferential restriction HTTP speed of download, thereby can give full play to the effect that P2P downloads, and reduce the number of times to http server request, reach the object of saving http server bandwidth cost.
The above, be only preferred embodiment of the present invention, is not intended to limit protection scope of the present invention.

Claims (7)

1. a method for downloading speed limiting, is characterized in that, the method comprises:
Respectively HTML (Hypertext Markup Language) HTTP speed of download and point-to-point P2P speed of download monitored in real time and measured, and obtaining total speed of download;
When described total speed of download exceeds the speed limit of user preset:
Judge whether described P2P speed of download is more than or equal to default speed limit, if so, described P2P speed of download is set and equals described speed limit, and described HTTP speed of download is set is zero; Otherwise, the difference that described HTTP speed of download equals described speed limit and P2P speed of download is set;
Or,
Successively reduce described HTTP speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset; If when described HTTP speed of download is reduced to zero, current total speed of download still exceeds the speed limit of user preset, successively reduces described P2P speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset.
2. the method for downloading speed limiting according to claim 1, is characterized in that, by slowing down the inbound pacing of data, reduces HTTP speed of download.
3. the method for downloading speed limiting according to claim 1, is characterized in that, by reducing the speed of request msg, reduces P2P speed of download.
4. a system for downloading speed limiting, is characterized in that, this system comprises: HTTP download module, P2P download module, HTTP speed of download measurement module, P2P speed of download measurement module and downloading speed limiting administration module, wherein,
Described HTTP download module and P2P download module, under controlling at downloading speed limiting administration module, executing data is downloaded;
Described HTTP speed of download measurement module, for HTTP speed of download is monitored in real time and measured, and offers described downloading speed limiting administration module by measurement gained HTTP speed of download;
Described P2P speed of download measurement module, for P2P speed of download is monitored in real time and measured, and offers described downloading speed limiting administration module by measurement gained P2P speed of download;
Described downloading speed limiting administration module, for obtaining total speed of download according to the HTTP speed of download and the P2P speed of download that receive, and judges whether described total speed of download exceeds the speed limit of user preset, when judgement exceeds:
Judge whether described P2P speed of download is more than or equal to default speed limit, if so, described P2P speed of download is set and equals described speed limit, and described HTTP speed of download is set is zero; Otherwise, the difference that described HTTP speed of download equals described speed limit and P2P speed of download is set;
Or, successively reduce described HTTP speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset; In described HTTP speed of download, be reduced to zero, and current total speed of download is while still exceeding the speed limit of user preset, successively reduces described P2P speed of download, until judge that current total speed of download is less than or equal to the speed limit of user preset.
5. the system of downloading speed limiting according to claim 4, is characterized in that,
Described HTTP download module and P2P download module are further used for, and according to the speed of described downloading speed limiting administration module, executing data are set and download.
6. according to the system of downloading speed limiting described in claim 4 or 5, it is characterized in that, described HTTP download module is further used for, and by slowing down the inbound pacing of data, reduces HTTP speed of download.
7. according to the system of downloading speed limiting described in claim 4 or 5, it is characterized in that, described P2P download module is further used for, and by reducing the speed of request msg, reduces P2P speed of download.
CN201010119147.4A 2010-02-24 2010-02-24 Downloading speed limiting method and system Active CN102164157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010119147.4A CN102164157B (en) 2010-02-24 2010-02-24 Downloading speed limiting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010119147.4A CN102164157B (en) 2010-02-24 2010-02-24 Downloading speed limiting method and system

Publications (2)

Publication Number Publication Date
CN102164157A CN102164157A (en) 2011-08-24
CN102164157B true CN102164157B (en) 2014-07-16

Family

ID=44465130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010119147.4A Active CN102164157B (en) 2010-02-24 2010-02-24 Downloading speed limiting method and system

Country Status (1)

Country Link
CN (1) CN102164157B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883372A (en) * 2012-08-21 2013-01-16 中兴通讯股份有限公司 Traffic controlling method and terminal
CN104580305B (en) 2013-10-18 2018-11-06 腾讯科技(深圳)有限公司 Network uploads scheduling and bandwidth detection method, system, client and server
CN104168606A (en) * 2014-07-24 2014-11-26 深圳天珑无线科技有限公司 Network speed control method of mobile terminal
CN105591980B (en) * 2014-10-21 2019-08-13 腾讯科技(深圳)有限公司 A kind of bandwidth consumption management method and device
CN105049167B (en) * 2015-08-26 2018-02-13 宇龙计算机通信科技(深圳)有限公司 A kind of method for controlling carrier aggregation CA downloading rates and base station
CN108989272B (en) * 2017-06-07 2022-05-17 视联动力信息技术股份有限公司 Data processing method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852307A (en) * 2005-10-10 2006-10-25 华为技术有限公司 Data downloading method
CN101179394A (en) * 2006-12-21 2008-05-14 腾讯科技(深圳)有限公司 Method and system to download webpage from website server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9537943B2 (en) * 2006-10-06 2017-01-03 Core Wireless Licensing S.A.R.L. System, method, apparatus, and computer program product for providing a social network diagram in a P2P network device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852307A (en) * 2005-10-10 2006-10-25 华为技术有限公司 Data downloading method
CN101179394A (en) * 2006-12-21 2008-05-14 腾讯科技(深圳)有限公司 Method and system to download webpage from website server

Also Published As

Publication number Publication date
CN102164157A (en) 2011-08-24

Similar Documents

Publication Publication Date Title
CN102164157B (en) Downloading speed limiting method and system
US9755935B2 (en) Method, system and computer storage medium for bandwidth optimization of network application
WO2008135848A3 (en) Network multimedia communication using multiple devices
WO2008082683A3 (en) Methods and apparatus for implementing a pluggable policy module within a session over internet protocol network
WO2009124011A3 (en) Content management
WO2013025586A3 (en) Apparatus and method for performing session validation
CN104057839A (en) Torque compensation method and device
JP2010239193A5 (en)
WO2011116227A3 (en) Customizing content displayed for a user based on user preferences of another user
WO2008012627A3 (en) Method, apparatus and computer program product for continuously providing a license to a network element via a remote connection
WO2012172430A3 (en) Method of and apparatus for providing an indication of data consumption
EP2157553A4 (en) Money processor, money processor system, and control method
CN103457956B (en) HTTP streaming media live broadcasting method and system based on multiple TCP links
WO2011147381A3 (en) Method, system and apparatus for dynamically adjusting link
WO2011019524A3 (en) Systems and methods for providing targeted content to a network user
GB201119133D0 (en) Methods and apparatuses for configuring communications resources
WO2008074244A8 (en) An instant messaging method, system and apparatus
WO2011021867A3 (en) Method of processing epg metadata in network device and network device for controlling the same
WO2008085648A3 (en) Selective guarded memory access on a per-instruction basis
WO2011142615A3 (en) Comment recommendation method using a virtual value index, system for the method, web server and system for providing a web service
CN104320221B (en) The bus transfer rate control method and device of a kind of communication module
EP2840500A3 (en) Information processing terminal and control method
JP2014116801A5 (en) COMMUNICATION DEVICE AND ITS CONTROL METHOD AND PROGRAM
EP2580890A4 (en) Web browsing data retention
WO2004105348A3 (en) System and method in which a provider is selected to service content requested by a client device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant