Embodiment
The embodiment of the present invention is in transmitting procedure, according to the difference of packet, carry out corresponding packet loss control, a kind of dynamic packet loss control method based on SVC is provided, in the method, client, according to actual transmission demand, generates and comprises the control signal of adjusting parameter, this control signal is sent to server end, server, according to this control signal, to each packet receiving, 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 present invention is elaborated.
Fig. 1 is the dynamic packet loss control process based on SVC that the embodiment of the present invention provides, and in this process, comprises the following steps:
S101: client, according to the monitored results to the play quality of video resource, generates control signal, wherein carries the parameter information to adopting the equivalent layer of the video resource of SVC to adjust in this control signal.
S102: client sends to server by this control signal generating.
S103: server receives this control signal, the parameter information that the equivalent layer to the video resource of employing SVC carrying in this control signal of parsing acquisition is adjusted.
S104: the described parameter information obtaining according to parsing, and the interceptive value of the equivalent layer of upper one video resource constantly of preserving, determine the interceptive value of the equivalent layer of current time video resource.
S105: server is according to the interceptive value of the described equivalent layer of determining, and the value of the NalType information of each packet of video resource waiting for transmission, whether judgement carries out packet loss processing to this packet.
In embodiments of the present invention in order to realize the dynamic packet loss control method based on SVC, to real-time streaming protocol (Real Time Streaming Protocol, RTSP) a territory is expanded, the communication between client and server is realized in the territory expanding to by this, and when server receives after the information of client transmission, according to this information, carry out corresponding data bag to be sent and carry out packet loss control.
The structural representation of the dynamic packet loss control system based on SVC that Fig. 2 provides for the embodiment of the present invention, comprises in this system: client 21 and server 22.
Wherein, client 21, for generating control signal according to the monitored results of the quality of the video resource that self is play, and sends to server 22 by described control signal, wherein, in this control signal, carry the parameter information to adopting the equivalent layer of the video resource of SVC to adjust;
Server 22, be used for receiving described control signal, the parameter information that the equivalent layer to the video resource of employing SVC carrying in this control signal of parsing acquisition is adjusted, and according to the interceptive value of the equivalent layer of the video resource in a upper moment of preserving, determine the interceptive value of the equivalent layer of current time video resource, according to the interceptive value of the described equivalent layer of determining, and the value of the NalType information of each packet of video resource waiting for transmission, whether judgement carries out packet loss processing to this packet.
This client 21 comprises:
Control signal generation module, for generating control signal according to the monitored results of the play quality of the video resource that self is play, wherein, carries the parameter information to adopting the equivalent layer of the video resource of SVC to adjust in this control signal;
Sending module, sends to server for the control signal that control signal generation module is generated.
In embodiments of the present invention, the monitored results of the quality of the video resource that the control signal generation module of client is play self in basis, while generating control signal, the quality monitoring result that can send to this client according to user, determine the monitored results of the quality of the video resource that self plays, thereby generation control signal, can certainly be according to the monitored results of the quality of the video resource that self is play, thereby generates control signal.
In client, according to the monitored results of the quality of the video resource that self is play, while generating control signal, due to the occupancy of the video resource of this broadcasting in client buffer district, can reflect the play quality of this video resource.When in this buffering area, the occupation rate of the data message of the video resource of this broadcasting is larger, illustrate that the transmission quality between server and client is better, for video resource is clearly provided to user, can suitably improve the play quality of video resource, when the occupancy of the data message of the video resource of this broadcasting in this buffering area is lower, illustrate that the transmission quality between current server and client is poor, for the fluency that guarantees that 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 broadcasting of self buffer, thereby determine the parameter information to adopting the equivalent layer of the video resource of SVC to adjust, according to this parameter information of determining, generate the control signal that carries this parameter information.For example, when the occupancy of buffering area is interval lower than the first threshold of setting, the quality layers threshold value of the video resource of the employing SVC of definite this broadcasting reduces, or space layer or the reduction of time horizon threshold value, and determine the quality layers threshold value of the video resource of this employing SVC is reduced to Yi Ge unit, therefore generate control signal, in this control signal, carry the parameter information that the quality layers threshold value of the video resource of this employing SVC is reduced to Yi Ge unit.
Or client also can be according to the transmission rate current to network, the threshold interval corresponding according to this transmission rate, the parameter information that generation is adjusted the equivalent layer of the video resource of the employing SVC of this broadcasting, according to this parameter information of determining, generates the control signal that carries this parameter information.
While generating by client specific implementation control signal, can directly to the internet message processing module of client (Source Filter), operate by application programming interfaces, thereby realize the generation of control signal.
Due to RSTP territory is expanded, the territory after this expansion can be when not affecting existing RSTP video broadcasting condition in embodiments of the present invention, and the information of carrying by this territory realizes the control of server end to the transmission quality of this video resource.
When concrete client is in embodiments of the present invention carried out the transmission of control signal by sending module, can in broadcasting (PLAY) information of RSTP, expand a parameter field, for example this parameter field can be: x-Send-Qid.By realizing the embedding to control signal to the coding of this parameter field, and in this control signal, carry the parameter information of adjusting to the equivalent layer of the video resource of employing SVC.Parameter field after this expansion has embedded after control signal, can send according to the send mode of parameter in traditional RTSP.
The monitored results of the quality of the video resource that can play according to self due to client, generate in real time the control signal that carries the parameter information that the equivalent layer of the video resource of employing SVC is adjusted, when this control signal is transferred to server end, the parameter information that server can carry according to this control signal of real-time reception, carries out corresponding packet loss control to each packet of video resource waiting for transmission.
When server receives after the control signal of client transmission, obtain in this control signal, carry to the parameter information that adopts the equivalent layer of the video resource of SVC to adjust, according to this parameter information, and the value of the NalType information of the packet of this video resource waiting for transmission, to adopting the corresponding data bag of the video resource of SVC to carry out the whether judgement of packet loss, process.When server receives after the PLAY information that comprises this x-Send-Qid parameter field, obtain the control signal embedding in this parameter field, extract in this control signal, carry to the parameter information that adopts the equivalent layer of the video resource of SVC to adjust, according to this parameter information, and the value of the NalType information of each packet of this video resource waiting for transmission, whether judgement carries out packet loss processing to this packet.
Server obtained in this control signal, carry to adopting after the parameter information that the equivalent layer of the video resource of SVC adjusts, the information of the equivalent layer threshold value of SVC being adjusted due to the message identification of this parameter.Therefore when this server has obtained after this parameter information, the standby interceptive value of space layer, time horizon and the quality layers of the video resource according to this parameter information after to the employing SVC transmitting is adjusted.Specifically comprise after receiving this parameter information, according to the interceptive value of the equivalent layer of the video resource in a upper moment of preserving, and the parameter information of in this control signal, the equivalent layer of video resource being adjusted, determine the interceptive value of the equivalent layer of current time video resource.The interceptive value that adopts the equivalent layer of the definite video resource of current time, upgrades the interceptive value of the equivalent layer of upper one video resource of constantly preserving.
For example in a upper moment because the play quality of video resource is higher, therefore all higher to the interceptive value of the space layer of this video resource, quality layers and time horizon, be for example all maximum 3, the interceptive value of the space layer of this video resource, quality layers and time horizon is all kept in server.And this moment, due to the occupancy decline of this video resource in client buffer district, and the threshold interval corresponding according to this occupancy, determine the time horizon, space layer and the quality layers difference adjustment downwards Yi Ge unit that this are adopted to the video resource of SVC.The parameter information that the standby interceptive value of time horizon, space layer and the quality layers of the video resource of this employing SVC is adjusted respectively to Yi Ge unit downwards that client is determined this is carried in control signal, sends to server.
Receive the server of this control signal, the parameter information carrying in this control signal is obtained in parsing, determine this constantly the interceptive value of time horizon, space layer and the quality layers of this video resource adjust Yi Ge unit downwards, now, server determines that the standby interceptive value of time horizon, space layer and the quality layers of this video resource is all 2.The standby interceptive value of time horizon, space layer and the quality layers of this this video resource constantly that server adopts that this determines upgrades preserving the standby interceptive value of corresponding time horizon, space layer and quality layers, and in conjunction with the value of the NalType information of each packet waiting for transmission, to each, whether this packet waiting for transmission carries out packet loss processing in judgement.
For the video resource transmitting, owing to comprising a plurality of packets in each Frame of this video resource, each packet has the NalType information that belongs to self, and the value of the NalType information comprising 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 standby interceptive value information of preserving, whether judgement carries out packet loss processing to each packet waiting for transmission.
And, in embodiments of the present invention because client can be according to the quality condition of the video resource of self actual play, generate in real time the control signal that carries parameter information, therefore when server is after receiving this parameter information, at this, constantly determine the standby interceptive value corresponding to time horizon, space layer and quality layers of video resource, and adopt this standby interceptive value to upgrade the corresponding standby interceptive value in a local upper moment of preserving.When constantly there is new packet waiting for transmission in the next one, adopt the standby interceptive value after this renewal, and the value of the NalType information of this packet waiting for transmission, whether judgement carries out packet loss processing to this packet.
When server preserved this moment to the standby interceptive value of the space layer of video resource, quality layers and time horizon after, according to the value of the NalType information of each packet of video resource waiting for transmission, judgement whether this packet is carried out to packet loss processing.
Owing to comprising a plurality of Frames at video resource, each Frame comprises a plurality of packets, and the value that each packet comprises corresponding NalType information in same Frame.And in each packet, comprise its time horizon information, and space layer information, can think that each packet exists its time horizon mark and space layer mark.Mainly because adopt the video resource of SVC, it has extensibility in spatial domain, time-domain and mass domain, therefore for video resource, it comprises a plurality of layers in spatial domain, time-domain and mass domain, space layer, time horizon and quality layers that different packet is corresponding different, and space layer corresponding to packet and time horizon can be thought space layer mark and the time horizon mark of this packet.And server, when each packet waiting for transmission is transmitted, can get the time horizon mark and the space layer mark that in packet, exist.
When this is 14 with the value of the NalType information of the packet of the video resource of transmission constantly, during the first packet that packet of this video resource waiting for transmission is this Frame, server adopts the standby interceptive value corresponding to space layer, quality layers and time horizon of the local video resource of preserving, and replaces the interceptive value corresponding to space layer, quality layers and time horizon of this video resource.Block mark and be set to vacation, and again determine whether that blocking mark is set to very.Wherein block determining of mark, should be according to upper one constantly definite time horizon interceptive value and space layer interceptive value, and the time horizon mark of notebook data bag and space layer mark are determined.For example, when upper one interceptive value corresponding to this time horizon of constantly determining is 2, the time horizon of this packet is labeled as 3, 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 repeat one by one.
Server detects space layer mark and the time horizon mark of each packet in current data frame, before whether judgement carries out packet loss processing to this packet, needs the current mark that blocks, and specifically comprises:
According to the space layer mark of this packet, time horizon mark, and the interceptive value of definite equivalent layer, determine and block mark.
Specifically comprise: when the packet waiting for transmission in current data frame is not 14 number bag, the space layer that server detects current data packet marks whether to equal in interceptive value corresponding to space layer, and the quality layers of current data packet marks whether to equal quality layers interceptive value, when meeting simultaneously, write frame end mark, and block mark and be set to very.
Because when writing frame end mark,, in the middle of this frame, all subsequent packet are unwanted enhanced layer packets, and therefore known what block that mark shows is a kind of state of server, and expression will abandon in this frame, all packets after current bag.Therefore need to block mark is set to very.
When server starts to process each non-No. 14 bag, identification blocks to mark whether to be true, when blocking, is labeled as true time, and server carries out packet loss processing by this packet.And for No. 14 bags, after the step that mark is blocked in identification occurs in and determines and block mark.Afterwards the packet after this packet is carried out to subsequent treatment.Until having been carried out to the whether judgement of packet loss, processes each packet in this Frame.
Fig. 3 for the embodiment of the present invention provide when the NalType of this packet value of information is 14, corresponding dynamic packet loss control process comprises the following steps in this process:
S301: server adopts the standby interceptive value corresponding to space layer, quality layers and time horizon of the local video resource of preserving, replaces the interceptive value corresponding to space layer, quality layers and time horizon of this video resource.
S302: server blocks mark and is set to vacation.
S303: server judges that the space layer of this packet marks whether to be not more than interceptive value corresponding to space layer, when judgment result is that while being, carries out step S305, otherwise, carry out step S304.
S304: server blocks mark and is set to very, and be labeled as true time recognizing to block, this packet is carried out to packet loss processing.The NalType value of information of the next packet waiting for transmission of server identification afterwards, and process accordingly.
S305: server is for this packet waiting for transmission, and the time horizon that detects this packet marks whether to be less than or equal to the interceptive value that time horizon is corresponding, when judgment result is that while being, carries out step S306, otherwise, carry out step S307.
S306: the NalType value of information of the next packet waiting for transmission of server identification, and process accordingly.
S307: server blocks mark and is set to very, and be labeled as true time recognizing to block, this packet is carried out to packet loss processing.The NalType value of information of the next packet waiting for transmission of server identification afterwards, and process accordingly.
When in this server, the value of the NalType information of the packet of video resource waiting for transmission is 1 or 5, according to blocking mark, process.When blocking, be labeled as true time, this packet is carried out to packet loss processing.Otherwise, judge whether interceptive value corresponding to quality layers is 0, and judge whether interceptive value corresponding to current space layer equals the space layer mark of this packet, when judged result is all when being, in this current data packet, write frame end mark, juxtaposition is blocked and is labeled as very.The time horizon space layer quality layers mark of the current bag of herein mentioning, is determined by upper No. 14 bag.
Fig. 4 for the embodiment of the present invention provide when the NalType of this packet value of information is 1 or 5, corresponding dynamic packet loss control process, this process comprises the following steps:
S401: current the blocking of server judgement marks whether to be true, if true, carries out step S402.Otherwise, carry out step S403.
S402: server carries out packet loss processing by this packet waiting for transmission.The NalType value of information of the next packet waiting for transmission of server identification afterwards, and process accordingly.
S403: judge whether current quality layers interceptive value is 0, and judge whether interceptive value corresponding to current space layer equals the space layer mark of this packet, if be very, write frame end mark, juxtaposition is blocked and is labeled as very.
S404: the NalType value of information of the next packet waiting for transmission of server identification, and process accordingly.
When the value of the NalType information of packet waiting for transmission is 14 in this server, blocks mark and be set to vacation, detect space layer mark and the time horizon mark of this packet, determine whether this packet needs to carry out packet loss processing.Detailed process comprises:
The space layer that server detects current packet waiting for transmission marks whether to be not more than interceptive value corresponding to space layer, when the space layer mark of this packet is not more than interceptive value corresponding to space layer, this packet is not carried out to any processing, when the space layer mark of this packet is greater than interceptive value corresponding to space layer, blocks mark and be set to very.When server recognizes to block, be labeled as true time, this packet is carried out to packet loss processing, server is to identifying the value of the NalType information of the packet after this packet afterwards, and processes accordingly.
Otherwise, server detects this packet time horizon and marks whether to be less than or equal to the interceptive value that time horizon is corresponding, when the time horizon mark of this packet is not more than interceptive value corresponding to time horizon, at this packet, do not carry out any processing, when the time horizon mark of this packet is greater than interceptive value corresponding to time horizon, blocks mark and be set to very.When server recognizes, block mark and be set to true time, this packet is carried out to packet loss processing, server is to identifying the value of the NalType information of the packet after this packet afterwards, and processes accordingly.
Because for 14 number Bao Eryan, its effect is to indicate space layer, time horizon, quality layers mark to 1 or 5 number bags subsequently in fact.Therefore, if should write frame end mark No. 14 bag judgements, packet that so should be after packet, writes this frame end mark in No. 1 or 5 number bags.
Fig. 5 for the embodiment of the present invention provide when the NalType of this packet value of information is 20, corresponding dynamic packet loss control process, this process comprises the following steps:
S501: server detects current blocking and marks whether to be true, is labeled as true time when this blocks, and this packet is carried out to packet loss processing, otherwise, carry out step S502.
S502: the quality layers that judges this packet marks whether to equal interceptive value corresponding to quality layers, and whether interceptive value corresponding to space layer equals the space layer mark of current data packet, when judged result is all when being, carry out step S503, otherwise, carry out step S504.
S503: server writes frame end mark in this packet, juxtaposition is blocked and is labeled as very.Then carry out step S504.
S504: server is identified the value of the NalType information of the packet after this packet, and processes accordingly.
When in server, the value of the NalType information of video resource packet waiting for transmission is 24, illustrate that this packet is for combination bag, in this current data packet, comprise a plurality of data sub-packets, for each data sub-packets, detect the value of the NalType information of each data sub-packets, and operate accordingly according to the value of this NalType information, until detect complete to each data sub-packets in this packet.Whether No. 24 bags write frame end mark is determined by last attached bag wherein comprising.
When the value of the NalType information of server video resource packet waiting for transmission is 28, illustrate that this packet is for splitting bag, the value of the NalType information of the data sub-packets comprising in this sequence of data packet is identical, because the value that comprises NalType information in first data sub-packets in packet, determine corresponding above-mentioned corresponding implementation, after having determined the respective handling process of this data sub-packets, for example, to the just packet loss processing of this data sub-packets, each data sub-packets in this packet is carried out to packet loss processing.When this is operating as when this data sub-packets is write to frame end mark accordingly, in last data sub-packets of this packet, write 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 present invention, described device comprises:
Receiver module 61, the control signal sending for receiving client, wherein said control signal is that described client generates according to the monitored results of the quality of the video resource that self is play, and carries the parameter information to adopting the equivalent layer of the video resource of SVC to adjust in this control signal;
Determination module 62, obtains described parameter information for resolving, and according to the interceptive value of the equivalent layer of the video resource in a upper moment of preserving, determines the interceptive value of the equivalent layer of current time video resource;
Packet loss processing module 63, the interceptive value of the described equivalent layer of determining for basis, and the value of the NalType information of each packet of video resource waiting for transmission, whether judgement carries out packet loss processing to this packet.
Described device also comprises:
Update module 64, for adopting the interceptive value of the equivalent layer of definite current time video resource, upgraded the interceptive value of the equivalent layer of the video resource in a upper moment of preserving.
Described packet loss processing module 63 specifically for, when the NalType of this packet waiting for transmission value of information is 14, block mark and be set to vacation, the space layer mark corresponding according to data to be transmitted bag, and definite space layer interceptive value, determine whether to block mark and be set to very, when blocking mark, be set to true time, this packet is carried out to packet loss processing; When blocking mark, be set to fictitious time, the time horizon mark corresponding according to this data to be transmitted bag, and definite time horizon interceptive value, determine whether to block mark and be set to very, when blocking mark, is set to true time, and this packet is carried out to packet loss processing.
Described packet loss processing module 63 specifically for, when the NalType of this packet waiting for transmission value of information is 1 or 5, judgement blocks to mark whether to be true, when determining to block, is labeled as true time, and this packet is carried out to packet loss processing.
Described packet loss processing module 63 also for, when determining to block, be labeled as vacation, the space layer mark of packet waiting for transmission equals space layer interceptive value, and quality layers interceptive value is 0 o'clock, writes frame end mark, juxtaposition block be labeled as true.
Described packet loss processing module 63 specifically for, when the NalType of this packet waiting for transmission value of information is 20, whether be true, when definite current blocking is labeled as true time, this packet is carried out to packet loss processing if detecting the current sign of blocking.
Described packet loss processing module 63 also for, when the space layer mark of this packet waiting for transmission equals interceptive value corresponding to space layer, when this packet quality layers mark equals interceptive value corresponding to quality layers, write frame end mark, juxtaposition block be labeled as true.
Described packet loss processing module 63 specifically for:
The time horizon that detects 14 number bags in current data frame marks whether to be greater than the interceptive value that time horizon is corresponding, when the time horizon mark of this packet is greater than interceptive value corresponding to time horizon, arrange block be labeled as true.
Described packet loss processing module 63 specifically for, the space layer that detects 14 number bags in current data frame marks whether to be greater than interceptive value corresponding to space layer, when the space layer mark of this packet is greater than interceptive value corresponding to space layer, arrange block be labeled as true.
The embodiment of the present invention provides a kind of dynamic packet loss control method based on SVC, system and device, in method, by client, detect the quality of the video resource of playing, and the control command of quality being controlled to server transmission, server is by the NalType value of information of control command and packet waiting for transmission, whether judgement carries out packet loss processing to this packet, the quality of the video resource of playing by detection due to client in the embodiment of the present invention, the control command that raw paired data bag carries out packet loss processing, therefore server can carry out dynamic packet loss processing according to the broadcast state of client in real time.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.