Background technology
Along with the continuous progress of technique of internet,, be that swift and violent development is being experienced in the multimedia communication of representative with Digital Television, Internet telephony, video conference, remote teaching etc. based on the IP network of classics.Particularly in today that mobile communication and multimedia technology are maked rapid progress, various wireless network access technologies (as WLAN, GPRS and WCDMA etc.) and multiple audio/video coding scheme provide great selection space for the user, make the user can really realize multimedia communication anywhere or anytime.
At present the mobile Internet technology of main flow is mostly based on the fusion of multiple radio network technique.Reason is that a part of technology wherein is a wireless lan (wlan), can provide high bandwidth but coverage is little, and the bandwidth that provides as the IEEE802.11b Network Access Point is about 11Mbps, but covering radius is less than 100 meters; Another part technology then is a wireless wide area network (WWAN), provides low bandwidth but coverage is big, almost can provide the ubiquitous network coverage as the honeycomb of cdma network, but bandwidth is difficult to usually be stabilized in more than the 200Kbps.If can make full use of the strong point of the two, but just use WLAN (wireless local area network) as far as possible, otherwise use wireless wide area network, so just can guarantee the service quality of multimedia communication to greatest extent in the WLAN (wireless local area network) time spent.
Switch (handoff) and be meant that a mobile device and a wireless network disconnect and be connected then be linked into the process of another wireless network that this is key issues of netting in the fusion more.Occur in (as WLAN and WLAN) between the homogeneous networks if switch, be called level and switch.This switching can not influence bandwidth usually.But, then be called vertical switching if occur between WLAN and the WWAN.This switching then can cause the acute variation of bandwidth usually.Usually multimedia communication is higher to bandwidth requirement, produces the data transfer rate of hundreds of Kbps easily as video coding, and this switching meeting greatly influences the service quality of multimedia communication.Because video quality and data transfer rate have direct relation, and data transfer rate and encoding rate have direct relation.If when the network bandwidth reduces, can not in time reduce the audio/video coding rate, will cause communication receiver's data-bag lost rate to raise, abominable effect such as speech pause, video pictures appearance " mosaic " even stagnation appears.On the other hand, if when the network bandwidth increases, can not in time improve the audio, video data rate, can not make full use of bandwidth and improve multimedia communication quality.
Another characteristics of wireless network be built easily, the interference of extraneous factor such as electronic equipment, bandwidth fluctuation is bigger, error rate height.Do not having under the situation about switching,, may cause multimedia communication service quality to descend yet because of the continuous variation of bandwidth if remain unchanged the audio, video data rate this moment.
The purpose of design of RTP provides a kind of standard of multimedia communication.The audio or video data are coupled with Real-time Transport Protocol packet header, are encapsulated as the UDP message bag again and transmit.RTCP then provides a kind of scheme that can monitor ongoing audio frequency and video communication in real time, promptly monitors at another port, makes the transmission of audio frequency and video can know recipient's statistical information in time, as data loss rate, delay, shake etc.These information can reflect well that current audio frequency and video receive and network condition.
The base frame of SIP comprises sip server, registrar, the portable terminal of Session Initiation Protocol stack etc. is installed, and is that a kind of being applicable to initiates and set up the agreement of multimedia communication in following mobile Internet environment.In SIP, INVITE is used to set up session, and BYE message is used for end session, and MESSAGE message is used to transmit real-time messages.Sip message is connection-oriented, and the Session Initiation Protocol stack can start overtime re-transmission when this message is lost in transmission course.
Summary of the invention
The objective of the invention is: overcome the deficiencies in the prior art, provide a kind of in multiple access technology and the wireless hybrid network deposited, in real time, the method for the multimedia session service quality set up of management automatically.
For achieving the above object, the multimedia session service quality management method in the multiple network integrated environment provided by the invention comprises:
User II carries out unidirectional Multimedia session to user I, and wherein, user II is a data receiver, and user I is the data receiver, when the terminal decision of user I is switched (detecting the network that is more suitable for as link layer can use), carries out following steps:
User II carries out unidirectional Multimedia session to user I, and wherein, user II is a data receiver, and user I is the data receiver, when the terminal decision of user I is switched, carries out following steps:
A1) user I judges the objective network type that switching soon enters;
A2) user I sends a switching notice signaling to user II, has write down described objective network type in this switching notice signaling;
A3) user II receives user I in steps A 2) in the switching notice signaling that sends, then according to this locality of the objective network type adjustment in this signaling audio/video encoding rate;
A4) steps A 3) finish after, user II beams back one to user I and switches and confirm signaling;
A5) user I is in steps A 2) switching that finishes to wait for that user II sends in the back confirms signaling, when receiving described switching when confirming signaling, carries out immediately and switches.
In the technique scheme, the terminal of described user I is a portable terminal, and described switching is vertical switching.
In the technique scheme, also comprise overtime duration and timer are set, in described steps A 2) in, timer picked up counting when user I sent the switching notice signaling; Described steps A 5) in,, closes described timer when user I receives described switching when confirming signaling; When the timer timing reaches described overtime duration, and user I do not receive described switching yet and confirms signaling, then carries out immediately and switches.
In the technique scheme, described switching notice signaling and switching confirm that signaling all adopts the MESSAGE message format of Session Initiation Protocol.
In the technique scheme, described steps A 3) in, method according to the local audio/video encoding rate of the objective network type adjustment in the switching notice signaling is as follows: when the objective network type of this switching is WLAN, the encoding rate that then improves local audio frequency and video immediately is to adapt to the high bandwidth of WLAN; If WWAN, the encoding rate that then reduces local audio frequency and video immediately is to adapt to the low bandwidth of WWAN.
In the technique scheme, the overtime duration of described timer is 3 seconds.
In the technique scheme, after session was successfully set up, user II was normally sending in the process of audio, video data to user I, carried out following steps:
B1) every certain time length, user I calculates Loss Rate (hereinafter to be referred as " packet loss ") and the delay jitter (jitter) that receives packet in last computing time to current time;
B2) user I is with step B1) in the packet loss that obtains and delay jitter data send to user II with the form of rtcp protocol packet;
B3) user II receives step B2) in the RTCP packet after, parse wherein packet loss and delay jitter field;
B4) user II is according to step B3) in packet loss and delay jitter judge current network conditions;
B4.1) if packet loss less than threshold value Thres
F(preestablishing) and delay jitter are less than threshold value Thres
J(preestablishing) then heightens the audio/video coding rate Delta (preestablishing), forwards step B1 to); Otherwise forward step B4.2 to);
B4.2) if packet loss less than threshold value Thres
FAnd delay jitter is greater than Thres
J, it is constant then to keep current audio/video coding rate, forwards step B1 to, otherwise forwards step B4.3 to);
B4.3) if packet loss greater than threshold value Thres
FAnd delay jitter is less than Thres
J, then the audio/video coding rate is turned down Delta, forward step B1 to, otherwise forward step B4.4 to);
B4.4) the audio/video coding rate is turned down 2 * Delta, forward step B1 to).
In the technique scheme, described step B1) in, described packet loss is to use from the last time to send the ratio that RTCP wraps the sequence number maximum difference of the packet that number of data packets that the current time loses and this section receive in the period.
In the technique scheme, described step B2) in, user I needs at first with step B1) in the packet loss that calculates be filled up in the RTCP packet; Described step B3) in, user II need parse wherein packet loss field from the RTCP packet.
In the technique scheme, described step B1) in, described certain time length was 5 seconds.
The present invention has following technique effect:
The present invention utilizes the connection-oriented characteristic of SIP, gets ready with regard to the transmit leg of warning tone video before vertical the switching.Avoided portable terminal multimedia communication service quality in handoff procedure to be affected.The present invention uses packet loss and delay jitter as foundation, judges current network conditions, and in view of the above the audio/video coding rate is adjusted accordingly.Compared with only more accurate with the determination methods of a parameter (as only using packet loss).Method of the present invention is specially adapted to adopt session initiation protocol SIP to create a mechanism as Multimedia session and adopts realtime transmission protocol RTP/RTCP Real-time Transport Control Protocol RTCP to carry out the multimedia communications system of audio, video data transmission.
Embodiment
Embodiment 1
It is a kind of in multiple access technology and the wireless hybrid network deposited that present embodiment provides, in real time, the method for the multimedia session service quality set up of management automatically.Present embodiment is applied to adopt session initiation protocol SIP (Session Initialization Protocol) to create a mechanism as Multimedia session, adopts realtime transmission protocol RTP (Real-time Transport Protocol)/RTCP Real-time Transport Control Protocol RTCP (Real-time Transport Control Protocol) to carry out the multimedia communications system of audio, video data transmission and monitoring.
The environment that needs in the present embodiment as shown in Figure 1.User I inserts certain wireless network (hypothesis is WLAN) here, and two wireless networks link to each other with sip server respectively.In the line between the entities of various kinds, solid line is represented the link that connecting, the link that dotted line expresses possibility and can switch to.
In the present embodiment, when carrying out, Multimedia session occurs managing the service quality of this session in handoff procedure under the vertical situation about switching.Suppose that user II carries out unidirectional Multimedia session to user I, promptly user II is for sending the transmit leg of video/voice data, and user I is the recipient.When the portable terminal decision of user I is vertically switched (detecting the network that is more suitable for as link layer can use), shown in Fig. 2,3, carry out following steps:
A1) user I judges that being about to switch the objective network type that enters (as WLAN (wireless local area network) WLAN, wireless wide area network WWAN, and writes down this data;
A2) user I sends a switching notice signaling (HANDOFF_WLAN or HANDOFF_WWAN) to user II; This switching notice signaling adopts the MESSAGE message format of Session Initiation Protocol, has wherein write down the objective network type of this switching; And user I starts a timer when sending the switching notice signaling.It should be noted that present embodiment is applied to the multimedia communication software based on SIP, because Session Initiation Protocol has connection-oriented characteristics, it is very convenient to use SIP MESSAGE message to make signaling.In addition, the present invention can also use other to connect and transmit these signalings, but requirement must be towards connecting (for example TCP) and postponing less.
A3) user II receives user I in steps A 2) in the switching notice signaling that sends, then according to this locality of the objective network type adjustment in this signaling audio/video encoding rate.
If the objective network type of this switching is WWAN (as the situation of Fig. 2), the encoding rate that then reduces local audio frequency and video immediately is to adapt to the low bandwidth of WWAN; If WLAN (as the situation of Fig. 3) then improves the high bandwidth (the adjustment mode of encoding rate by concrete network environment and audio/video coding format determination) of encoding rate to adapt to WLAN of local audio frequency and video immediately;
A4) steps A 3) finish after, user II beams back one to user I and switches and confirm signaling (HANDOFF_ACK), this switches confirms that signaling adopts the MESSAGE message format of Session Initiation Protocol;
A5) user I is at A2) finish the back and receive MESSAGE message and it is resolved, if this message is steps A 4) in switching confirm signaling, then carry out immediately and switch the timeing closing device; Otherwise, then think common MESSAGE message, do not do any action.
A6) timer as user I reaches overtime duration, carries out immediately and switches.In the present embodiment, overtime duration is 3 seconds.Switching among the user I waiting step A5 confirms that signaling is overtime more than 3 seconds, and this may be not have in time to handle or switching notice signaling, the delay of switching the affirmation signaling cause by network congestion, server.But switching must be carried out very soon usually, therefore no longer waits for this signaling, directly carries out and switches.(this step is all not shown in Fig. 2 and 3.)
The steps A 3 of present embodiment) in, a kind of method according to objective network type adjustment encoding rate is as shown in table 1, and this has been expressed the back audio/video coding rate that switches and has adjusted strategy.
Table 1
Coded format | The encoding rate relevant parameter | Regulative mode | Remarks |
Switch to WLAN | Switch to WWAN | |
H.263 | bit rate | Be made as 700000 | Be made as 200000 | Video |
G.723.1 | bit rate | Be made as 400000 | Be made as 150000 | Audio frequency |
M-JPEG | quality | Be made as 0.7 | Be made as 0.25 | Video |
Bit rate (bit rate) that is provided with in the table 1 or the value of quality (the picture quality factor) are to determine according to the definition in the DLL (dynamic link library) usually, can directly influence actual bit rate, but on the numerical value and be not equal to actual bit rate.In addition, if the value of audio frequency bit rate and video bit rate is equal, do not represent occupied bandwidth to equate.Usually the span of quality is between 0 to 1, and the span of bit rate is between 5000 to 1000000.
Because different DLL (dynamic link library) may be different to the definition of the parameter that influence encoding rate, only (Java Media Framework is JMF) as example with the Java media framework of Sun Microsystems release here.Bit rate that is provided with in the table 1 or the value of quality can directly influence actual bit rate, but on the numerical value and be not equal to actual bit rate.In addition, if the value of audio frequency bit rate and video bit rate is equal, do not represent occupied bandwidth to equate.In JMF, the span of quality is between 0 to 1, and the span of bit rate is between 5000 to 1000000.
Present embodiment also comprises Multimedia session ongoing generally (promptly not having handover event to occur), manages the method for the service quality of this session:
User II carries out unidirectional Multimedia session to user I, and promptly user II is for sending the transmit leg of video/voice data, and user I is the recipient.As shown in Figure 4, after session was successfully set up, user II was sending in the process of audio, video data to user I, carries out following process:
B1) every 5 seconds, user I calculates Loss Rate (hereinafter to be referred as " packet loss ") and the delay jitter (jitter) that receives packet in last computing time to current time;
In the present embodiment, the rtcp protocol stack of user I is used and is sent RTCP from the last time and unwrap the number of data packets of losing in the time interval to current this section of beginning divided by the sequence number maximum difference of the packet that receives in during this period of time, can calculate packet loss; The packet loss of user I and delay jitter all can be calculated by the method that proposes in the RFC3550 document of its rtcp protocol stack according to the Internet engineering duty group (IETF).
B2) user I is with step B1) in the packet loss that obtains and delay jitter data send to user II with the form of rtcp protocol packet;
In this step, user I needs at first with step B1) in the packet loss that calculates be filled up in the RTCP packet;
B3) user II receives step B2) in the RTCP packet after, parse wherein packet loss and delay jitter field;
In this step, user II need parse wherein packet loss field from the RTCP packet, thereby knows that the nearest packet of user I arrives situation;
B4) user II is according to step B3) in packet loss and delay jitter judge current network conditions;
B4.1) if packet loss less than threshold value Thres
F(preestablishing) and delay jitter are less than threshold value Thres
J(preestablishing) then heightens the audio/video coding rate Delta (preestablishing), forwards step B1 to); Otherwise forward step B4.2 to);
B4.2) if packet loss less than threshold value Thres
FAnd delay jitter is greater than Thres
J, it is constant then to keep current audio/video coding rate, forwards step B1 to, otherwise forwards step B4.3 to);
B4.3) if packet loss greater than threshold value Thres
FAnd delay jitter is less than Thres
J, then the audio/video coding rate is turned down Delta, forward step B1 to, otherwise forward step B4.4 to);
B4.4) the audio/video coding rate is turned down 2 * Delta, forward step B1 to).
Described step B4), B4.1), B4.2), B4.3), B4.4) in, user II uses described packet loss and two parameters of delay jitter as basis for estimation, respectively with pre-set threshold Thres
FAnd Thres
JCompare, determining network condition, and the audio/video coding rate is made corresponding adjustment.As shown in table 2, this has expressed the real-time adjustment strategy of audio/video coding rate generally.
Table 2
Packet loss | Delay jitter | Network condition | Adjustment to the audio/video coding rate |
<Thres
F | <Thres
J | Well | Improve Delta |
<Thres
F | >Thres
J | Generally | Remain unchanged |
>Thres
F | <Thres
J | Relatively poor | Reduce Delta |
>Thres
F | >Thres
J | Very poor | Reduce by 2 * Delta |
The packet loss judgment threshold Thres that uses in the described method
F, delay jitter judgment threshold Thres
JAll can set up on their own with adjustment step-length Delta parameter by the bitcom developer.Wherein advise threshold value Thres
FBe 10%, threshold value Thres
JUnder the situation of using audio frequency, can be made as 50 milliseconds, otherwise can suitably increase.Step-length Delta can determine according to the specific coding form, and as for video H.263, its bit-rate parameters scope is 5000~1000000, can be set to 1000 by Delta.In general, step-length is big more, and governing speed is fast more, is difficult to stablize but may cause, and promptly video is in repeatedly adjustment state significantly.And step-length is more little, regulate meticulous more, the easier stable state that enters, but regulating cycle may be longer.
The present invention utilizes the connection-oriented characteristic of SIP, gets ready with regard to the transmit leg of warning tone video before vertical the switching.Avoided portable terminal multimedia communication service quality in handoff procedure to be affected.
Simultaneously, the present invention uses packet loss and delay jitter as foundation, judges current network conditions, and in view of the above the audio/video coding rate is adjusted accordingly.Compared with only more accurate with the determination methods of a parameter (as only using packet loss).For example some the time packet loss can to occur low but situation that delay jitter is high is to belong to the relatively poor performance of network condition equally.If only judge, can obtain court verdict devious this moment with packet loss.
In order to introduce the present invention more intuitively, below provide a concrete application example, and specifically describe in conjunction with the accompanying drawings.
The environment that needs among the present invention as shown in Figure 1.User I inserts certain wireless network (hypothesis is WLAN) here, and two wireless networks link to each other with sip server respectively.In the line between the entities of various kinds, solid line is represented the link that connecting, the link that dotted line expresses possibility and can switch to.User I and user II use the INVITE of SIP to initiate Multimedia session, and conversational mode is that user II sends audio, video data to user I.
After successfully setting up session, in the communication process, user I decision switches to the WWAN wireless network from the WLAN wireless network at place smoothly.User I sends the switching notice signaling to user II, and points out it is to switch to the WWAN network in this signaling.User II knows that after receiving this signaling user I will switch to the WWAN network, and promptly the network bandwidth can reduce, so reduce the audio/video coding rate, beams back one then and switches the affirmation signaling.User I carries out switching after receiving this signaling immediately.The flow process of Signalling exchange and both sides' behavior as shown in Figure 2.
Another situation is that user I decision switches to the WLAN wireless network from the WWAN wireless network in the communication process.User I sends the switching notice signaling to user II, and points out it is to switch to wlan network in this signaling.User II knows that after receiving this signaling user I will switch to wlan network, and promptly the network bandwidth can increase, so improve the audio/video coding rate, beams back one then and switches the affirmation signaling.User I carries out switching after receiving this signaling immediately.The flow process of Signalling exchange and both sides' behavior as shown in Figure 3.
Do not having under the environment that switches, transmitting terminal as audio, video data, the RTCP packet that the continuous monitoring users I (receiving terminal) of user II (transmitting terminal) sends, and come the phase-split network situation according to packet loss in this packet and delay jitter, and the audio/video coding rate made corresponding adjusting, realize real-time management to service quality.Detailed handling process as shown in Figure 4.