Embodiment
The embodiment of the invention is carried out corresponding packet loss control in transmission course according to the difference of packet, and a kind of dynamic packet loss control method based on SVC is provided; In the method, client generates to comprise and adjusts the parameter control signaling according to the transmission demand of reality; Should control signaling and send to server end; Server is controlled signaling according to this, to each packet that receives, adopts corresponding packet loss control strategy according to the value of the NalType information of this packet.
Below in conjunction with Figure of description, the embodiment of the invention is elaborated.
Fig. 1 is the dynamic packet loss control process based on SVC that the embodiment of the invention provides, and in this process, may further comprise the steps:
S101: client generates the control signaling according to the monitored results to the play quality of video resource, wherein carries the parameter information that the equivalent layer of the video resource of employing SVC is adjusted in this control signaling.
S102: this control signaling that client will generate sends to server.
S103: server receives should the control signaling, resolves the parameter information that the equivalent layer to the video resource of employing SVC that obtains to carry in this control signaling is adjusted.
S104: the said parameter information that obtains according to parsing, and the interceptive value of the equivalent layer of the video resource in a last moment of preserving, confirm the interceptive value of the equivalent layer of current time video resource.
S105: server is according to the interceptive value of the said equivalent layer of confirming, and the value of the NalType information of each packet of video resource waiting for transmission, judges that whether this packet is carried out packet loss is handled.
In embodiments of the present invention in order to realize dynamic packet loss control method based on SVC; To real-time streaming protocol (Real Time Streaming Protocol; RTSP) a territory is expanded; Realize the message transmission between client and the server through this territory that expands to, and after receiving the information of client transmission when server, carry out corresponding data bag to be sent according to this information and carry out packet loss control.
Fig. 2 comprises in this system: client 21 and server 22 for the structural representation based on the dynamic packet loss control system of SVC that the embodiment of the invention provides.
Wherein, Client 21 is used for generating the control signaling according to the monitored results of the quality of the video resource that self is play, and said control signaling is sent to server 22; Wherein, carry the parameter information that the equivalent layer of the video resource that adopts SVC is adjusted in this control signaling;
Server 22; Be used to receive said control signaling; The parameter information that the equivalent layer to the video resource of employing SVC that resolve to obtain to carry in this control signaling is adjusted; And, confirm the interceptive value of the equivalent layer of current time video resource, according to the interceptive value of definite said equivalent layer according to last one constantly the interceptive value of preserving of equivalent layer of video resource; And the value of the NalType information of each packet of video resource waiting for transmission, judge that whether this packet is carried out packet loss is handled.
Comprise in this client 21:
Control signaling generation module is used for generating the control signaling according to the monitored results to the play quality of the video resource self play, wherein, carries the parameter information that the equivalent layer of the video resource of employing SVC is adjusted in this control signaling;
Sending module is used for the control signaling that control signaling generation module generates is sent to server.
In embodiments of the present invention; The control signaling generation module of client is in the monitored results according to the quality of the video resource that self is play, when generating the control signaling, and the quality monitoring result that can send to this client according to the user; Confirm the monitored results of the quality of the video resource that self plays; Thereby generate the control signaling, can certainly be according to monitored results to the quality of the video resource self play, thus generate the control signaling.
In the monitored results of client, when generating the control signaling, because the occupancy of video resource that should broadcast in the client buffer district, can reflect the play quality of this video resource according to the quality of the video resource that self is play.Promptly when the occupation rate of the data message of the video resource that should play in this buffering area is big; Explain that the transmission quality between server and the client is better; For video resource clearly is provided to the user; Can suitably improve the play quality of video resource, when the occupancy of the data message of the video resource of this broadcast in this buffering area is low, explain that the transmission quality between current server and the client is relatively poor; For the fluency that guarantees that the user views and admires, need suitably to reduce the play quality of video resource.
Therefore in embodiments of the present invention; Client can detect the occupation rate of data message of the video resource of this broadcast of self buffer; Thereby confirm parameter information that the equivalent layer of the video resource that adopts SVC is adjusted; According to this parameter information of confirming, generate the control signaling of carrying this parameter information.For example when the occupancy of buffering area is lower than the first threshold interval of setting; Then the quality layers threshold value of the video resource of the employing SVC of definite this broadcast reduces; Or space layer or the reduction of time horizon threshold value; And confirm to adopt the quality layers threshold value of the video resource of SVC to reduce a unit to this, therefore generate the control signaling, carry parameter information in this control signaling to a unit of quality layers threshold value reduction of the video resource of this employing SVC.
Perhaps client also can be according to the transmission rate current to network; Interval according to this transmission rate corresponding threshold; The parameter information that generation is adjusted the equivalent layer of the video resource of the employing SVC of this broadcast according to this parameter information of confirming, generates the control signaling of carrying this parameter information.
When specifically realizing controlling the signaling generation, can directly operate through application programming interfaces to the internet message processing module (Source Filter) of client through client, thus the generation of realization control signaling.
Because the territory of RSTP is expanded, the control of server end to the transmission quality of this video resource can through the information that carry in this territory, be realized in the territory after this expansion when not influencing existing RSTP video broadcasting condition in embodiments of the present invention.
When concrete client is in embodiments of the present invention controlled the transmission of signaling through sending module, can in broadcast (PLAY) information of RSTP, expand a parameter field, for example this parameter field can be x-Send-Qid.Through can realizing embedding to the coding of this parameter field, and in this control signaling, carry the parameter information of adjusting of equivalent layer to the video resource of employing SVC to the control signaling.After the parameter field after this expansion has embedded the control signaling, can send according to the send mode of parameter among traditional RTSP.
Because the monitored results of the quality of the video resource that client can be play according to self; The control signaling of the parameter information that the equivalent layer of the video resource that adopts SVC is adjusted is carried in generation in real time; When this control signaling is transferred to server end; The parameter information that server can carry according to this control signaling of real-time reception carries out corresponding packet loss control to each packet of video resource waiting for transmission.
Receive the control signaling of client transmission when server after; Obtain the parameter information that the equivalent layer to the video resource that adopts SVC that carries in this control signaling is adjusted; According to this parameter information; And the value of the NalType information of the packet of this video resource waiting for transmission, whether the corresponding data bag of the video resource that adopts SVC is carried out the judgment processing of packet loss.Promptly after server receives the PLAY information that comprises this x-Send-Qid parameter field; Obtain the control signaling that embeds in this parameter field; Extract the parameter information that the equivalent layer to the video resource that adopts SVC that carries in this control signaling is adjusted; According to this parameter information, and the value of the NalType information of each packet of this video resource waiting for transmission, judge that whether this packet is carried out packet loss is handled.
After server has obtained the parameter information that the equivalent layer to the video resource that adopts SVC that carries in this control signaling adjusts, because the information that the message identification of this parameter is adjusted the equivalent layer threshold value of SVC.Therefore when this server has obtained this parameter information after, adjust according to the subsequent use interceptive value of space layer, time horizon and the quality layers of the video resource of this parameter information after to the employing SVC that transmits.Specifically comprise after receiving this parameter information; Interceptive value according to the equivalent layer of the video resource in a last moment of preserving; Reach the parameter information of in this control signaling the equivalent layer of video resource being adjusted, confirm the interceptive value of the equivalent layer of current time video resource.Adopt the interceptive value of the equivalent layer of the video resource that current time confirms, the interceptive value of the equivalent layer of last one video resource preserved is constantly upgraded.
For example in a last moment since the play quality of video resource than higher; Therefore to the interceptive value of space layer, quality layers and the time horizon of this video resource all than higher; All be maximum 3 for example, the interceptive value of the space layer of this video resource, quality layers and time horizon all is kept in the server.And this moment, because the occupancy of this video resource descends in the client buffer district, and according to this occupancy corresponding threshold interval, confirm to adopt time horizon, space layer and the quality layers of the video resource of SVC to adjust a unit respectively downwards to this.The parameter information that the subsequent use interceptive value to time horizon, space layer and the quality layers of the video resource of this employing SVC that client will be confirmed is adjusted a unit respectively downwards is carried in the control signaling, sends to server.
Receive the server of this control signaling; The parameter information that carries in this control signaling is obtained in parsing; Confirm this unit of interceptive value adjustment downwards of time horizon, space layer and the quality layers of this video resource constantly; I.e. this moment, server confirms that the subsequent use interceptive value of time horizon, space layer and the quality layers of this video resource all is 2.Server adopts the subsequent use interceptive value of time horizon, space layer and the quality layers of this this this video resource constantly of confirming that the subsequent use interceptive value of preserving corresponding time horizon, space layer and quality layers is upgraded; And combine the value of the NalType information of each packet waiting for transmission, judge whether this packet waiting for transmission carries out the packet loss processing to each.
To the video resource that transmits, owing in each Frame of this video resource, comprise a plurality of packets, each packet all has the NalType information that belongs to self; And the value of the NalType information that comprises in the packet of video resource is generally 1,5,14; 20,24,28.The value of the NalType information that therefore can comprise according to each packet waiting for transmission in embodiments of the present invention, and local subsequent use interceptive value information of preserving judge that whether each packet waiting for transmission is carried out packet loss is handled.
And; In embodiments of the present invention because client can be according to the quality situation of the video resource of self actual play; Generate the control signaling of carrying parameter information in real time; Therefore when server when receiving this parameter information after, confirm the corresponding subsequent use interceptive value of time horizon, space layer and quality layers of video resource constantly at this, and adopt this subsequent use interceptive value to upgrade the corresponding subsequent use interceptive value in a last moment of local preservation.When there is new packet waiting for transmission constantly in the next one, promptly adopt the subsequent use interceptive value after this renewal, and the value of the NalType information of this packet waiting for transmission, judge that whether this packet is carried out packet loss is handled.
When server for saving should be constantly behind subsequent use interceptive value to space layer, quality layers and the time horizon of video resource, according to the value of the NalType information of each packet of video resource waiting for transmission, judge that whether this packet is carried out packet loss is handled.
Owing to comprise a plurality of Frames, comprise a plurality of packets in each Frame, and each packet all comprises the value of corresponding N alType information in same Frame at video resource.And comprise its time horizon information in each packet, and space layer information, can think that promptly each packet all exists its time horizon mark and space layer mark.Mainly be because adopt the video resource of SVC; It has extensibility on spatial domain, time-domain and mass domain; Therefore it comprises a plurality of layers in spatial domain, time-domain and mass domain for video resource; Space layer, time horizon and quality layers that different packet is corresponding different, and corresponding space layer of packet and time horizon can be thought the space layer mark and the time horizon mark of this packet.And server can get access to the time horizon mark and the space layer mark that exist in the packet when each packet waiting for transmission is transmitted.
When this is 14 with the value of the NalType information of the packet of the video resource of transmission constantly; When promptly the packet of this video resource waiting for transmission is first packet of this Frame; Server adopts the corresponding subsequent use interceptive value of space layer, quality layers and time horizon of the local video resource of preserving, and replaces the corresponding interceptive value of space layer, quality layers and time horizon of this video resource.Block mark and be set to vacation, and determine whether that again blocking mark is set to very.Wherein block confirming of mark, should be according to last one time horizon interceptive value and the space layer interceptive value confirmed constantly, and the time horizon mark of notebook data bag and space layer mark are confirmed.The corresponding interceptive value of for example confirming when a last moment of this time horizon is 2, and the time horizon of this packet is labeled as 3, then puts to block to be labeled as very.Similar to the judgement of space layer and above-mentioned deterministic process to time horizon, here just do not give unnecessary details one by one.
Server detects the space layer mark and the time horizon mark of each packet in the current data frame, and whether judgement is carried out this packet needing the current mark that blocks before the packet loss processing, specifically comprises:
According to space layer mark, the time horizon mark of this packet, and the interceptive value of the equivalent layer of confirming, confirm to block mark.
Specifically comprise: when the packet waiting for transmission in the current data frame is not No. 14 packets; Whether the space layer mark that server detects current data packet equals in the corresponding interceptive value of space layer; And whether the quality layers mark of current data packet equals the quality layers interceptive value; When satisfying simultaneously, write the frame end mark, and block mark and be set to very.
Therefore because when writing the frame end mark, then in the middle of this frame, all subsequent packet are unwanted enhancement layer packets, can know that what block that mark shows is a kind of state of server, and expression will abandon in this frame, all packets after the current pack.Therefore need block mark is set to very.
When server begins to handle each non-No. 14 when bag, whether mark is blocked in identification is true, is labeled as true time when blocking, and server carries out packet loss with this packet to be handled.And for No. 14 bags, the step that mark is blocked in identification occurs in to be confirmed to block after the mark.Afterwards the packet after this packet is carried out subsequent treatment.Till the judgment processing of each packet in this Frame all having been carried out packet loss whether.
Fig. 3 for the embodiment of the invention provide when the NalType of this packet value of information is 14, corresponding dynamic packet loss control process may further comprise the steps in this process:
S301: server adopts the corresponding subsequent use interceptive value of space layer, quality layers and time horizon of the local video resource of preserving, and replaces the corresponding interceptive value of space layer, quality layers and time horizon of this video resource.
S302: server blocks mark and is set to vacation.
S303: server judges whether the space layer mark of this packet is not more than the corresponding interceptive value of space layer, when judged result when being, carry out step S305, otherwise, carry out step S304.
S304: server blocks mark and is set to very, and is labeled as true time recognizing to block, and this packet is carried out packet loss handle.Server is discerned the NalType value of information of next packet waiting for transmission afterwards, and handles accordingly.
S305: server is to this packet waiting for transmission, and whether the time horizon mark that detects this packet smaller or equal to the interceptive value of time horizon correspondence, when judged result when being, carry out step S306, otherwise, carry out step S307.
S306: server is discerned the NalType value of information of next packet waiting for transmission, and handles accordingly.
S307: server blocks mark and is set to very, and is labeled as true time recognizing to block, and this packet is carried out packet loss handle.Server is discerned the NalType value of information of next packet waiting for transmission afterwards, and handles accordingly.
When the value of the NalType information of the packet of video resource waiting for transmission in this server is 1 or 5, handle according to blocking mark.Be labeled as true time when blocking, this packet carried out packet loss handle.Otherwise; Judge then whether the corresponding interceptive value of quality layers is 0, and judge whether the interceptive value of present space layer correspondence equals the space layer mark of this packet, when judged result all when being; Then in this current packet, write the frame end mark, and put block be labeled as true.The time horizon space layer quality layers mark of the current pack of here mentioning is confirmed by last No. 14 bag.
Fig. 4 for the embodiment of the invention provide when the NalType of this packet value of information is 1 or 5, corresponding dynamic packet loss control process, this process may further comprise the steps:
S401: server judges whether the current mark that blocks is true, if true, then carries out step S402.Otherwise, carry out step S403.
S402: server should carry out the packet loss processing by packet waiting for transmission.Server is discerned the NalType value of information of next packet waiting for transmission afterwards, and handles accordingly.
S403: judge whether current quality layers interceptive value is 0, and judge whether the corresponding interceptive value of present space layer equals the space layer mark of this packet,, then write the frame end mark if be true, and put block be labeled as true.
S404: server is discerned the NalType value of information of next packet waiting for transmission, and handles accordingly.
When the value of the NalType information of packet waiting for transmission in this server is 14, block mark and be set to vacation, detect the space layer mark and the time horizon mark of this packet, confirm whether this packet need carry out packet loss and handle.Detailed process comprises:
Whether the space layer mark that server detects current packet waiting for transmission is not more than the corresponding interceptive value of space layer; When the space layer mark of this packet is not more than the interceptive value of space layer correspondence; This packet is not carried out any processing; When the space layer mark of this packet during, then block mark and be set to very greater than the corresponding interceptive value of space layer.Be labeled as true time when server recognizes to block, this packet carried out packet loss handle, server is to the value of the NalType information of discerning the packet after this packet afterwards, and handles accordingly.
Otherwise; Whether server detects this packet time horizon mark smaller or equal to the corresponding interceptive value of time horizon; When the time horizon mark of this packet is not more than the interceptive value of time horizon correspondence; Do not carry out any processing at this packet,, then block mark and be set to very when the time horizon mark of this packet during greater than the corresponding interceptive value of time horizon.Block mark and be set to true time when server recognizes, this packet is carried out packet loss handle, server is to the value of the NalType information of discerning the packet after this packet afterwards, and handles accordingly.
Because for No. 14 packets, its effect is to indicate space layer, time horizon, quality layers mark to 1 or No. 5 packet subsequently in fact.Therefore if judge at No. 14 bags write the frame end mark, packet that so should be after packet promptly writes this frame end mark in No. 1 or No. 5 packets.
Fig. 5 for the embodiment of the invention provide when the NalType of this packet value of information is 20, corresponding dynamic packet loss control process, this process may further comprise the steps:
S501: server detects whether the current mark that blocks is true, is labeled as true time when this blocks, and this packet is carried out packet loss handle, otherwise, carry out step S502.
S502: whether the quality layers mark of judging this packet equals the corresponding interceptive value of quality layers; And whether the corresponding interceptive value of space layer equals the space layer mark of current data packet, when judged result all when being, carry out step S503; Otherwise, carry out step S504.
S503: server writes the frame end mark in this packet, and put block be labeled as true.Carry out step S504 then.
S504: the value of the NalType information of the packet after this packet of server identification, and handle accordingly.
When the value of the NalType information of video resource packet waiting for transmission in the server is 24; Explain that this packet is the combination bag; Promptly in this current packet, comprise a plurality of data sub-packets,, detect the value of the NalType information of each data sub-packets to each data sub-packets; And operate accordingly according to the value of this NalType information, up to being detected, each data sub-packets in this packet finishes.Whether No. 24 bags write the frame end mark is confirmed by last height bag that wherein comprises.
When the value of the NalType information of server video resource packet waiting for transmission is 28; Explain that this packet is for splitting bag; The value of the NalType information of the data sub-packets that in this sequence of data packet, comprises is identical; Because comprise the value of NalType information in first data sub-packets in packet, confirm corresponding above-mentioned corresponding implementation, after the handled process of having confirmed this data sub-packets; For example, then each data sub-packets in this packet is carried out packet loss and handle the just packet loss processing of this data sub-packets.When this is operating as when this data sub-packets write the frame end mark accordingly, then in last data sub-packets of this packet, write the frame end mark.
The structural representation of a kind of dynamic packet loss control device based on scalable video SVC that Fig. 6 provides for the embodiment of the invention, said device comprises:
Receiver module 61; Be used to receive the control signaling that client is sent; To be said client generate according to the monitored results to the quality of the video resource self play wherein said control signaling, carries the parameter information that the equivalent layer of the video resource of employing SVC is adjusted in this control signaling;
Determination module 62 is used for resolving and obtains said parameter information, and according to the interceptive value of the equivalent layer of the video resource in a lasted moment of preserving, confirms the interceptive value of the equivalent layer of current time video resource;
Packet loss processing module 63 is used for the interceptive value according to the said equivalent layer of confirming, and the value of the NalType information of each packet of video resource waiting for transmission, judges that whether this packet is carried out packet loss is handled.
Said device also comprises:
Update module 64 is used to adopt the interceptive value of the equivalent layer of definite current time video resource, and the interceptive value of the equivalent layer of the video resource in last moment of preserving is upgraded.
Said packet loss processing module 63 specifically is used for; When the NalType of this packet waiting for transmission value of information is 14, blocks mark and be set to vacation, the space layer mark corresponding according to the data to be transmitted bag; And the space layer interceptive value of confirming; Determine whether to block mark and be set to very, be changed to true time, this packet is carried out packet loss handle when blocking mark; Be changed to fictitious time when blocking mark, according to this data to be transmitted bag time corresponding layer mark, and the time horizon interceptive value of confirming, determine whether to block mark and be set to very, be set to true time when blocking mark, this packet is carried out packet loss handle.
Said packet loss processing module 63 specifically is used for, and when the NalType of this packet waiting for transmission value of information is 1 or 5, judges whether be true, be labeled as true time when confirming to block if blocking mark, this packet is carried out packet loss handle.
Said packet loss processing module 63 also is used for, and is labeled as vacation when confirming to block, and the space layer mark of packet waiting for transmission equals the space layer interceptive value, and the quality layers interceptive value is 0 o'clock, writes the frame end mark, and put block be labeled as true.
Said packet loss processing module 63 specifically is used for, and when the NalType of this packet waiting for transmission value of information is 20, detects whether the current sign of blocking is true, when definite current blocking is labeled as true time, this packet is carried out packet loss handle.
Said packet loss processing module 63 also is used for, and when the space layer mark of this packet waiting for transmission equals the corresponding interceptive value of space layer, when this packet quality layers mark equals the corresponding interceptive value of quality layers, writes the frame end mark, and put block be labeled as true.
Said packet loss processing module 63 specifically is used for:
Whether the time horizon mark that detects No. 14 packets in the current data frame greater than the corresponding interceptive value of time horizon, when the time horizon mark of this packet during greater than the corresponding interceptive value of time horizon, be provided with block be labeled as true.
Said packet loss processing module 63 specifically is used for; Whether the space layer mark that detects No. 14 packets in the current data frame is greater than the corresponding interceptive value of space layer; When the space layer mark of this packet during greater than the corresponding interceptive value of space layer, be provided with block be labeled as true.
The embodiment of the invention provides a kind of dynamic packet loss control method, system and device based on SVC; The quality of the video resource of playing through the client detection in the method; And send the control command that quality is controlled to server; Server judges that through the NalType value of information of control command and packet waiting for transmission whether this packet is carried out packet loss is handled, in the embodiment of the invention since client through detecting the quality of the video resource of playing; Generation is carried out the control command that packet loss is handled to packet, so server can be in real time carries out dynamic packet loss processing according to the broadcast state of client.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technologies thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.