A kind of method of high concurrent dynamic rate data transmission in network real-time interactive system
Technical field
The invention belongs to computer distribution type field of data transmission, it is dynamic to be related to high concurrent in a kind of network real-time interactive system
The method of state rate data transfer, realize high concurrent, limited bandwidth and it is unstable in the case where, dynamic speed adjustment, maximization
Use the transmission method of network bandwidth.
Background technique
It is unstable in set relatively stable and fluctuation in large-scale online interaction platform (such as Distributed videoconferencing system)
Under fixed network bandwidth conditions, energy high-efficiency stable supports the data communication between the client and server of ten thousand people's ranks,
It is a difficult point and a bottleneck problem, while is also an important indicator of quality good or not between difference online interaction platform.
High concurrent data in real-time interactive system are transmitted, conventional way is solved by distributed load equalizing
Certainly, although do so can by shared by multiple servers ten thousand people grade user request of data and transmission communication pressure,
It solves the problems, such as to a certain extent.But it is also clearly present defect, for the data communication on same server, or there is communication
Peak value and bandwidth bottleneck problem.For example every server shares 1000 clients (user), each client may exist simultaneously
Several million data are requested, if will lead to network congestion without control, user experience is unable to get guarantee.
Summary of the invention
The deficiency that present invention is primarily intended to only solve from load balancing for present conventional way, provides a kind of net
The method that high concurrent dynamic rate data are transmitted in network real-time interactive system.A kind of dynamic speed adjustment maximizes and uses network bandwidth
Transmission method, support high concurrent data reliable and stable transmission.
The technical solution adopted by the present invention to solve the technical problems includes the following steps:
First part: data subpackage strategy
It is as follows that data of the present invention split strategy: document is first split according to the page, is to take paging transmission rather than whole
A document transmits together;Every page splits into basic packet according to 64K byte as a unit;Basic packet is again as unit of 1K byte
Split into data packet.To form document, page, wrap substantially, the transmission hierarchical structure of data packet.
Document or the like data, it is generally all bigger, it can be to tens even several hundred million.Internet transmitting data,
The strategy for generally all taking divided stator frame, will not all be packaged with and disposably be transmitted through, be easy to cause network congestion in this way.
Second part: document uploads
For step (1) based on the considerations of user experience, user wishes the first page for seeing document data as early as possible.Therefore client
PPT document public page and the transmission of the data of page 1, using the transmission speed of 600Kbps (according to measuring) according to front
Rule of unpacking uploads data
The non-PPT public page of step (2) and Fei page 1, using transmission speed the unpacking in rule according to front of 200Kbps
Pass data
Step (3) server section by the data received according to after the unpacking regular group and be bundled into complete data of front, note
Record document, page, basic packet, the logical relation between data packet, and in server memory still with data packet, basic packet, page,
Document hierarchical relationship saves, so that other clients are requested at any time, avoids and re-groups package, have request that can directly forward,
To improve efficiency of transmission.
Part III: profile download
Server end is after receiving to the request of data of client, on the basis of the rate of 100Kbps, by adjusting single
Number give out a contract for a project to realize the speed adjust of 100Kbps to 600Kbps;Single user support 100Kbps, 200Kbps, 300Kbps,
These rates of 400Kbps, 500Kbps, 600Kbps.Server theory available bandwidth Kbps, we are generally fixed as 100*
1024Kbps。
Server documentation needs the statistics of the number of users transmitted according to following rule:
Step (1) is every 1 second statistics audio-video occupied bandwidth Kbps situation
Step (2) counted on current server again every 1 second has document background data packet in the number of users of transmission and 20
The number of users of data packet was once sent out within second, and two numbers of users were superimposed;
The new statistical number of person rule of step (3)
New statistical number of person >=upper 1 second statistical number of person realizes quick reduction of speed using new statistical number of person
New statistical number of person <upper 1 second statistical number of person, the transmission number=new statistical number of person * upper 1 second statistical number of person * 0.8 of 0.2+,
Ensure smooth transition of raising speed;
Step (4) calculation server is given out a contract for a project number to client single
Server is given out a contract for a project number=(server theory available bandwidth Kbps-audio-video occupied bandwidth to client single
Kbps)/(document transmission number of users on 100Kbps* server).
Step (5) determines server to the transmission rate of client
Server gives out a contract for a project number minimum equal to 1,100Kbps transmission rate to client single
Server gives out a contract for a project number maximum equal to 6,600Kbps transmission rate to client single
Server gives out a contract for a project adjustment in number every 1 second once to client single, to support moment number of users to rise problem (such as wink
Between suspension, the case where all users log in again).
The present invention has the beneficial effect that:
The present invention solves the deficiency that the way of present routine is only solved from load balancing, provide a kind of dynamic speed adjustment,
The transmission method for using network bandwidth is maximized, supports the reliable and stable transmission of high concurrent data.
Specific embodiment
The present invention will be further described for aggregate embodiment below.
Illustrate by taking the document data transfer in large-scale online interaction platform as an example as follows, the specific steps packet of the method for the present invention
It includes:
First part: data subpackage strategy
It is as follows that data of the present invention split strategy: document is first split according to the page, is to take paging transmission rather than whole
A document transmits together;Every page splits into basic packet according to 64K byte as a unit;Basic packet is again as unit of 1K byte
Split into data packet.To form document, page, wrap substantially, the transmission hierarchical structure of data packet.
Document or the like data, it is generally all bigger, it can be to tens even several hundred million.Internet transmitting data,
The strategy for generally all taking divided stator frame, will not all be packaged with and disposably be transmitted through, be easy to cause network congestion in this way.
Second part: document uploads
For step (1) based on the considerations of user experience, user wishes the first page for seeing document data as early as possible.Therefore client
PPT document public page and the transmission of the data of page 1, using the transmission speed of 600Kbps (according to measuring) according to front
Rule of unpacking uploads data
The non-PPT public page of step (2) and Fei page 1, using transmission speed the unpacking in rule according to front of 200Kbps
Pass data
Step (3) server section by the data received according to after the unpacking regular group and be bundled into complete data of front, note
Record document, page, basic packet, the logical relation between data packet, and in server memory still with data packet, basic packet, page,
Document hierarchical relationship saves, so that other clients are requested at any time, avoids and re-groups package, have request that can directly forward,
To improve efficiency of transmission.
Part III: profile download
Server end is after receiving to the request of data of client, on the basis of the rate of 100Kbps, by adjusting single
Number give out a contract for a project to realize the speed adjust of 100Kbps to 600Kbps;Single user support 100Kbps, 200Kbps, 300Kbps,
These rates of 400Kbps, 500Kbps, 600Kbps.Server theory available bandwidth Kbps, we are generally fixed as 100*
1024Kbps。
Server documentation needs the statistics of the number of users transmitted according to following rule:
Step (1) is every 1 second statistics audio-video occupied bandwidth Kbps situation
Step (2) counted on current server again every 1 second has document background data packet in the number of users of transmission and 20
The number of users of data packet was once sent out within second, and two numbers of users were superimposed;
The new statistical number of person rule of step (3)
New statistical number of person >=upper 1 second statistical number of person realizes quick reduction of speed using new statistical number of person
New statistical number of person <upper 1 second statistical number of person, the transmission number=new statistical number of person * upper 1 second statistical number of person * 0.8 of 0.2+,
Ensure smooth transition of raising speed;
Step (4) calculation server is given out a contract for a project number to client single
Server is given out a contract for a project number=(server theory available bandwidth Kbps-audio-video occupied bandwidth to client single
Kbps)/(document transmission number of users on 100Kbps* server).
Step (5) determines server to the transmission rate of client
Server gives out a contract for a project number minimum equal to 1,100Kbps transmission rate to client single
Server gives out a contract for a project number maximum equal to 6,600Kbps transmission rate to client single
Server gives out a contract for a project adjustment in number every 1 second once to client single, to support moment number of users to rise problem (such as wink
Between suspension, the case where all users log in again).
Embodiment:
By taking a total bandwidth is the system of 500Mbps as an example, when system active user's number is 1000, and it is playing one
When flow is the video of 400Kbps, the occupied total flow of video is 400Kbps*1000=400000Kbps, if it united at that time
Counting obtained document transmission number of users is 300, and the document transmission number of users of upper one second recorded is 250, then counts according to 300
It calculates single to give out a contract for a project number, i.e. (500000Kbps-400000Kbps)/(100Kbps*300)=3.333 ..., i.e., sends 3 numbers every time
According to packet, after one second, if the document transmission number of users that statistics obtains becomes 10, the number of transmission becomes 300*0.8+10*0.2
=242, single gives out a contract for a project number as (500000Kbps-400000Kbps)/(100Kbps*242)=4.132 ..., i.e., sends 4 every time
A data packet.