CN102984078A - Method and system for realizing flow control on web pages - Google Patents

Method and system for realizing flow control on web pages Download PDF

Info

Publication number
CN102984078A
CN102984078A CN2012105177047A CN201210517704A CN102984078A CN 102984078 A CN102984078 A CN 102984078A CN 2012105177047 A CN2012105177047 A CN 2012105177047A CN 201210517704 A CN201210517704 A CN 201210517704A CN 102984078 A CN102984078 A CN 102984078A
Authority
CN
China
Prior art keywords
streaming media
media server
receiving terminal
cycle
average flow
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.)
Pending
Application number
CN2012105177047A
Other languages
Chinese (zh)
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.)
Suzhou Codyy Network Technology Co Ltd
Original Assignee
Suzhou Codyy Network Technology 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 Suzhou Codyy Network Technology Co Ltd filed Critical Suzhou Codyy Network Technology Co Ltd
Priority to CN2012105177047A priority Critical patent/CN102984078A/en
Publication of CN102984078A publication Critical patent/CN102984078A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and a system for realizing flow control on web pages. The method comprises the following steps: a sending terminal and a receiving terminal respectively establish connection with a streaming media server; the sending terminal sends obtained streaming media data information to the streaming media server; after receiving a streaming media data request sent by the receiving terminal, the streaming media server conducts periodic flow counting according to the byte number obtained per second and obtains a periodic average flow value according to flow counting results in periods; and an information publishing server compares the obtained periodic average flow value with a first preset value and conducts flow control according to a comparison result.

Description

Realize the method and system of flow control on a kind of webpage
Technical field
The invention belongs to the instant messaging field, relate in particular to the method and system that realize flow control on a kind of webpage.
Background technology
Along with the develop rapidly of informationized society, various meanss of communication such as Fetion, QQ etc. are generally used by people, and except individual application, the instant communication mode of some enterprise versions also is familiar with by popular gradually, such as video conference etc.In actual use, whether the smoothness of audio, video data broadcast plays key effect to the Web conference quality.In actual applications, because network condition is not good, or the server resource distribution is uneven, and when playing audio-video data flowed, it was discontinuous the receiving terminal broadcast to occur easily, so that effect of meeting is relatively poor, experiences thereby affect the user.
Summary of the invention
The invention provides the method and system of realization flow control on a kind of webpage to address the above problem.
The invention provides the method that realizes flow control on a kind of webpage, may further comprise the steps.Transmitting terminal and receiving terminal connect with streaming media server respectively.Described transmitting terminal is sent to described streaming media server with the stream medium data information of obtaining.After described streaming media server receives the stream medium data request of described receiving terminal transmission, according to the byte number that per second obtains, carry out periodicity flow statistics and according to traffic statistics result in the cycle, obtain cycle average flow value.Cycle average flow value and the first preset value that described streaming media server relatively obtains, and according to comparative result, carry out flow control.
The invention provides the system that realizes flow control on a kind of webpage, comprise transmitting terminal, streaming media server and receiving terminal, described transmitting terminal connects described streaming media server, and described streaming media server connects described receiving terminal.Described transmitting terminal is used for connecting with described streaming media server, also is used for the stream medium data information of obtaining is sent to described streaming media server.Described receiving terminal is used for connecting with described streaming media server, also is used for sending the stream medium data request to described streaming media server.Described streaming media server, after being used for receiving the stream medium data request of described receiving terminal transmission, the byte number that obtains according to per second, carry out periodicity flow statistics and according to traffic statistics result in the cycle, obtain cycle average flow value, also be used for cycle average flow value and the first preset value relatively obtain, and according to comparative result, carry out flow control.
Compared to prior art, according to the method and system that realize flow control on the webpage provided by the invention, transmitting terminal and receiving terminal connect with streaming media server respectively.Described transmitting terminal is sent to described streaming media server with the stream medium data information of obtaining.After described streaming media server receives the stream medium data request of described receiving terminal transmission, according to the byte number that per second obtains, carry out periodicity flow statistics and according to traffic statistics result in the cycle, obtain cycle average flow value.Effectively avoid causing the server error in judgement because of the short time without flow.Cycle average flow value and the first preset value that described streaming media server relatively obtains, and according to comparative result, carry out flow control.So, receiving terminal can the smooth playing audio frequency and video, have guaranteed Video Frequency Conference Quality.
Description of drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, consists of the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not consist of improper restriction of the present invention.In the accompanying drawings:
Figure 1 shows that the flow chart of realizing the method for flow control on the webpage that preferred embodiment according to the present invention provides;
Figure 2 shows that the schematic diagram of realizing the system of flow control on the webpage that preferred embodiment according to the present invention provides.
Embodiment
Hereinafter also describe in conjunction with the embodiments the present invention in detail with reference to accompanying drawing.Need to prove that in the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
Figure 1 shows that the flow chart of realizing the method for flow control on the webpage that preferred embodiment according to the present invention provides.As shown in Figure 1, realize that the method for flow control comprises step 101 ~ 104 on the webpage that preferred embodiment of the present invention provides.
Step 101: transmitting terminal and receiving terminal connect with streaming media server respectively.
Particularly, before connecting, described transmitting terminal and receiving terminal create respectively Flash Flex project, and the newly-built issue Stream Media Application of described transmitting terminal program MXML, name is called PublishStream, the newly-built playing stream media application program of described receiving terminal MXML, name is called PlayStream.
The process that described transmitting terminal and streaming media server connect is: use the constructed fuction of NetConnection class to create a NetConnection connecting object, name is called conn.Described transmitting terminal uses connect (URL) to connect streaming media server,
And the URL address of described streaming media server.After described transmitting terminal uses conn.connect (URL) and streaming media server to connect, be described conn connecting object binding monitoring event.If monitor and know that state information is NetConnction.Connect.Success, then connect successfully with described streaming media server, if described state information is NetConnction.Connect.Failed, then connect unsuccessfully with described streaming media server, need to check whether described streaming media server starts, whether the URL address is correct etc.Process and said process that described receiving terminal and streaming media server connect are similar, so repeat no more in this.
Step 102: described transmitting terminal is sent to described streaming media server with the stream medium data information of obtaining.
Particularly, after described transmitting terminal and streaming media server connect, need to create issue stream.Detailed process is as follows: use NetStream class formation method to create flow object stream, described flow object stream is used for playing media file and sending data by the NetConnection object.The mode that described transmitting terminal obtains audio frequency and video data information is: use the getCamera () of flash Camera class to obtain local camera data, use the getMicrophone () of flash Microphone class to obtain microphone data.Described transmitting terminal uses the attachCamera method that the camera data are appended on the stream steam, uses the attachMicrophone method that microphone data is appended on the stream stream.
Described transmitting terminal is sent to streaming media server with the stream medium data information of obtaining with stream socket, and except the audio, video data that has obtained, described data flow also comprises the key for sign self identity information.Transmitting terminal adds a page button event after finishing the establishment of issue stream, and the stream medium data that can issue corresponding key flow to streaming media server.
Step 103: after described streaming media server receives the stream medium data request of described receiving terminal transmission, according to the byte number that per second obtains, carry out periodicity flow statistics and according to traffic statistics result in the cycle, obtain cycle average flow value.
Particularly, the streaming media server built-in timer, when receiving the stream medium data request of receiving terminal transmission, described timer triggers, and described streaming media server begins to add up one or more cycle flows.Described streaming media server is according to traffic statistics result in the cycle, the process of obtaining cycle average flow value is: if the byte number that per second obtains is set to S, traffic statistics result in n second=S1+S2+...Sn(n is one-period second), the byte per second of n average flow value in second=(S1+S2+...Sn)/n) then.
Step 104: cycle average flow value and the first preset value that described streaming media server relatively obtains, and according to comparative result, carry out flow control.
Particularly, the first preset value of streaming media server storage flow, and according to the cycle average flow value in one or more cycles and the comparative result of the first preset value, do corresponding discharge control.The difference in described one or more cycles relatively reaches flow control mode, comprises following several.
The first: if one-period, cycle average flow value is less than the first preset value, and then described streaming media server stops to send the streaming media data stream of current key, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
The advantage of this flow control mode:
Solved poor in network condition or server resource distributes in serious irrational situation, the receiving terminal that causes can not receive the problem of smooth audio/video flow.
The second: if a plurality of cycle, cycle average flow value reaches preset times less than the first preset value, then described streaming media server stops to send the streaming media data stream of current key, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
In this, if the cycle, the average flow value was less than the first preset value, and cycle average flow value is not less than the first preset value in the next cycle, then streaming media server again measurement period average flow value less than the first preset value number of times, if the cycle average flow value of statistics reaches preset times less than the first preset value again, stop to send the streaming media data stream of current key, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
The advantage of above-mentioned flow control mode:
Poor or the server resource of network condition distributes seriously unreasonable, but in the relatively shorter situation of duration, has avoided blindly stopping to send the streaming media data stream of current key, the poor problem of experience of bringing to the user.
The third: is if a plurality of cycle, cycle average flow value reaches preset times continuously less than the first preset value, then described streaming media server stops to send the streaming media data stream of current key, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
The advantage of above-mentioned flow control mode:
Poor or the server resource of network condition distributes seriously unreasonable, but in the relatively longer situation of duration, has avoided receiving terminal can not receive the problem of smooth audio/video flow.
In present embodiment, only enumerate the mode that above-mentioned streaming media server carries out flow control, to be applicable to different situations.In other embodiment, flow control mode can be set according to actual needs voluntarily, yet to this present invention and be not construed as limiting.
For example, if on October 9th, 2012 10:00:00, it is the streaming media data stream of test that transmitting terminal sends key to streaming media server, and streaming media server receives the Streaming Media request that receiving terminal sends in 10:02:00, and starts timer and begin periodically flow statistics.If the described cycle is 10 seconds, the first preset value of flow is 20kb/s, described streaming media server is within the cycle of 10:02:00 to 10:02:10, and the flow of statistics per second is respectively: 55 kb/s, 45 kb/s, 12kb/s, 2 kb/s, 2 kb/s, 1 kb/s, 3kb/s, 3 kb/s, 2 kb/s, 1 kb/s.Should the cycle average discharge be (55+45+12+2+2+1+3+3+2+1)/10=12.6 kb/s then.If adopt the first flow control mode, then add up for the first time and computing cycle average flow value 12.6 kb/s during less than the first preset value 20kb/s when streaming media server, stop to send the streaming media data stream that key is test, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
In present embodiment, if adopt the second flow control mode, and described preset times is 3.If streaming media server monitor for the first time cycle average flow value 12.6 kb/s less than the first preset value 20kb/s after, calculating ensuing first 10 seconds (being 10:02:10 to 10:02:20) cycle average flow values is 55kb/s, and second 10 seconds (being 10:02:20 to 10:02:30) cycle average flow value is 15kb/s.Then described streaming media server from second 10 seconds, be that 10:02:20 begins, again measurement period average flow value is less than the number of times of 20kb/s, and when described number of times during more than or equal to preset times 3 times, stop to send the streaming media data stream that key is test, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
If adopt the third flow control mode, and described preset times is 3.It is 18 kb/s that described streaming media server calculates the 3rd 10 seconds (being 10:02:30 to 10:02:40) cycle average flow value, the 4th 10 seconds (being 10:02:40 to 10:02:50) cycle average flow value is 16 kb/s, then streaming media server stops to send the streaming media data stream that key is test in 10:02:51, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
Figure 2 shows that the schematic diagram of realizing the system of flow control on the webpage that preferred embodiment according to the present invention provides.As shown in Figure 2, the system that realizes flow control on the webpage that preferred embodiment of the present invention provides comprises transmitting terminal 201, streaming media server 202 and receiving terminal 203, described transmitting terminal 201 connects described streaming media server 202, and described streaming media server 202 connects described receiving terminal 203.Described transmitting terminal 201 is used for connecting with described streaming media server 202, also is used for the stream medium data information of obtaining is sent to described streaming media server 202.Described receiving terminal 203 is used for connecting with described streaming media server 202, also is used for sending the stream medium data request to described streaming media server 202.Described streaming media server 202, after being used for receiving the stream medium data request of described receiving terminal 203 transmissions, the byte number that obtains according to per second, carry out periodicity flow statistics and according to traffic statistics result in the cycle, obtain cycle average flow value, also be used for cycle average flow value and the first preset value relatively obtain, and according to comparative result, carry out flow control.Operating process about said system is described with above-mentioned method, so repeat no more in this.
In sum, realize the method and system of flow control on the webpage that preferred embodiment according to the present invention provides, transmitting terminal and receiving terminal connect with streaming media server respectively.Described transmitting terminal is sent to described streaming media server with the stream medium data information of obtaining.After described streaming media server receives the stream medium data request of described receiving terminal transmission, according to the byte number that per second obtains, carry out periodicity flow statistics and according to traffic statistics result in the cycle, obtain cycle average flow value.Effectively avoid the server error in judgement that causes without flow because of the short time.Cycle average flow value and the first preset value that described streaming media server relatively obtains, and according to comparative result, carry out flow control.So, receiving terminal can the smooth playing audio frequency and video, have guaranteed Video Frequency Conference Quality.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (7)

1. realize the method for flow control on the webpage, it is characterized in that, may further comprise the steps:
Transmitting terminal and receiving terminal connect with streaming media server respectively;
Described transmitting terminal is sent to described streaming media server with the stream medium data information of obtaining;
After described streaming media server receives the stream medium data request of described receiving terminal transmission, according to the byte number that per second obtains, carry out periodicity flow statistics and according to traffic statistics result in the cycle, obtain cycle average flow value;
Cycle average flow value and the first preset value that described streaming media server relatively obtains, and according to comparative result, carry out flow control.
2. method according to claim 1, it is characterized in that, if one-period, cycle, the average flow value was less than the first preset value, then described streaming media server stops to send the streaming media data stream of current key, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
3. method according to claim 1, it is characterized in that, if a plurality of cycles, cycle average flow value reaches preset times less than the first preset value, then described streaming media server stops to send the streaming media data stream of current key, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
4. method according to claim 1, it is characterized in that, if a plurality of cycles, when the cycle, the average flow value was less than the first preset value, cycle average flow value is not less than the first preset value in the next cycle that continues, then again measurement period average flow value less than the first preset value number of times, if the cycle average flow value of statistics reaches preset times less than the first preset value again, then described streaming media server stops to send the streaming media data stream of current key, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
5. method according to claim 1, it is characterized in that, if a plurality of cycles, cycle average flow value reaches preset times continuously less than the first preset value, then described streaming media server stops to send the streaming media data stream of current key, and then again issue and send the again streaming media data stream of issue to described receiving terminal.
6. method according to claim 1, it is characterized in that, after described streaming media server receives the stream medium data request of described receiving terminal transmission, the byte number that obtains according to per second, carry out periodicity flow statistics and according to traffic statistics result in the cycle, the process of obtaining cycle average flow value is:
If the byte number that per second obtains is set to S;
Traffic statistics result=S1+S2+...Sn in n second, wherein, n second is one-period,
The byte per second of average flow value in n second=(S1+S2+...Sn)/n).
7. realize the system of flow control on the webpage, it is characterized in that comprise transmitting terminal, streaming media server and receiving terminal, described transmitting terminal connects described streaming media server, described streaming media server connects described receiving terminal,
Described transmitting terminal is used for connecting with described streaming media server, also is used for the stream medium data information of obtaining is sent to described streaming media server;
Described receiving terminal is used for connecting with described streaming media server, also is used for sending the stream medium data request to described streaming media server;
Described streaming media server, after being used for receiving the stream medium data request of described receiving terminal transmission, the byte number that obtains according to per second, carry out periodicity flow statistics and according to traffic statistics result in the cycle, obtain cycle average flow value, also be used for cycle average flow value and the first preset value relatively obtain, and according to comparative result, carry out flow control.
CN2012105177047A 2012-12-06 2012-12-06 Method and system for realizing flow control on web pages Pending CN102984078A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012105177047A CN102984078A (en) 2012-12-06 2012-12-06 Method and system for realizing flow control on web pages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012105177047A CN102984078A (en) 2012-12-06 2012-12-06 Method and system for realizing flow control on web pages

Publications (1)

Publication Number Publication Date
CN102984078A true CN102984078A (en) 2013-03-20

Family

ID=47857836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012105177047A Pending CN102984078A (en) 2012-12-06 2012-12-06 Method and system for realizing flow control on web pages

Country Status (1)

Country Link
CN (1) CN102984078A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414648A (en) * 2013-07-15 2013-11-27 苏州阔地网络科技有限公司 Communication flow control method and system
CN104994081A (en) * 2015-02-10 2015-10-21 阔地教育科技有限公司 Data flow control system, data flow control equipment and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1812575A (en) * 2006-02-24 2006-08-02 清华大学 Parallel transmission dispatching method for stream media data
CN101296184A (en) * 2008-05-30 2008-10-29 华为技术有限公司 Method, system and device for data transmission
CN102724123A (en) * 2012-06-27 2012-10-10 青岛上锋科技有限公司 Network traffic control method and network traffic control device
CN102769611A (en) * 2012-06-25 2012-11-07 苏州阔地网络科技有限公司 Method and system for achieving recording and playing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1812575A (en) * 2006-02-24 2006-08-02 清华大学 Parallel transmission dispatching method for stream media data
CN101296184A (en) * 2008-05-30 2008-10-29 华为技术有限公司 Method, system and device for data transmission
CN102769611A (en) * 2012-06-25 2012-11-07 苏州阔地网络科技有限公司 Method and system for achieving recording and playing
CN102724123A (en) * 2012-06-27 2012-10-10 青岛上锋科技有限公司 Network traffic control method and network traffic control device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414648A (en) * 2013-07-15 2013-11-27 苏州阔地网络科技有限公司 Communication flow control method and system
CN103414648B (en) * 2013-07-15 2016-02-03 阔地教育科技有限公司 A kind of communication flow rate control method and system
CN104994081A (en) * 2015-02-10 2015-10-21 阔地教育科技有限公司 Data flow control system, data flow control equipment and terminal

Similar Documents

Publication Publication Date Title
CN107683600B (en) System and method for managing ABR bit rate delivery in response to video buffer characteristics of a client
CN103733680B (en) Method and apparatus for controlling wireless uplink session
WO2016197876A1 (en) Remote control method, remote server, management device, and terminal
CN105635180B (en) Information push method and device
WO2016197864A1 (en) Connection-status detection method and apparatus, and smart television system
CN104581646B (en) A kind of dynamic broadcast method and device of bluetooth equipment
Tsompanidis et al. Mobile network traffic: A user behaviour model
CN101622587A (en) Be used to wake up the centralized service of computing equipment
CN103269331A (en) Method and device for selectively playing code rate content
CN103312593B (en) A kind of message distributing system and method
CN111617466B (en) Method and device for determining coding format and method for realizing cloud game
CN101350741A (en) Method, apparatus and system for notifying real time stream protocol event
US10044833B2 (en) Data processing method and apparatus used for terminal application
WO2023077813A1 (en) Method and apparatus for determining fake traffic in live broadcast room
CN103023794A (en) Method and system for data stream control
US9009248B2 (en) Apparatus and method of performing discovery based on priority level in distributed network, and method of determining discovery back-off time
CN102984078A (en) Method and system for realizing flow control on web pages
CN103929682A (en) Method and device for setting key frames in video live broadcast system
US9871929B2 (en) Communication method and user equipment
CN103001857A (en) Flow control method and system
CN109510868A (en) A kind of method, apparatus that establishing P2P network, terminal device and storage medium
CN101378356B (en) Method for playing real time stream medium
US20150026258A1 (en) Method and apparatus for determining participant discovery message period
CN102111278A (en) Conference media quality monitoring method, device and system
KR101151848B1 (en) Method for providing contents for communication terminal in multicast environment including a plurality of multicast groups and streaming apparatus and communication terminal for the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130320