Background technology
For real-time video, voice communication; Usually by the encoder of coding side (being transmitting terminal) video, the audio-frequency information gathered are encoded; Produce a series of packet; And according to RTP (Real-time Transport Protocol, real-time Transmission) agreement through transmission channel with the packet that coding side produces, be sent to decoding end; The decoder of decoding end (being receiving terminal) is decoded to the packet of receiving, recovers original video, audio frequency.But, on transmission channel during the real-time code stream of transmission, because the packet loss or the error code of channel existence itself; There is not QoS (Quality of Service especially; Service quality) on the network that guarantees, packet may produce packet loss in transmission course, in case decoding end receives the packet of packet loss; Decoder is correctly to recover original video, audio frequency, thus the error control measure to take be very important.
In order to reduce the influence of Network Packet Loss to video, audio frequency real time communication; Prior art adopts various error control methods usually; As forward error correction (Forward Error Correction, open FEC), soon repeat requests (Automatic Repeat Request, ARQ) and bag-losing hide (Packet Loss Concealment; PLC) etc., bag-losing hide is also referred to as the back to error correction.
Wherein, prior art one adopts forward error correction FEC method, increases redundant data packets at transmitting terminal, when receiving terminal receives the packet of packet loss, can the data of packet loss recovered out through some computings.With shown in Figure 1 is that example describes, and the packet sequence number of transmitting terminal is: 1,2,3,4, and increase redundant data packets at transmitting terminal through computing to packet, and obtain 5 as carrying out computing to 1 and 2, carry out computing acquisition 6 to 3 and 4; Because packet loss occurs on the network, the sequence number that has caused receiving terminal to receive is discontinuous, promptly 2 and 4 have been lost; Receiving terminal obtains 2 and 4 through 1,3,5,6 carrying out computing to what receive, and therefore, sequence number is that 1,2,3,4 packet has all obtained recovery.Prior art one is carried out error control through increasing redundant data packets; Reduced the effective rate of utilization of communication network, in the above-mentioned example, the active data bag is 1,2,3,4; Redundant packet 5,6, thereby the effective rate of utilization of this communication network is 4/6=2/3.Therefore, under the certain situation of total bandwidth, the effective rate of utilization of communication network is high more; More bandwidth can be used for the transmission of video/audio bag; So just can obtain better to look audio quality, its essence is the quality of looking audio frequency with sacrifice, exchange the ability of anti-packet loss for.
Prior art two adopts the repeat requests ARQ method that opens soon; Receiving terminal is through detecting RTP (the Real-time Transport Protocol in the packet that receives; Real time transport protocol) sequence number; The request transmitting terminal passes the bag of losing once more again fast after finding packet loss, and this kind error control method solves the Network Packet Loss effect under little time-delay, little packet loss situation better.With shown in Figure 2 is that example describes, and transmitting terminal has sent 10 bags, and its sequence number increases progressively continuously; Because packet loss appears in network, the sequence number that has caused receiving terminal to receive is discontinuous, promptly loses 4 bags in 10 bags; Receiving terminal is through ARQ, and the request transmitting terminal has retransmitted 4 bags losing, and wherein wrapping in effective time of sequence number 7,8 retransmitted; Sequence number 2,4 possibly lost in retransmission processes, and it is overtime invalid also possibly to retransmit.But; Because the packet that retransmits also is to take the network bandwidth; If a large amount of packet losses will produce a large amount of data retransmissions, and network is when producing a large amount of packet loss; Be likely that data quantity transmitted has surpassed communication network bandwidth, network has had congested situation in other words, use in this case and open retransmission request method soon and solve the packet loss problem and only can worsen network condition.
Prior art three adopts the back to error correction PLC method, when receiving terminal has packet loss, through the relevance before the data of front and back, utilizes the error concealment algorithm, the transmission behind the smoother processing packet loss.According to the difference of medium type, and the difference of actual scene, can produce under some situation and cover effect preferably, the people may can not discover, and he just can't accomplishes under some situation to make the people discover less than.
In the process that realizes the embodiment of the invention, the inventor finds that there is following problem at least in prior art:
FEC increases redundant data packets through coding side and carries out error control, can reduce the effective rate of utilization to bandwidth, is applicable to the less demanding situation of audio quality; ARQ carries out error control through retransmission data packet may, because the packet that retransmits also is to take the network bandwidth, if a large amount of packet loss will produce a large amount of data retransmissions, ARQ is applicable to the situation of little packet loss, little time-delay; PLC is the method at a kind of error concealment of decoding end, and for different medium types and actual scene, the effect of PLC is different.
It is thus clear that; Existing error control method because the situation that the principle difference can be suitable for is also different, can only adopt a kind of mode among ARQ, PLC or the FEC to carry out error control; Form to the error control of network is more single, and the anti-packet loss ability of error control is lower.
Summary of the invention
In order to improve the anti-packet loss ability of error control; The embodiment of the invention provides a kind of error-control method, receiving terminal, transmitting terminal and system; Through the multiple error control method of comprehensive use; Improved utilization of network bandwidth on the one hand, under the cooperation of multiple error control method, reached and look the audio frequency effect global optimum on the other hand.Said technical scheme is following:
A kind of error-control method, said method comprises:
The initial packet loss of obtaining communication network and the network delay of communication network;
Whether the initial packet loss of judging said communication network is less than preset first packet loss that opens repeat requests soon of launching, and whether the network delay of said communication network is less than preset delay threshold;
If the initial packet loss of said communication network is less than preset first packet loss that opens repeat requests soon of launching, and network delay then adopts the mode that opens repeat requests soon to carry out error control less than preset delay threshold.
The embodiment of the invention provides another kind of error control method, and said method comprises:
Send packet to receiving terminal;
Obtain receiving terminal feedback communication network initial packet loss with adopt second packet loss that opens soon after the repeat requests, and obtain the 3rd packet loss according to the initial packet loss of said communication network and the difference of said second packet loss;
Whether judge said the 3rd packet loss less than the 4th preset packet loss,, then improve the parameter that opens repeat requests soon if the 3rd packet loss is not 0 less than preset the 4th packet loss and said the 3rd packet loss; If said the 3rd packet loss is 0, then reduce the parameter that opens repeat requests soon.
The embodiment of the invention also provides a kind of receiving terminal, and said receiving terminal comprises acquisition module, first judge module and control module;
Said acquisition module is used for the initial packet loss of obtaining communication network and the network delay of communication network;
Whether the initial packet loss that said first judge module is used to judge said communication network is less than preset first packet loss that opens repeat requests soon of launching, and whether the network delay of said communication network is less than preset delay threshold;
Said control module be used for when the judged result of said first judge module when being, adopt the mode that opens repeat requests soon to carry out error control.
The embodiment of the invention also provides a kind of transmitting terminal, and said transmitting terminal comprises sending module, first acquisition module and first judge module;
Said sending module is used for sending packet to receiving terminal;
Said first acquisition module be used to obtain the receiving terminal feedback communication network initial packet loss with adopt second packet loss that opens soon after the repeat requests, and obtain the 3rd packet loss according to the initial packet loss of said communication network and the difference of said second packet loss;
Whether said first judge module is used to judge said the 3rd packet loss less than the 4th preset packet loss, if the 3rd packet loss is not 0 less than preset the 4th packet loss and said the 3rd packet loss, then improves the parameter that opens repeat requests soon; If said the 3rd packet loss is 0, then reduce the parameter that opens repeat requests soon.
The embodiment of the invention also provides a kind of system of error control, and said system comprises receiving terminal and transmitting terminal;
Said receiving terminal comprises acquisition module, first judge module and control module; Said acquisition module is used for the initial packet loss of obtaining communication network and the network delay of communication network; Whether the initial packet loss that said first judge module is used to judge said communication network is less than preset first packet loss that opens repeat requests soon of launching, and whether the network delay of said communication network is less than preset delay threshold; Said control module be used for when the judged result of said first judge module when being, adopt the mode that opens repeat requests soon to carry out error control;
Said transmitting terminal comprises sending module, first acquisition module and first judge module; Said sending module is used for sending packet to receiving terminal; Said first acquisition module be used to obtain the receiving terminal feedback communication network initial packet loss with adopt second packet loss that opens soon after the repeat requests, and obtain the 3rd packet loss according to the initial packet loss of said communication network and the difference of said second packet loss; Whether said first judge module is used to judge said the 3rd packet loss less than the 4th preset packet loss, if the 3rd packet loss is not 0 less than preset the 4th packet loss and said the 3rd packet loss, then improves the parameter that opens repeat requests soon; If said the 3rd packet loss is 0, then reduce the parameter that opens repeat requests soon.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is: the situation of change through network condition is used different error control methods; And comprehensively use multiple error control method; Raising is to effective utilization of communication network, and having reached has better anti-packet loss effect under higher communication network utilance.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, will combine accompanying drawing that embodiment of the present invention is done to describe in detail further below.
With regard to a certain error control method, because the concrete difference that adopts principle and realize, the effect of anti-packet loss also can be different, maybe be than the anti-packet loss better effects if of FEC_B method such as the FEC_A method.What the embodiment of the invention was paid close attention to is not because the difference that the difference of error control method causes; But when the multiple error control method of comprehensive use; Situation of change according to network condition is used different error control methods, thereby obtains higher communication network utilance and look audio frequency effect preferably.
Embodiment 1
Referring to Fig. 3, present embodiment provides a kind of error-control method, and this method specifically comprises:
101: the initial packet loss of obtaining communication network and the network delay of communication network;
102: whether the initial packet loss of judging communication network is less than preset first packet loss that opens repeat requests soon of launching, and whether the network delay of communication network is less than preset delay threshold;
103: if the initial packet loss of communication network is less than preset first packet loss that opens repeat requests soon of launching, and network delay then adopts the mode that opens repeat requests soon to carry out error control less than preset delay threshold.
The method that present embodiment proposes; Situation of change through network condition is used different error control methods; And comprehensively use multiple error control method, and improve effective utilization to communication network, having reached has better anti-packet loss effect under higher communication network utilance.
Embodiment 2
Referring to Fig. 4, the embodiment of the invention has proposed a kind of error-control method, specifically comprises:
201: transmitting terminal sends to receiving terminal through Real-time Transport Protocol with this packet to video, the audio-frequency information the gathered generation packet of encoding, and comprises the RTP sequence number in this packet at least;
Particularly; Packet form with real-time code stream on transmission channel is transmitted; Lose sign indicating number or error code because channel itself exists, receiving terminal may receive the packet of packet loss, generally makes receiving terminal correctly recover original video, audio-frequency information through error control method.
202: receiving terminal is launched network delay and is detected, and detects the network delay of communication network, and according to the initial packet loss of RTP sequence number obtaining communication network, to the initial packet loss of transmitting terminal feedback communication network;
For this step, receiving terminal is a prior art according to the initial packet loss of RTP sequence obtaining communication network and the step of feeding back to transmitting terminal, and present embodiment does not elaborate to this.Wherein, receiving terminal is through the initial packet loss of RTCPRR message feedback communication network.
203: receiving terminal judges whether to satisfy the condition of launching ARQ according to the initial packet loss of communication network, the network delay of communication network, if satisfy, then launches ARQ and carries out error control, execution in step 204; Otherwise, execution in step 208;
For this step; Preset packet loss and the delay threshold of launching ARQ of receiving terminal; The condition of launching ARQ is specially: the network delay of communication network is less than preset delay threshold; And the initial packet loss of communication network satisfies this condition less than the preset packet loss that ARQ carries out error control of launching if receiving terminal is judged the initial packet loss of communication network and the network delay of communication network, then launches ARQ and carries out error control; If do not satisfy, then do not launch ARQ, need to solve with other error-control method.
204: second packet loss of receiving terminal after the transmitting terminal feedback is launched ARQ; Whether the initial packet loss of judging communication network is greater than second packet loss of launching behind the ARQ; If initial packet loss then carries out error control according to the adjusted parameter that opens repeat requests soon greater than second packet loss, if initial packet loss is less than second packet loss; Then stop ARQ, execution in step 208;
In the practical application, launch ARQ after, second packet loss that receiving terminal will be launched behind the ARQ feeds back to transmitting terminal in real time, particularly, receiving terminal expansion RTCP XR message feedback is launched second packet loss behind the ARQ.The embodiment of the invention does not limit the mode of expansion RTCP XR message, can carry second packet loss of launching behind the ARQ as long as satisfy RTCPXR message after the expansion.
If the initial packet loss of communication network explains then that greater than second packet loss of launching behind the ARQ mode that adopts ARQ to carry out error control can partly solve the problem of Network Packet Loss at least under current network condition.Owing to solve Network Packet Loss through ARQ, can't harm for looking audio quality, so in this case, can continue to solve Network Packet Loss through ARQ as far as possible.And, just need other error-control method to solve for the packet loss that can't solve network through ARQ, like step 206.
If the initial packet loss of communication network is not more than second packet loss of launching behind the ARQ; Then explain under current network condition; The packet that retransmits maybe be because packet loss or overtime invalid; Receiving terminal still has part to retransmit, and the packet that opens repeat requests and re-transmission soon may cause the further deterioration of network condition, and can current network condition not made moderate progress; This moment, the suitable employing AQR that continues solved Network Packet Loss, thereby adopted other error control method to solve Network Packet Loss.If on the communication network of limited bandwidth; Because with other professional shared same communication networks; Possible other professional current network traffics are bigger, make total bandwidth surpass communication network bandwidth and caused packet loss that this situation adopts and opens the congested of re-transmission meeting emphasis network soon.Therefore, present embodiment stops ARQ in this case, and adopts other error control method to solve, like step 206.
205: transmitting terminal obtain receiving terminal feedback communication network initial packet loss with adopt second packet loss that opens soon after the repeat requests, and obtain the 3rd packet loss according to the initial packet loss and second packet loss of communication network;
Particularly, through receiving the RTCP XR message of RTCP RR message and expansion, second packet loss after the repeat requests is opened in initial packet loss and the employing that gets access to the communication network of receiving terminal feedback soon.Wherein, carry the initial packet loss of communication network in the RTCP RR message, carry second packet loss of launching behind the ARQ in the RTCP XR message of expansion.Abbreviate treatable the 3rd packet loss of current ARQ as the 3rd packet loss in the embodiment of the invention.Particularly, second packet loss behind the initial packet loss of the 3rd packet loss=communication network-the launch ARQ; The parameter that opens repeat requests in the present embodiment soon comprises the number of times of re-transmission at least, and continuous packet loss number etc., the parameter that repeat requests is opened in adjustment soon specifically comprise parameter that raising opens repeat requests soon and reduce the parameter that opens repeat requests soon;
206: transmitting terminal is judged said the 3rd packet loss whether less than the 4th preset packet loss, if less than and said the 3rd packet loss be not 0, then improve the parameter that opens repeat requests soon; If said the 3rd packet loss is 0, then reduce the parameter that opens repeat requests soon.
The preset treatable packet loss of ARQ abbreviates treatable the 4th packet loss of this ARQ as the 4th packet loss in the embodiment of the invention.
Particularly, if the 3rd packet loss<the 4th packet loss, and the 3rd packet loss is not 0; Can judge that then employing opens the mode of repeat requests soon and can solve the packet loss problem in the current network; And attempt improving the ARQ parameter, promptly improve the number of times that retransmits, and improve continuous packet loss number; Preferably, the treatable packet loss of the ARQ that presets can be identical with the preset packet loss of launching ARQ, also can be less than the preset packet loss of launching ARQ.
If the 3rd packet loss is 0, can judge that then ARQ can't solve the packet loss problem in the current network, and attempt reducing the ARQ parameter, promptly reduce the number of times that ARQ retransmits, and reduce continuous packet loss number.
Below, present embodiment describes the method for dynamic adjustment ARQ parameter through an object lesson:
The 4th packet loss=5% that the ARQ that supposes initially to preset can handle, the number of times 2 that ARQ retransmits, packet loss number 2 continuously.
If treatable the 3rd packet loss of current ARQ=3%; Initial packet loss=7% of communication network then satisfy treatable the 4th packet loss 5% of ARQ of treatable the 3rd packet loss 3% of current ARQ<preset, and treatable the 3rd packet loss of current ARQ is not 0; Can judge that ARQ can partly solve the packet loss problem in the current network; And attempt improving number of retransmissions, improve continuous packet loss number, as can number of retransmissions being risen to 3; The packet loss number rises to 3 continuously, so more helps solving the burst packet loss problem in the network.
If treatable the 3rd packet loss of current ARQ=0%, the initial packet loss of communication network is 7%, can judge that then ARQ can't solve the packet loss problem in the current network; And attempt reducing number of retransmissions; Reduce continuous packet loss number, as can number of retransmissions being reduced to 1, the packet loss number is reduced to 1 continuously; Even lower, avoided the invalid impact of ARQ like this to network.
207: transmitting terminal feeds back to receiving terminal with the adjusted parameter that opens repeat requests soon, so that receiving terminal carries out error control according to the adjusted parameter that opens repeat requests soon;
208: receiving terminal judges whether to launch the back and carries out error control to error correction PLC or forward error correction FEC;
Particularly, whether receiving terminal is effective to the medium type of packet according to PLC, judges whether to launch PLC; In the practical application, possibly comprise multiple medium type (like video, audio frequency etc.) in the packet that receiving terminal receives, effective as presetting PLC to video type, effective to audio types, then can using PLC solve the problem of the packet loss of video type.
209: if PLC is effective to the medium type of packet; Then launch PLC and carry out error control; And the 5th packet loss that will launch behind the PLC feeds back to transmitting terminal, so that transmitting terminal judges whether to launch FEC and carries out error control, execution in step 210 according to launching the 5th packet loss behind the PLC; Otherwise, execution in step 211.
Particularly, receiving terminal expansion RTCP XR message makes it carry the packet loss of launching behind the PLC, and the packet loss that will launch behind the PLC through expansion RTCP XR message feeds back to transmitting terminal.Present embodiment launched PLC for the medium type that can solve the packet loss problem through PLC, and the RTCP XR message of the 5th packet loss through expansion that will launch behind the PLC feed back to transmitting terminal, thereby transmitting terminal can get access to the 5th packet loss of launching behind the PLC.
For the medium type that can't solve the packet loss problem through PLC, then do not launch PLC, second packet loss that just will launch behind the ARQ feeds back to transmitting terminal, makes transmitting terminal judge whether to launch FEC according to second packet loss of launching behind the ARQ.
Wherein, referring to Fig. 5, in the present embodiment; Transmitting terminal sends the RCP message to receiving terminal; The RTCP XR message (step 204 and 207) of receiving terminal after transmitting terminal feedback RTCP RR message (step 202) and expansion, the RCP message is used for transmitting the RCP sequence number, and RTCP RR message is used for the packet loss of feedback communication network; Present embodiment is expanded RTCP XR message on the basis of RFC 3611; Be used to feed back the packet loss launched behind the ARQ and the packet loss of launching behind the PLC, the embodiment of the invention does not limit the mode of expansion RTCP RR message, can carry second packet loss launched behind the ARQ and the 5th packet loss of launching behind the PLC as long as satisfy RTCP XR message after the expansion; The embodiment of the invention provides a kind of extended mode; As shown in Figure 6, block type (BT) is 8bits, and the packet loss type of carrying in the RTCP XR message of expression expansion orientates 8 as; Reserved is 8bits, the expression reserved field; Block length is 16bits, the length of representative domain; SSRC of source is 32bits, expression source sign; ARQ loss rate is 8bits, and the packet loss behind the ARQ is used in expression; PLC loss rate is 8bits, the packet loss behind the expression using PLC.
210: transmitting terminal obtains the 5th packet loss behind the employing PLC of receiving terminal feedback, and judges whether to launch FEC and carry out error control according to launching the 5th packet loss behind the PLC;
Wherein, transmitting terminal judges whether to launch FEC and carries out error control according to launching the 5th packet loss behind the PLC, specifically comprises, transmitting terminal judges whether the 5th packet loss of launching behind the PLC is 0, if be not 0, then execution in step 212.If the packet loss that the transmitting terminal judgement is launched behind the PLC is not 0, then show the current packet loss that also exists, transmitting terminal will be launched FEC and carry out error control.
211: transmitting terminal judges whether to launch FEC and carries out error control according to launching second packet loss behind the ARQ;
Particularly, receiving terminal is only launched ARQ and is carried out error control, promptly when after after the mode of error correction is invalid to the medium type of packet, transmitting terminal judges whether second packet loss of launching behind the ARQ of receiving terminal feedback is 0, if be not 0, then execution in step 212.
212: transmitting terminal is launched FEC and is carried out error control.
Particularly; Transmitting terminal presets the packet loss of communication network and the corresponding relation of FEC redundancy parameter; Transmitting terminal is according to packet loss and this corresponding relation of current communication network; Obtain the corresponding FEC redundancy parameter of this current communication network packet loss, and carry out error control according to this FEC redundancy parameter.
In the practical application, when adopting ARQ and PLC to carry out error control as if receiving terminal, the current communication network packet loss of this moment is specially initial packet loss-second packet loss-the 5th packet loss of communication network; When if receiving terminal only adopts ARQ to carry out error control, the initial packet loss that the current communication network packet loss of this moment is specially communication network deducts second packet loss.
Further; Transmitting terminal also can preset the corresponding relation of communication network packet loss, FEC redundancy parameter and communication network utilance; After transmitting terminal is launched FEC,, obtain the corresponding FEC redundancy parameter of this current communication network packet loss according to current communication network packet loss and this corresponding relation; Thereby the FEC redundancy parameter according to correspondence is carried out error control, can know current communication network utilance.Wherein, the communication network utilance is meant (packet-redundant data packets)/packet, and the communication network utilance that present embodiment is corresponding according to the redundancy parameter can be known current communication network utilance.
Referring to table 1; Present embodiment presets three intervals of the packet loss of communication network, and each an interval corresponding FEC redundancy parameter and communication network utilance are if current communication network packet loss drops on a certain threshold interval; Just adopt corresponding redundant degree parameter, carry out error control.
Table 1
The communication network packet loss |
FEC redundancy parameter |
The communication network utilance |
[packet loss 1, packet loss 2] |
FEC_redundance_1 |
Communication network utilance 1 |
(packet loss 2, packet loss 3] |
FEC_redundance_2 |
Communication network utilance 2 |
(packet loss 3, packet loss 4] |
FEC_redundance_3 |
Communication network utilance 3 |
The method that present embodiment provides through the network delay of detection communication network and the packet loss of communication network, and fully utilizes multiple error control method according to network condition in real time; Receiving terminal is through the packet loss of expansion RTCP XR message after transmitting terminal feedback error control in addition; Thereby transmitting terminal and receiving terminal can be judged the effect of every kind of error control method antagonism packet loss simultaneously; And dynamically adjust the parameter of various error control methods, to adapt to the variation of Network Packet Loss situation; Present embodiment can reach under higher communication network utilance through adjusting the parameter of various error control methods automatically, reaches better anti-packet loss effect.
Embodiment 3
Referring to Fig. 7, present embodiment provides a kind of receiving terminal, and this receiving terminal comprises acquisition module 301, first judge module 302 and control module 303;
Acquisition module 301 is used for the initial packet loss of obtaining communication network and the network delay of communication network;
Whether the initial packet loss that first judge module 302 is used to judge communication network is less than preset first packet loss that opens repeat requests soon of launching, and whether the network delay of communication network is less than preset delay threshold;
Control module 303 be used for when the judged result of first judge module 301 when being, adopt the mode that opens repeat requests soon to carry out error control.
Wherein, This receiving terminal also comprises feedback module; Be used to add up second packet loss after repeat requests is opened in employing soon, second packet loss is fed back to transmitting terminal, so that the parameter that transmitting terminal opens repeat requests soon according to the initial packet loss and the adjustment of second packet loss of communication network.
Wherein, This receiving terminal also comprises the receiver module and second judge module; This receiver module is used for the parameter that opens repeat requests soon that receiving end/sending end sends, and this parameter that opens repeat requests soon is that transmitting terminal is according to the initial packet loss of communication network and the parameter that opens repeat requests soon of second packet loss adjustment; This second judge module is used for after feedback module feeds back to transmitting terminal with second packet loss, and whether the initial packet loss of judging communication network is greater than adopting second packet loss that opens soon after the repeat requests;
Correspondingly, control module 303 also be used for when the judged result of second judge module when being, carry out error control according to the adjusted parameter that opens repeat requests soon; When the judged result of second judge module for not the time, judge whether to adopt the back to carry out error control to the mode of error correction or the mode of forward error correction.
Further, this control module 303 also comprises first judging unit and first control unit; First judging unit is used to judge whether the back is effective to the medium type of packet to the mode of error correction; First control unit is used for when the judged result of first judging unit when being effective; Adopt the back to carry out error control to error correction; And will adopt five packet loss of back after error correction to feed back to transmitting terminal; So that transmitting terminal judges whether to adopt the mode of forward error correction to carry out error control according to the 5th packet loss that adopts the back after error correction; When the judged result of first judging unit when being invalid, according to adopting second packet loss that opens soon after the repeat requests to judge whether to adopt the mode of forward error correction to carry out error control.
The receiving terminal that present embodiment provides uses multiple error control method through the situation of change of network condition is comprehensive, and carries out error control according to the parameter of dynamic adjusted various error control methods, adapts to the variation of Network Packet Loss situation; Present embodiment can reach under higher communication network utilance through adjusting the parameter of various error control methods automatically, reaches better anti-packet loss effect.
Embodiment 4
Referring to Fig. 8, the embodiment of the invention provides a kind of transmitting terminal, and this transmitting terminal comprises sending module 401, first acquisition module 402 and first judge module 403;
Sending module 401 is used for sending packet to receiving terminal;
First acquisition module 402 be used to obtain the receiving terminal feedback communication network initial packet loss with adopt second packet loss that opens soon after the repeat requests, and obtain the 3rd packet loss according to the initial packet loss of communication network and the difference of second packet loss;
Whether first judge module 403 is used to judge the 3rd packet loss less than the 4th preset packet loss, if less than and the 3rd packet loss be not 0, then improve the parameter that opens repeat requests soon; If the 3rd packet loss is 0, then reduce the parameter that opens repeat requests soon.
Further, this transmitting terminal also comprises feedback module, is used for the adjusted parameter that opens repeat requests is soon fed back to receiving terminal.
Wherein, when after mode to error correction effective to the medium type of packet, adopt the back after error control is carried out in error correction, this transmitting terminal also comprises second acquisition module, second judge module and control module;
Second acquisition module is used to obtain the 5th packet loss after error correction after the employing of receiving terminal feedback;
Second judge module is used to also judge whether five packet loss of employing back after error correction is 0;
Control module be used for when the judged result of judge module for not the time, adopt the mode of forward error correction to carry out error control.
Wherein, when after after the mode of error correction is invalid to the medium type of packet, this transmitting terminal also comprises the 3rd judge module, the 3rd judge module is used to judge whether second packet loss that the employing of receiving terminal feedback is opened after the repeat requests soon is 0; Correspondingly, control module also be used for when the judged result of the 3rd judge module for not the time, adopt the mode of forward error correction to carry out error control.
Particularly, this control module also comprises control unit, is used to preset the corresponding relation of redundancy parameter of packet loss and the forward error correction of communication network; The redundancy parameter of obtaining corresponding forward error correction according to the packet loss and the corresponding relation of current communication network, and carry out error control according to the redundancy parameter of corresponding forward error correction.
The transmitting terminal that present embodiment provides; Through the multiple error control method of the comprehensive use of the situation of change of network condition; And according to the initial packet loss of communication network and the situation of change of carrying out the packet loss after the error control; Dynamically adjust the parameter of various error control methods, to adapt to the variation of Network Packet Loss situation; Present embodiment can reach under higher communication network utilance through adjusting the parameter of various error control methods automatically, reaches better anti-packet loss effect.
Embodiment 5
Referring to Fig. 9, the embodiment of the invention also provides a kind of system of error control, and this system comprises receiving terminal 501 and transmitting terminal 502;
Wherein, receiving terminal 501 comprises acquisition module, first judge module and control module; This acquisition module is used for the initial packet loss of obtaining communication network and the network delay of communication network; Whether the initial packet loss that this first judge module is used to judge communication network is less than preset first packet loss that opens repeat requests soon of launching, and whether the network delay of communication network is less than preset delay threshold; This control module be used for when the judged result of first judge module when being, adopt the mode that opens repeat requests soon to carry out error control;
Transmitting terminal 502 comprises sending module, first acquisition module and first judge module; This sending module is used for sending packet to receiving terminal; This first acquisition module be used to obtain the receiving terminal feedback communication network initial packet loss with adopt second packet loss that opens soon after the repeat requests, and obtain the 3rd packet loss according to the initial packet loss of communication network and the difference of second packet loss; Whether this first judge module is used to judge the 3rd packet loss less than the 4th preset packet loss, if less than and the 3rd packet loss be not 0, then improve the parameter that opens repeat requests soon; If the 3rd packet loss is 0, then reduce the parameter that opens repeat requests soon.
The system that present embodiment provides; Through the multiple error control method of the comprehensive use of the situation of change of network condition; And according to the initial packet loss of communication network and the situation of change of carrying out the packet loss after the error control; Dynamically adjust the parameter of various error control methods, to adapt to the variation of Network Packet Loss situation; Present embodiment can reach under higher communication network utilance through adjusting the parameter of various error control methods automatically, reaches better anti-packet loss effect.
All or part of content in the technical scheme that above embodiment provides can realize that through software programming its software program is stored in the storage medium that can read, storage medium for example: the hard disk in the computer, CD or floppy disk.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.