Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.
Fig. 1 illustrates the computer implemented system topological figure for measuring user's uploading bandwidth of one aspect of the invention, wherein at least comprise two nodes according to system of the present invention, each node comprises at least one computer equipment, and each node at least with there is network between other node and be connected, further, the quantity of the node accessed in system is variable.Wherein, described network includes but not limited to the Internet, wide area network, metropolitan area network, local area network (LAN), wireless network, cable network etc.
Method according to the present invention is realized by the operating system of described node Computer equipment, flush bonding module or processing controller.For for purpose of brevity, the speed of download feedback information from other computer equipments can be received, and obtain the operating system of the current upload speed information of self said computer equipment, flush bonding module or processing controller according to described speed of download feedback information and be referred to as measurement mechanism, and the computer equipment belonging to described measurement mechanism is called the first computer equipment, the first computer equipment place node is called publish resource node; The operating system of corresponding speed of download feedback information, flush bonding module or processing controller can be sent to other computer equipments and be referred to as feedback device, and the computer equipment belonging to described feedback device is called second computer equipment, second computer equipment place node is called resource request node.It should be noted that, described feedback device and described measurement mechanism can be installed in same computer equipment, then this computer equipment place node is simultaneously as publish resource node and resource request node.Or described first computer equipment and described second computer equipment are contained in a node simultaneously, then this node is simultaneously as publish resource node and resource request node.
Wherein, described first computer equipment and second computer equipment include but not limited to: 1) subscriber equipment; 2) network equipment.Described subscriber equipment includes but not limited to computer, smart mobile phone, PDA, IPTV etc.; The described network equipment includes but not limited to the server group that single network server, multiple webserver form.
Fig. 2 illustrates the method flow diagram for measuring user's uploading bandwidth according to one aspect of the invention.Wherein, the method comprising the steps of S11, step S12, step S13, step S21 and step S22.
In step s 11, feedback device obtains total speed of download of the all-network resource downloaded by a publish resource Nodes; Wherein, the mode of the total speed of download of described acquisition includes but not limited to: that 1) downloads that the total flow that obtains and download expend according to described feedback device by described publish resource Nodes obtains total time; 2) flow downloaded by described publish resource Nodes according to feedback device described within the scope of the scheduled time obtains.
In step s 12, feedback device, according to described total speed of download, generates speed of download feedback information; Wherein, described speed of download feedback information comprises total speed of download, and preferably, described speed of download feedback information can also comprise following at least one information: the 1) nodal information of described resource request node; 2) nodal information of described publish resource node; 3) temporal information corresponding to described download feedback information; 4) the downloading flow information corresponding to described download feedback information.
In step s 13, described speed of download feedback information is supplied to described publish resource node by feedback device.Concrete, the network transmission protocol of feedback device belonging to feedback device between resource request node and described publish resource node, is supplied to described publish resource node by described speed of download feedback information.
It should be noted that, described feedback device can obtain the total speed of download corresponding with multiple publish resource node respectively, further, generate multiple speed of download feedback information according to described multiple total speed of download, and described speed of download feedback information is supplied to respectively corresponding publish resource node.
In the step s 21, measurement mechanism obtains the speed of download feedback information from the one or more resource request nodes be associated with publish resource node institute resource uploading belonging to self; Concrete, the network transmission protocol of measurement mechanism belonging to measurement mechanism between publish resource node with the described resource request node be associated, obtains the described speed of download feedback information from resource request node.
In step S22, measurement mechanism, according to described speed of download feedback information, obtains the current upload speed information of described publish resource node.Wherein, described current upload speed information comprises current uploading speed, and preferably, described current upload speed information also comprises following at least one item: the settling time of upload speed information before 1) deserving; 2) for generate deserve before upload speed information speed of download feedback information belonging to resource request node etc.
Concrete, measurement mechanism obtains the total speed of download corresponding with each speed of download feedback information by the speed of download feedback information of described one or more resource request node, the current uploading speed of described publish resource node is determined, to generate current upload speed information according to described current uploading speed according to obtained all total speed of download.
Such as, the total speed of download in obtained all speed of download feedback informations adds up by measurement mechanism, and using the current uploading speed of described accumulated result as described publish resource node, generates the current upload speed information of described publish resource node.
Again such as, for multiple speed of download feedback informations that measurement mechanism obtains, first measurement mechanism adds up the quantity of all speed of download feedback informations; Subsequently, measurement mechanism obtains total speed of download of each speed of download feedback information described, and obtains the speed average except the maximum in described total speed of download and each the total speed of download except minimum value; Then, measurement mechanism, using the long-pending current uploading speed as publish resource node belonging to measurement mechanism of the quantity of described speed average and speed of download feedback information, generates the current upload speed information of described publish resource node.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any according to described speed of download feedback information, obtain the implementation of the current upload speed information of described publish resource node, all should be within the scope of the present invention.
As a preferred embodiment of the present invention, wherein, described step S13 also comprises step S131 and step S132; Described step S21 also comprises step S212 and step S213.
In step S131, described speed of download feedback information adds in the resource related information sending to described publish resource node by feedback device; Wherein, described resource related information comprises following arbitrary information type: 1) resource request information, and such as, feedback device is to the TCP/IP message etc. of publish resource node request downloaded resources; 2) interactive information, such as, for mutual UDP message etc. between feedback device and publish resource node.
In step S132, described resource related information is supplied to described publish resource node by feedback device; Concrete, resource related information is sent to corresponding publish resource node according to the network transmission protocol between described resource request node with described publish resource node by feedback device.
In step S212, measurement mechanism obtains the resource related information from the one or more resource request nodes be associated with described publish resource node institute resource uploading; Concrete, measurement mechanism obtains corresponding resource related information according to the network transmission protocol between described resource request node to described publish resource node.
In step S213, measurement mechanism obtains described speed of download feedback information by the described resource related information from described resource request node; Concrete, according to the information type of described resource related information, described resource related information is resolved accordingly and obtains speed of download feedback information wherein.
As another preferred embodiment of the present invention, wherein, described step S22 also comprises step S221.
In step S221, measurement mechanism, according to described speed of download feedback information and history upload speed information, obtains the current upload speed information of described publish resource node.Wherein, described history upload speed information comprises one or more history uploading speeds of described publish resource node.Preferably, described history upload speed information also comprises following at least one information: the 1) nodal information of publish resource node; 2) corresponding with described one or more history uploading speed temporal information.
Concrete, measurement mechanism obtains total speed of download by described speed of download feedback information, history uploading speed is obtained by described history upload speed information, current uploading speed is determined, to generate current upload speed information according to described current uploading speed according to described total speed of download and described history uploading speed.
Such as, measurement mechanism obtains total speed of download by described speed of download feedback information, history uploading speed is obtained by described history upload speed information, and to all total speed of download summations to obtain summed result, subsequently, measurement mechanism obtains the mean value of described summed result and described history uploading speed, and using described mean value as current uploading speed, generates current upload speed information.
Again such as, measurement mechanism obtains total speed of download by described speed of download feedback information, history uploading speed is obtained by described history upload speed information, subsequently, measurement mechanism obtains speed of download mean value according to the maximum in described total speed of download and minimum value, described speed of download mean value is multiplied by the quantity of speed of download feedback information, as uploading speed to be adjusted, then, measurement mechanism obtains the history average of described history uploading speed, and more described uploading speed to be adjusted and described history average, when the difference of described uploading speed to be adjusted and described history average is less than predetermined threshold, measurement mechanism is using the current uploading speed of described upload speed information to be adjusted as publish resource node belonging to measurement mechanism, generate current upload speed information, when the difference of described uploading speed to be adjusted and described history average is greater than predetermined threshold, measurement mechanism, using the current uploading speed of described history average as publish resource node belonging to measurement mechanism, generates current upload speed information.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any according to described speed of download feedback information and history upload speed information, obtain the implementation of the current upload speed information of described publish resource node, all should be within the scope of the present invention.
As another preferred embodiment of the present invention, wherein, the described method for measuring user's uploading bandwidth also comprises step S23.
In step S23, measurement mechanism, according to described current upload speed information and/or history upload speed information, adjusts the uploading resource speed of publish resource node belonging to measurement mechanism.Wherein, described uploading resource speed belonging to measurement mechanism publish resource node to the uploading speed of each resource request node resource uploading.
Concrete, measurement mechanism obtains current uploading speed by described current upload speed information, obtain one or more history uploading speed by history upload speed information, and adjust the uploading resource speed of described publish resource node according to described current uploading speed and/or described history uploading speed.
Wherein, described adjustment mode includes but not limited to: 1) reduce described uploading resource speed, such as, stops sending resource to part resource requesting node, or, extend the response time sending resource to part resource requesting node; 2) improve described uploading resource speed, such as, according to the resource download request that publish resource node receives, select one or more be in wait state resource request node and to described resource request node resource uploading; 3) described uploading resource speed is not changed.
Such as, measurement mechanism obtains the current uploading speed corresponding with described current upload speed information, and using the threshold value of described current uploading speed as the uploading resource speed of described publish resource node, if uploading resource speed is greater than this threshold value, then measurement mechanism reduces uploading resource speed, is less than threshold value to make it; If uploading resource speed is less than this threshold value, then measurement mechanism does not change uploading resource speed.
Again such as, measurement mechanism, according to described current upload speed information and history upload speed information, obtains current uploading speed and history uploading speed, and obtains the historical average speeds of described history uploading speed; Subsequently, the more described current uploading speed of measurement mechanism and described historical average speeds, if described current uploading speed is greater than described average uploading speed, then with described current uploading speed for first threshold, described average uploading speed is Second Threshold; If described current uploading speed is less than described average upload speed information, then with described average upload speed information for first threshold, described current uploading speed is Second Threshold.When measurement mechanism judges that uploading resource speed is greater than first threshold, measurement mechanism reduces the uploading resource speed of described publish resource node to make uploading resource speed lower than first threshold; When measurement mechanism judges that uploading resource speed is less than Second Threshold, measurement mechanism improves the uploading resource speed of described publish resource node to make uploading resource speed higher than Second Threshold.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any according to described current upload speed information and/or history upload speed information, the implementation of the uploading resource speed of publish resource node belonging to adjustment measurement mechanism, all should be within the scope of the present invention.
According to method of the present invention, can the actual speed to each resource request node resource uploading of Gains resources publisher node comparatively accurately, avoid the situation that the speed of download summation of the uploading speed of publish resource node self and the resource request node caused due to bandwidth restriction is inconsistent, and the data that publish resource node can adjust self according to reality to the speed of resource request node-node transmission data send behavior, to avoid because uploading speed to cause the situation of packet loss higher than bandwidth restriction.
Fig. 3 illustrates the method flow diagram for measuring user's uploading bandwidth in accordance with a preferred embodiment of the present invention.According to the method for the present embodiment, wherein, step S21 also comprises step S211, and the method comprises step S24 and step S25 further.
In step S211, measurement mechanism obtains speed of download feedback information and the node location information of described one or more resource request node; Wherein, the content of described node location information comprises at least with the next item down content: the 1) network address of resource request node, such as, and MAC address, network ip address etc.; 2) geographical area information belonging to resource request node, such as China, the U.S., Japan etc.
In step s 24 which, measurement mechanism, according to described node location information, determines the region belonging to described one or more resource request node respectively; Concrete, measurement mechanism is resolved described node location information, determines described resource request node present position, to obtain the region belonging to resource request node.
In step s 25, measurement mechanism, according to the speed of download feedback information of described one or more resource request node and difference affiliated area thereof, obtains the current upload speed information in region in the relatively each region of described publish resource node.Wherein, the current upload speed information in described region comprises the current uploading speed in region.Preferably, the current upload speed information in described region also comprises following at least one item: the 1) settling time of the current upload speed information in this region; 2) for generate the current upload speed information in this region speed of download feedback information belonging to resource request node etc.
Concrete, measurement mechanism is according to the affiliated area of described one or more resource request node, obtain the speed of download feedback information sent from the resource request node of the same area, and obtain the current upload speed information in region in described region according to the described speed of download feedback information from the same area respectively;
Such as, measurement mechanism determines that according to step S24 the geographical position residing for multiple resource request nodes be associated with described publish resource node institute resource uploading is A, B, C tri-regions, measurement mechanism statistics is from the quantity of the speed of download feedback information of the same area, obtain the maxima and minima in described total speed of download corresponding from the speed of download feedback information of the same area, and obtain the mean value of described maxima and minima, using the long-pending current uploading speed in region as described region of the quantity of described mean value and speed of download feedback information, and carry out the current upload speed information in formation zone according to the current uploading speed in described region.
Or measurement mechanism, according to the affiliated area of described speed of download feedback information and described one or more resource request node, determines the current upload speed information in the region of regional.
Such as, measurement mechanism adds up total speed of download corresponding to all speed of download feedback informations to obtain overall area speed of download, and according to the quantity in region, described overall area speed of download is obtained average area speed of download divided by after the quantity in region, subsequently, measurement mechanism using described average area speed of download as region current uploading speed, and carry out the current upload speed information in formation zone according to the current uploading speed in described region.
Again such as, measurement mechanism determines that according to step S24 the geographical position residing for multiple resource request nodes be associated with described publish resource node institute resource uploading is A, B, C tri-regions.Measurement mechanism is added up all speed of download feedback informations, the total speed of download sum obtaining all speed of download feedback informations corresponding is 300Kbs, and the quantity of speed of download feedback information is altogether 8, the speed of download feedback information 2 that speed of download feedback information 3 corresponding to the speed of download feedback information 3 that wherein a-quadrant is corresponding, B region, C region are corresponding; Then, measurement mechanism quantity ratio of speed of download feedback information according to regional determines the current uploading speed in the region of regional, the current uploading speed in region obtaining a-quadrant is 300*3/ (3+3+2)=112.5kbs, the current uploading speed in region in B region is the current uploading speed in region in 300*3/ (3+3+2)=112.5kbs, C region is 300*2/ (3+3+2)=75kbs; Measurement mechanism, according to the current uploading speed in the region of obtained regional, generates the current upload speed information in region of regional.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any speed of download feedback information according to described one or more resource request node and respectively affiliated area, obtain the implementation of the current upload speed information in region in the relatively each region of described publish resource node, all should be within the scope of the present invention.
As a preferred embodiment of the present invention, wherein, step S25 also comprises step S251.
In step S251, measurement mechanism is according to the speed of download feedback information of described one or more resource request node and difference affiliated area thereof, and in conjunction with the regional historical upload speed information in the relatively each region of described publish resource node, obtain the current upload speed information in region in the relatively each region of described publish resource node; Wherein, described regional historical upload speed information comprises one or more regional historical uploading speed.Preferably, described regional historical upload speed information can also comprise following at least one information: the node location information of 1) corresponding with described one or more regional historical uploading speed one or more resource request nodes; 2) corresponding with described one or more regional historical uploading speed temporal information.
Concrete, measurement mechanism obtains corresponding total speed of download by the speed of download feedback information of described one or more resource request node, and according to the speed of download feedback information of described one or more resource request node respectively affiliated area obtain the regional historical upload speed information in described region, one or more regional historical uploading speed is obtained by described regional historical upload speed information, subsequently, measurement mechanism is according to obtained total speed of download and regional historical uploading speed, obtain the current uploading speed in region corresponding to regional, carry out the current upload speed information in formation zone.
Such as, obtain corresponding total speed of download in the speed of download feedback information that measurement mechanism is sent by one or more resource request node, and the region belonging to described one or more resource request node sues for peace to obtain region summed result according to region to described total speed of download; And the region of measurement mechanism belonging to one or more resource request node, obtain the regional historical upload speed information of regional, obtain multiple regional historical uploading speed by described regional historical upload speed information, and obtain the averaged historical uploading speed of regional according to described multiple regional historical uploading speed; Then, measurement mechanism is to each regional compare region summed result corresponding with described region and zone leveling history uploading speed, when described region summed result is greater than described zone leveling history uploading speed, measure using described summed result as region current uploading speed, carry out the current upload speed information in formation zone; When described summed result is less than described zone leveling history uploading speed, measurement mechanism using described zone leveling history uploading speed as region current uploading speed, carry out the current upload speed information in formation zone;
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any speed of download feedback information according to described one or more resource request node and respectively affiliated area, and in conjunction with the regional historical upload speed information in the relatively each region of described publish resource node, obtain the implementation of the current upload speed information in region in the relatively each region of described publish resource node, all should be within the scope of the present invention.
As a preferred embodiment of the present invention, wherein, method according to the present invention also comprises step S26.
In step S26, measurement mechanism relative to the current upload speed information in the region in each region and/or regional historical upload speed information, adjusts the uploading speed to described each region resource uploading according to described publish resource node.Wherein, described adjustment mode includes but not limited to: 1) reduce the uploading speed to described each region resource uploading, such as, measurement mechanism stops sending resource to the part resource requesting node in described each region, or measurement mechanism extends the response time sending resource to part resource requesting node; 2) uploading speed to described each region resource uploading is improved, such as, the resource download request that measurement mechanism receives according to publish resource node, select one or more be in wait state resource request node and to described resource request node resource uploading; 3) uploading speed to described each region resource uploading is not changed.
Such as, measurement mechanism obtains the region current uploading speed corresponding with regional according to the current upload speed information in described region, regional historical upload speed information according to regional obtains regional historical uploading speed, and regional is obtained to the mean value of the regional historical uploading speed corresponding with described region; Subsequently, measurement mechanism compares the current uploading speed of mean value corresponding to regional and region, and using the threshold value of larger value as the uploading speed to described region resource uploading, when described uploading speed is greater than this threshold value, measurement mechanism reduces described uploading speed; When described uploading speed is less than this threshold value, measurement mechanism does not change the uploading speed to described each region resource uploading.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any according to described publish resource node relative to the current upload speed information in the region in each region and/or regional historical upload speed information, adjust the implementation to the uploading speed of described each region resource uploading, all should be within the scope of the present invention.
According to the method for the present embodiment, according to the speed of download feedback information of the resource request node of zones of different in network, the uploading speed can determining regional according to the speed of download situation of the resource request node of zones of different in network, to reach the object utilizing the network bandwidth more fully, avoid the situation causing the data uploaded to be routed device or gateway abandoning because resource request node exceedes the restriction of this zone bandwidth to the speed of a certain region uploading data.
Fig. 4 illustrates the method flow diagram for measuring user's uploading bandwidth of another preferred embodiment of the present invention.Method according to the present embodiment comprises step S27, step S28 and step S29 further.
In step s 27, when meeting scheduled broadcast trigger condition, the current upload speed information of described publish resource node broadcasted by measurement mechanism in preset range; Wherein, described broadcast trigger condition includes but not limited to: 1) the first scheduled event trigger condition, when measurement mechanism obtains the first scheduled event trigger condition, such as, the broadcast distribution order that user inputs via input equipment is obtained, again such as, detect that subscriber equipment operates described predetermined application, again such as, receive the triggering signal etc. from other equipment, then described current upload speed information broadcasted by measurement mechanism in preset range; 2) the first scheduled time condition, arrives point sometime when measurement mechanism runs, or, when measurement mechanism meets predetermined period running time; Or when measurement mechanism detects that the distance last time interval issuing broadcast message has reached predetermined interval value, described current upload speed information broadcasted by measurement mechanism in preset range.Wherein, described preset range includes but not limited to: 1) physical location scope, and such as, preset the local area network (LAN) of scope belonging to measurement mechanism residing for publish resource node of broadcast distribution, described local area network (LAN) is preset range; 2) user scope, such as, preset the object of multiple nodal information as broadcast distribution, described multiple nodal information is preset range.
In step S28, measurement mechanism obtains other upload speed information from other nodes in the preset range of described publish resource node place; Wherein, other upload speed information described at least comprise and other nodes one or more other uploading speeds one to one.
Concrete, when meeting predetermined acquisition condition, measurement mechanism obtains other upload speed information of other nodes described in preset range; Wherein, described predetermined acquisition condition includes but not limited to: 1) the second scheduled event trigger condition, when measurement mechanism obtains the second scheduled event trigger condition, such as, measurement mechanism detects the signal of obtaining information, again such as, measurement mechanism detects that new resource request node is connected to measurement mechanism, then measurement mechanism obtains other upload speed information described; 2) the second scheduled time condition, point is sometime arrived when measurement mechanism runs, or, when measurement mechanism meets predetermined period running time, or, when measurement mechanism detects that the distance last time interval obtaining other upload speed information has reached predetermined interval, measurement mechanism obtains other upload speed information described.
In step S29, measurement mechanism, according to the current upload speed information of described publish resource node and other upload speed information described, obtains total uploading bandwidth of described preset range.
Concrete, measurement mechanism obtains the current uploading speed of described current upload speed information, and other uploading speeds one or more that other upload speed information described are corresponding, and according to described current uploading speed and described other uploading speeds one or more, obtain total uploading bandwidth of described preset range.
Such as, measurement mechanism obtains the current uploading speed of described current upload speed information, and after every other uploading speed corresponding to all other upload speed information described, using described current uploading speed with all described in the summation of other uploading speeds as total uploading bandwidth of described preset range.
Again such as, measurement mechanism obtains the current uploading speed of described current upload speed information, and after other uploading speeds multiple corresponding to other upload speed information described, first obtain the first mean value of every other uploading speed, then obtain the second mean value of described first mean value and described current uploading speed; Subsequently, the total information quantity of the measurement mechanism described current upload speed information of statistics and other upload speed information described, is multiplied by the total bandwidth of result as described preset range of total information quantity acquisition using described second mean value.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any current upload speed information according to described publish resource node and other upload speed information described, obtain the implementation of total uploading bandwidth of described preset range, all should be within the scope of the present invention.
According to the method for the present embodiment, by the speed of download feedback information of self that resource request nodes all in preset range are broadcasted in described preset range, can obtain the network bandwidth in affiliated preset range more accurately, avoiding cannot the situation of the Measurement accuracy network bandwidth owing to causing owing to there being multiple node to carry out upload and download simultaneously in network.
Fig. 5 illustrates the structural representation of the device for measuring user's uploading bandwidth according to a further aspect of the present invention.Comprise feedback device and measurement mechanism according to the device of the present embodiment, wherein, this feedback device comprises the 3rd acquisition device 11, generating apparatus 12 and generator 13, and this measurement mechanism comprises the first acquisition device 21 and the first determining device 22.
3rd acquisition device 11 obtains total speed of download of the all-network resource downloaded by a publish resource Nodes; Wherein, the mode of the total speed of download of described acquisition includes but not limited to: that 1) downloads that the total flow that obtains and download expend according to described feedback device by described publish resource Nodes obtains total time; 2) flow downloaded by described publish resource Nodes according to feedback device described within the scope of the scheduled time obtains.
Generating apparatus 12, according to described total speed of download, generates speed of download feedback information; Wherein, described speed of download feedback information comprises total speed of download, and preferably, described speed of download feedback information can also comprise following at least one information: the 1) nodal information of described resource request node; 2) nodal information of described publish resource node; 3) temporal information corresponding to described download feedback information; 4) the downloading flow information corresponding to described download feedback information.
Described speed of download feedback information is supplied to described publish resource node by generator 13.Concrete, the network transmission protocol of generator 13 belonging to feedback device between resource request node and described publish resource node, is supplied to described publish resource node by described speed of download feedback information.
It should be noted that, described 3rd acquisition device 11 can obtain the total speed of download corresponding with multiple publish resource node respectively, and, generating apparatus 12 generates multiple speed of download feedback information according to described multiple total speed of download, and by generator 13, described speed of download feedback information is supplied to corresponding publish resource node respectively.
First acquisition device 21 obtains the speed of download feedback information from the one or more resource request nodes be associated with publish resource node institute resource uploading belonging to self; Concrete, the network transmission protocol of the first acquisition device 21 belonging to measurement mechanism between publish resource node with the described resource request node be associated, obtains the described speed of download feedback information from resource request node.
First determining device 22, according to described speed of download feedback information, obtains the current upload speed information of described publish resource node.Wherein, described current upload speed information comprises current uploading speed, and preferably, described current upload speed information also comprises following at least one item: the settling time of upload speed information before 1) deserving; 2) for generate deserve before upload speed information speed of download feedback information belonging to resource request node etc.
Concrete, first determining device 22 obtains the total speed of download corresponding with each speed of download feedback information by the speed of download feedback information of described one or more resource request node, the current uploading speed of described publish resource node is determined, to generate current upload speed information according to described current uploading speed according to obtained all total speed of download.
Such as, total speed of download in obtained all speed of download feedback informations adds up by the first determining device 22, and using the current uploading speed of described accumulated result as described publish resource node, generate the current upload speed information of described publish resource node.
Again such as, for multiple speed of download feedback informations that the first acquisition device 21 obtains, first the first determining device 22 adds up the quantity of all speed of download feedback informations; Subsequently, the first determining device 22 obtains total speed of download of each speed of download feedback information described, and obtains the speed average except the maximum in described total speed of download and each the total speed of download except minimum value; Then, the first determining device 22, using the long-pending current uploading speed as publish resource node belonging to measurement mechanism of the quantity of described speed average and speed of download feedback information, generates the current upload speed information of described publish resource node.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any according to described speed of download feedback information, obtain the implementation of the current upload speed information of described publish resource node, all should be within the scope of the present invention.
As a preferred embodiment of the present invention, wherein, described generator 13 also comprises adding set (not shown) and sub-generator (not shown); Described first acquisition device 21 also comprises the second sub-acquisition device (not shown) and the 3rd sub-acquisition device (not shown).
Described speed of download feedback information adds in the resource related information sending to described publish resource node by adding set; Wherein, described resource related information comprises following arbitrary information type: 1) resource request information, and such as, feedback device is to the TCP/IP message etc. of publish resource node request downloaded resources; 2) interactive information, such as, for mutual UDP message etc. between feedback device and publish resource node.
Described resource related information is supplied to described publish resource node by sub-generator; Concrete, resource related information is sent to corresponding publish resource node according to the network transmission protocol between described resource request node with described publish resource node by sub-generator.
Second sub-acquisition device obtains the resource related information from the one or more resource request nodes be associated with described publish resource node institute resource uploading; Concrete, the second sub-acquisition device obtains corresponding resource related information according to the network transmission protocol between described resource request node to described publish resource node.
3rd sub-acquisition device obtains described speed of download feedback information by the described resource related information from described resource request node; Concrete, the 3rd sub-acquisition device, according to the information type of described resource related information, is resolved accordingly described resource related information and obtains speed of download feedback information wherein.
As another preferred embodiment of the present invention, wherein, described first determining device 22 also comprises the first sub-determining device (not shown).
First sub-determining device, according to described speed of download feedback information and history upload speed information, obtains the current upload speed information of described publish resource node.Wherein, described history upload speed information comprises one or more history uploading speeds of described publish resource node.Preferably, described history upload speed information also comprises following at least one information: the 1) nodal information of publish resource node; 2) corresponding with described one or more history uploading speed temporal information.
Concrete, first sub-determining device obtains total speed of download by described speed of download feedback information, history uploading speed is obtained by described history upload speed information, current uploading speed is determined, to generate current upload speed information according to described current uploading speed according to described total speed of download and described history uploading speed.
Such as, first sub-determining device obtains total speed of download by described speed of download feedback information, history uploading speed is obtained by described history upload speed information, and to all total speed of download summations to obtain summed result, subsequently, first sub-determining device obtains the mean value of described summed result and described history uploading speed, and using described mean value as current uploading speed, generates current upload speed information.
Again such as, first sub-determining device obtains total speed of download by described speed of download feedback information, history uploading speed is obtained by described history upload speed information, subsequently, first sub-determining device obtains speed of download mean value according to the maximum in described total speed of download and minimum value, described speed of download mean value is multiplied by the quantity of speed of download feedback information, as uploading speed to be adjusted, then, first sub-determining device obtains the history average of described history uploading speed, and more described uploading speed to be adjusted and described history average, when the difference of described uploading speed to be adjusted and described history average is less than predetermined threshold, first sub-determining device is using the current uploading speed of described upload speed information to be adjusted as publish resource node belonging to measurement mechanism, generate current upload speed information, when the difference of described uploading speed to be adjusted and described history average is greater than predetermined threshold, the first sub-determining device, using the current uploading speed of described history average as publish resource node belonging to measurement mechanism, generates current upload speed information.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any according to described speed of download feedback information and history upload speed information, obtain the implementation of the current upload speed information of described publish resource node, all should be within the scope of the present invention.
As another preferred embodiment of the present invention, wherein, the described measurement mechanism for measuring user's uploading bandwidth also comprises the first adjusting device 23.
First adjusting device 23, according to described current upload speed information and/or history upload speed information, adjusts the uploading resource speed of publish resource node belonging to measurement mechanism.Wherein, described uploading resource speed belonging to measurement mechanism publish resource node to the uploading speed of each resource request node resource uploading.
Concrete, first adjusting device 23 obtains current uploading speed by described current upload speed information, obtain one or more history uploading speed by history upload speed information, and adjust the uploading resource speed of described publish resource node according to described current uploading speed and/or described history uploading speed.
Wherein, described adjustment mode includes but not limited to: 1) reduce described uploading resource speed, such as, stops sending resource to part resource requesting node, or, extend the response time sending resource to part resource requesting node; 2) improve described uploading resource speed, such as, according to the resource download request that publish resource node receives, select one or more be in wait state resource request node and to described resource request node resource uploading; 3) described uploading resource speed is not changed.
Such as, first adjusting device 23 obtains the current uploading speed corresponding with described current upload speed information, and using the threshold value of described current uploading speed as the uploading resource speed of described publish resource node, if uploading resource speed is greater than this threshold value, then the first adjusting device 23 reduces uploading resource speed, is less than threshold value to make it; If uploading resource speed is less than this threshold value, then the first adjusting device 23 does not change uploading resource speed.
Again such as, the first adjusting device 23, according to described current upload speed information and history upload speed information, obtains current uploading speed and history uploading speed, and obtains the historical average speeds of described history uploading speed; Subsequently, the more described current uploading speed of the first adjusting device 23 and described historical average speeds, if described current uploading speed is greater than described average uploading speed, then with described current uploading speed for first threshold, described average uploading speed is Second Threshold; If described current uploading speed is less than described average upload speed information, then with described average upload speed information for first threshold, described current uploading speed is Second Threshold.When the first adjusting device 23 judges that uploading resource speed is greater than first threshold, the first adjusting device 23 reduces the uploading resource speed of described publish resource node to make uploading resource speed lower than first threshold; When the first adjusting device 23 judges that uploading resource speed is less than Second Threshold, the first adjusting device 23 improves the uploading resource speed of described publish resource node to make uploading resource speed higher than Second Threshold.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any according to described current upload speed information and/or history upload speed information, the implementation of the uploading resource speed of publish resource node belonging to adjustment measurement mechanism, all should be within the scope of the present invention.
According to measurement mechanism of the present invention, can the actual speed to each resource request node resource uploading of Gains resources publisher node comparatively accurately, avoid the situation that the speed of download summation of the uploading speed of publish resource node self and the resource request node caused due to bandwidth restriction is inconsistent, and the data that publish resource node can adjust self according to reality to the speed of resource request node-node transmission data send behavior, to avoid because uploading speed to cause the situation of packet loss higher than bandwidth restriction.
Fig. 6 illustrates the structural representation of the device for measuring user's uploading bandwidth in accordance with a preferred embodiment of the present invention.According to the method for the present embodiment, wherein, the first acquisition device 21 also comprises the first sub-acquisition device (not shown), and measurement mechanism comprises the second determining device 24 and the 3rd determining device 25 further.
First sub-acquisition device obtains speed of download feedback information and the node location information of described one or more resource request node; Wherein, the content of described node location information comprises at least with the next item down content: the 1) network address of resource request node, such as, and MAC Address, network ip address etc.; 2) geographical area information belonging to resource request node, such as China, the U.S., Japan etc.
Second determining device 24, according to described node location information, determines the region belonging to described one or more resource request node respectively; Concrete, the second determining device 24 is resolved described node location information, determines described resource request node present position, to obtain the region belonging to resource request node.
3rd determining device 25, according to the speed of download feedback information of described one or more resource request node and difference affiliated area thereof, obtains the current upload speed information in region in the relatively each region of described publish resource node.Wherein, the current upload speed information in described region comprises the current uploading speed in region.Preferably, the current upload speed information in described region also comprises following at least one item: the 1) settling time of the current upload speed information in this region; 2) for generate the current upload speed information in this region speed of download feedback information belonging to resource request node etc.
Concrete, 3rd determining device 25 is according to the affiliated area of described one or more resource request node, obtain the speed of download feedback information sent from the resource request node of the same area, and obtain the current upload speed information in region in described region according to the described speed of download feedback information from the same area respectively;
Such as, 3rd determining device 25 is according to the execution result of the second determining device 24, determine that the geographical position residing for multiple resource request nodes be associated with described publish resource node institute resource uploading is A, B, C tri-regions, 3rd determining device 25 adds up the quantity of the speed of download feedback information from the same area, obtain the maxima and minima in described total speed of download corresponding from the speed of download feedback information of the same area, and obtain the mean value of described maxima and minima, using the long-pending current uploading speed in region as described region of the quantity of described mean value and speed of download feedback information, and carry out the current upload speed information in formation zone according to the current uploading speed in described region.
Or the 3rd determining device 25, according to the affiliated area of described speed of download feedback information and described one or more resource request node, determines the current upload speed information in the region of regional.
Such as, 3rd determining device 25 adds up total speed of download corresponding to all speed of download feedback informations to obtain overall area speed of download, and according to the quantity in region, described overall area speed of download is obtained average area speed of download divided by after the quantity in region, subsequently, 3rd determining device 25 using described average area speed of download as region current uploading speed, and carry out the current upload speed information in formation zone according to the current uploading speed in described region.
Again such as, according to the execution result of the second determining device 24, determine that the geographical position residing for multiple resource request nodes be associated with described publish resource node institute resource uploading is A, B, C tri-regions.3rd determining device 25 is added up all speed of download feedback informations, the total speed of download sum obtaining all speed of download feedback informations corresponding is 300Kbs, and the quantity of speed of download feedback information is altogether 8, the speed of download feedback information 2 that speed of download feedback information 3 corresponding to the speed of download feedback information 3 that wherein a-quadrant is corresponding, B region, C region are corresponding; Then, 3rd determining device 25 quantity ratio of speed of download feedback information according to regional determines the current uploading speed in the region of regional, the current uploading speed in region obtaining a-quadrant is 300*3/ (3+3+2)=112.5kbs, the current uploading speed in region in B region is the current uploading speed in region in 300*3/ (3+3+2)=112.5kbs, C region is 300*2/ (3+3+2)=75kbs; 3rd determining device 25, according to the current uploading speed in the region of obtained regional, generates the current upload speed information in region of regional.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any speed of download feedback information according to described one or more resource request node and respectively affiliated area, obtain the implementation of the current upload speed information in region in the relatively each region of described publish resource node, all should be within the scope of the present invention.
As a preferred embodiment of the present invention, wherein, the 3rd determining device 25 also comprises the second sub-determining device (not shown).
Second sub-determining device is according to the speed of download feedback information of described one or more resource request node and difference affiliated area thereof, and in conjunction with the regional historical upload speed information in the relatively each region of described publish resource node, obtain the current upload speed information in region in the relatively each region of described publish resource node; Wherein, described regional historical upload speed information comprises one or more regional historical uploading speed.Preferably, described regional historical upload speed information can also comprise following at least one information: the node location information of 1) corresponding with described one or more regional historical uploading speed one or more resource request nodes; 2) corresponding with described one or more regional historical uploading speed temporal information.
Concrete, second sub-determining device obtains corresponding total speed of download by the speed of download feedback information of described one or more resource request node, and according to the speed of download feedback information of described one or more resource request node respectively affiliated area obtain the regional historical upload speed information in described region, one or more regional historical uploading speed is obtained by described regional historical upload speed information, subsequently, second sub-determining device is according to obtained total speed of download and regional historical uploading speed, obtain the current uploading speed in region corresponding to regional, carry out the current upload speed information in formation zone.
Such as, obtain corresponding total speed of download in the speed of download feedback information that second sub-determining device is sent by one or more resource request node, and the region belonging to described one or more resource request node sues for peace to obtain region summed result according to region to described total speed of download; And the region of the second sub-determining device belonging to one or more resource request node, obtain the regional historical upload speed information of regional, obtain multiple regional historical uploading speed by described regional historical upload speed information, and obtain the averaged historical uploading speed of regional according to described multiple regional historical uploading speed; Then, second sub-determining device is to each regional compare region summed result corresponding with described region and zone leveling history uploading speed, when described region summed result is greater than described zone leveling history uploading speed, second sub-determining device using described summed result as region current uploading speed, carry out the current upload speed information in formation zone; When described summed result is less than described zone leveling history uploading speed, the second sub-determining device using described zone leveling history uploading speed as region current uploading speed, carry out the current upload speed information in formation zone;
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any speed of download feedback information according to described one or more resource request node and respectively affiliated area, and in conjunction with the regional historical upload speed information in the relatively each region of described publish resource node, obtain the implementation of the current upload speed information in region in the relatively each region of described publish resource node, all should be within the scope of the present invention.
As a preferred embodiment of the present invention, wherein, the second adjusting device 26 is also comprised according to measurement mechanism of the present invention.
Second adjusting device 26 relative to the current upload speed information in the region in each region and/or regional historical upload speed information, adjusts the uploading speed to described each region resource uploading according to described publish resource node.Wherein, described adjustment mode includes but not limited to: 1) reduce the uploading speed to described each region resource uploading, such as, second adjusting device 26 stops sending resource to the part resource requesting node in described each region, or the second adjusting device 26 extends the response time sending resource to part resource requesting node; 2) uploading speed to described each region resource uploading is improved, such as, the resource download request that second adjusting device 26 receives according to publish resource node, select one or more be in wait state resource request node and to described resource request node resource uploading; 3) uploading speed to described each region resource uploading is not changed.
Such as, second adjusting device 26 obtains the region current uploading speed corresponding with regional according to the current upload speed information in described region, regional historical upload speed information according to regional obtains regional historical uploading speed, and regional is obtained to the mean value of the regional historical uploading speed corresponding with described region; Subsequently, second adjusting device 26 compares the current uploading speed of mean value corresponding to regional and region, and using the threshold value of larger value as the uploading speed to described region resource uploading, when described uploading speed is greater than this threshold value, the second adjusting device 26 reduces described uploading speed; When described uploading speed is less than this threshold value, the second adjusting device 26 does not change the uploading speed to described each region resource uploading.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any according to described publish resource node relative to the current upload speed information in the region in each region and/or regional historical upload speed information, adjust the implementation to the uploading speed of described each region resource uploading, all should be within the scope of the present invention.
According to the method for the present embodiment, the speed of download feedback information of the resource request node of middle zones of different Network Based obtains the speed of download situation of the resource request node of zones of different, and determine the uploading speed to regional according to the speed of download situation of the resource request node of described zones of different, to reach the object utilizing the network bandwidth more fully, avoid the situation causing the data uploaded to be routed device or gateway abandoning because resource request node exceedes the restriction of this zone bandwidth to the speed of a certain region uploading data.
Fig. 7 illustrates the structural representation of the device for measuring user's uploading bandwidth of another preferred embodiment of the present invention.Broadcaster 27, second acquisition device 28 and bandwidth determining device 29 is comprised further according to the measurement mechanism of the present embodiment.
When meeting scheduled broadcast trigger condition, the current upload speed information of described publish resource node broadcasted by broadcaster 27 in preset range; Wherein, described broadcast trigger condition includes but not limited to: 1) the first scheduled event trigger condition, when broadcaster 27 obtains the first scheduled event trigger condition, such as, the broadcast distribution order that user inputs via input equipment is obtained, again such as, detect that subscriber equipment operates described predetermined application, again such as, receive the triggering signal etc. from other equipment, then described current upload speed information broadcasted by broadcaster 27 in preset range; 2) the first scheduled time condition, arrives point sometime when broadcaster 27 detects that measurement mechanism runs, or, when broadcaster 27 detects that measurement mechanism meets predetermined period running time; Or when broadcaster 27 detects that the distance last time interval issuing broadcast message has reached predetermined interval value, described current upload speed information broadcasted by broadcaster 27 in preset range.Wherein, described preset range includes but not limited to: 1) physical location scope, and such as, preset the local area network (LAN) of scope belonging to measurement mechanism residing for publish resource node of broadcast distribution, described local area network (LAN) is preset range; 2) user scope, such as, preset the object of multiple nodal information as broadcast distribution, described multiple nodal information is preset range.
Second acquisition device 28 obtains other upload speed information from other nodes in the preset range of described publish resource node place; Wherein, other upload speed information described at least comprise and other nodes one or more other uploading speeds one to one.
Concrete, when meeting predetermined acquisition condition, the second acquisition device 28 obtains other upload speed information of other nodes described in preset range; Wherein, described predetermined acquisition condition includes but not limited to: 1) the second scheduled event trigger condition, when the second acquisition device 28 obtains the second scheduled event trigger condition, such as, second acquisition device 28 detects the signal of obtaining information, again such as, the second acquisition device 28 detects that new resource request node is connected to measurement mechanism, then the second acquisition device 28 obtains other upload speed information described; 2) the second scheduled time condition, point is sometime arrived when the second acquisition device 28 detects that measurement mechanism runs, or, when the second acquisition device 28 detects that measurement mechanism meets predetermined period running time, or, when the second acquisition device 28 detects that the distance last time interval obtaining other upload speed information has reached predetermined interval, the second acquisition device 28 obtains other upload speed information described.
Bandwidth determining device 29, according to the current upload speed information of described publish resource node and other upload speed information described, obtains total uploading bandwidth of described preset range.
Concrete, bandwidth determining device 29 obtains the current uploading speed of described current upload speed information, and other uploading speeds one or more that other upload speed information described are corresponding, and according to described current uploading speed and described other uploading speeds one or more, obtain total uploading bandwidth of described preset range.
Such as, bandwidth determining device 29 obtains the current uploading speed of described current upload speed information, and after every other uploading speed corresponding to all other upload speed information described, using described current uploading speed with all described in the summation of other uploading speeds as total uploading bandwidth of described preset range.
Again such as, bandwidth determining device 29 obtains the current uploading speed of described current upload speed information, and after other uploading speeds multiple corresponding to other upload speed information described, first obtain the first mean value of every other uploading speed, then obtain the second mean value of described first mean value and described current uploading speed; Subsequently, bandwidth determining device 29 adds up the total information quantity of described current upload speed information and other upload speed information described, described second mean value is multiplied by the total bandwidth of result as described preset range of total information quantity acquisition.
It should be noted that, above-mentioned citing is only and technical scheme of the present invention is described better, but not limitation of the present invention, those skilled in the art should understand that, any current upload speed information according to described publish resource node and other upload speed information described, obtain the implementation of total uploading bandwidth of described preset range, all should be within the scope of the present invention.
According to the measurement mechanism of the present embodiment, by the speed of download feedback information of self that resource request nodes all in preset range are broadcasted in described preset range, can obtain the network bandwidth in affiliated preset range more accurately, avoiding cannot the situation of the Measurement accuracy network bandwidth owing to causing owing to there being multiple node to carry out upload and download simultaneously in network.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.Any Reference numeral in claim should be considered as the claim involved by limiting.In addition, obviously " comprising " one word do not get rid of other unit or step, odd number does not get rid of plural number.Multiple unit of stating in system claims or device also can be realized by software or hardware by a unit or device.First, second word such as grade is used for representing title, and does not represent any specific order.