Detectionprinciple
Errordetectionisrealizedbyerrordetectioncode.TheerrordetectioncodeCisonlyapartofthesetXofallpossiblesequences,andonlythedataisencodedintoCatthesendingend.WhenthereceivingendreceivesasequencethatdoesnotbelongtosetC,itisconsideredthatatransmissionerrorhasoccurred.Thequalityoftheerrordetectioncodeismainlymeasuredbythetransmissionefficiencyandtheprobabilityofmisseddetection.Thetransmissionefficiencyreferstotheamountofinformationactuallycarriedbyeachbittransmitted,whichcanbeexpressedas.Ifanerrorintransmissioncausesonecodewordtobemistakenforanothercodeword,thedetectionsystemcannotfindthattheerrorhasoccurred.Thisiscalledmisseddetection,andthecorrespondingprobabilityiscalledmisseddetectionprobability.Thecodewordusedforerrordetectionshouldmaketheprobabilityofmisseddetectionassmallaspossibleandthetransmissionefficiencyashighaspossible.Inaddition,itmustbeconsideredthatthereshouldbeeffectiveencodinganderrordeterminationmethods.Errordetectionisthebasisofautomaticrequestretransmissiontechnology,anditisalsoanimportantpartofmoderntelecommunicationnetworkmaintenanceandmanagement.
Theearlyerrordetectionoftelecommunicationsnetworkonlysimplyimplementedthelinecode,suchasusingtheencodingrulesofHDB3codeorCMIcode(seetransmissioncodetype)todetectthenumberofpolaritydamagestodeterminethetransmissionqualitytoevaluate.Whentheestimatedbiterrorratereachesacertainlevel,thecorrespondingimmediatemaintenancewarningsignalisissued.Thisdetectionmethodhasahighprobabilityofmisseddetection,butitissuitableforearlytechnicalconditions.
Detectionmethod
Therearetwotypesoferrordetectiontechniquescommonlyusedincomputercommunication:paritycheckandpacketcheck.
2.1Paritycheck
Thisisacharacter-basederrordetectionmethod.Suitableforasynchronouscommunication.Atthesendingend,thedatatobesentisdividedintoasetofcharacters,andonebitofcheckinformation(calledthesupervisioncode)isappendedtoeachcharacter(informationcode)tobetransmitted,sothattheinformationcodeandthesupervisioncodeare1Thenumberisodd(oddparity)oreven(evenparity).Accordingtothisrule,thereceivingenddetectswhetherthereisenougherrorinthetransmissionprocess.Thesupervisorycodeofparitycheckhasonly1bit,andcanonlydetectoddnumberoferrors,buttheprobabilityofoddnumberoferrorsinthedatacommunicationprocessismuchgreaterthanevennumberoferrors.Itsbiggestshortcomingisthatthereisnowaytodetectanevennumberoferrors.Toavoidthisshortcoming,asquarematrix(two-dimensional)paritycheckmethodisintroduced.Inshort,parityismainlyusedindatatransmissionandI/Odevicesinsidethecomputer.
2.2Packetcheck
Thisisablock-basederrordetectionmethod,Suitableforsynchronouscommunication.Atthesendingend,thedatatobesentisdividedintoacollectionofdatablocks.Foreachcurrentdatablock(informationcode)tobetransmitted,anadditionalcheckdatablockiscalculatedaccordingtocertaincalculationrules,andthensentimmediatelyaftertheinformationcode.goout.Thereceivingendusesthesamerulestochecktodeterminewhetherthetransmissioniswrong.Incomputercommunication,therearetwotypicalpacketcheckmethods:checksummethodandcyclicredundancycheckmethod.
(1)Checksummethod:Thisisasimpleandfastgroupingcheckmethod.Asimplechecksummethodistosumthedatablockaccordingtoacertainnumberofbits,andthenusetheresultvalueasthecheckcode.IntheTCP/IPprotocol,theIPdatagramusesthissimplemethodtochecktheheaderofthedatagram.Thesenderdividesthedataintoacollectionof16-bitcodewords(datagroups),thencalculatestheirsum,andusestheinversecodeofthesumastheso-calledInternetchecksum.Thereceivingendcalculatesachecksumonthereceiveddataandcheckswhetheritmatchesthechecksumfieldcarriedinthereceivedpacket.Obviously,itiseasytofindthatdifferentpacketdatablockshavethesamechecksum,whichmakesthisverificationmethodinsufficienttoensurereliabledatacommunication.However,thecalculationofthechecksumissimpleandfast,sothatinsomecases,softwaremethodsarerequiredforcalibration.TestedapplicationssuchasInternetProtocolhavecertainapplicationvalue.
(2)CyclicRedundancyCheck(CRC)usespacketcycliccodesforerrordetection.Ablockcycliccodeisdescribedbyitsgeneratorpolynomialg(x)andthenumberoftimesrisequaltothenumberofcheckbits.Fortheinformationgroupoflengthk,a0,a1,...,akcanbeexpressedasapolynomial,atthistime,rcheckdigitsareexactlyequaltotheremainderofdividingbyg(x),whichisrecordedas.Thesamealgorithmisusedtodeterminetheerroratthereceivingend.Forthereceivedpacketb(x)withalengthofk+r,ifg(x)cannotdivideb(x),thenitisdeterminedthatanerrorhasoccurredinthetransmission.Becausepolynomialdivisioncanberealizedbyusingasimpleshiftfeedbackregistercircuit,CRCtechnologyhasbeenwidelyusedincommunicationandinformationstorage.
Inordertoensuretheintercommunicationandinterchangebetweencommunicationdevices,extensiveinternationalstandardizationworkhasbeencarriedoutontheCRCverificationtechnology.Forexample,CCITThasstipulatedaseriesofstandardcyclicredundancychecksfortheperformancemonitoringofdigitalchannelsoftelecommunicationnetworks,suchasCRC4,CRC8,CRC10,CRC16,etc.Eachcyclicredundancycheckcorrespondstoaspecificgeneratorpolynomial,thenumberaftertheletterrepresentsthenumberofcheckdigits,suchasCRC16has16checkdigits,thegeneratorpolynomialis.