CN104283640B - A kind of method and device for calculating transmission error rates of data - Google Patents

A kind of method and device for calculating transmission error rates of data Download PDF

Info

Publication number
CN104283640B
CN104283640B CN201410495670.5A CN201410495670A CN104283640B CN 104283640 B CN104283640 B CN 104283640B CN 201410495670 A CN201410495670 A CN 201410495670A CN 104283640 B CN104283640 B CN 104283640B
Authority
CN
China
Prior art keywords
data
packet
byte number
module
numbering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410495670.5A
Other languages
Chinese (zh)
Other versions
CN104283640A (en
Inventor
王丽丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Landi Commercial Equipment Co Ltd
Original Assignee
Fujian Landi Commercial Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Landi Commercial Equipment Co Ltd filed Critical Fujian Landi Commercial Equipment Co Ltd
Priority to CN201410495670.5A priority Critical patent/CN104283640B/en
Publication of CN104283640A publication Critical patent/CN104283640A/en
Application granted granted Critical
Publication of CN104283640B publication Critical patent/CN104283640B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0045Arrangements at the receiver end
    • H04L1/0046Code rate detection or code type detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

The present invention relates to field of data transmission, more particularly to a kind of method and device for calculating transmission error rates of data.Its method key ideas is:By setting packet in transmitting terminal, the packet includes the first header data, the coding and the first random data of the first packet being arranged in order, it is identified through sending to receiving terminal, if recognize the coding of the first header data and the first packet, extract the second random data, the data of the data received and transmitting terminal are contrasted again, correct byte number is calculated, finally draws the bit error rate.By identifying the coding of the first header data and the first packet, data are avoided when the situation for losing code occurs in transmission process, cause error rate calculation to produce very big deviation.By method provided by the present invention, transmission error rates of data significantly more efficient can be calculated.

Description

A kind of method and device for calculating transmission error rates of data
Technical field
The present invention relates to field of data transmission, more particularly to a kind of method and device for calculating transmission error rates of data.
Background technology
In bluetooth data transmission, after establishing physical link, transceiving data, to test link stability, data transfer Correctness etc..Now transmit the mode that data can use former bag to return:Data are sent, the data that other side will receive again after receiving Return.We are by the data received compared with the data sent:If identical, transmission, reception data are correct;If not just Really, then need to count the bit error rate, to assess the relative reliability of data transfer.And how to calculate error rates of data is a problem. Because a part of data in a practical situation, may be lost, it is also possible to which mistake occur in some bytes, so simply pressing byte Comparing data becomes infeasible, it is difficult to judge which is partly to lose, which is partly wrong.
The content of the invention
The technical problems to be solved by the invention are:A kind of method and device for calculating transmission error rates of data, energy are provided Enough bit error rates for calculating transmission data, make the bit error rate obtained by calculating more have reliability.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention is:
A kind of method for calculating transmission error rates of data, including:
S11, the first packet for transmitting data is provided with transmitting terminal, first packet includes:Be arranged in order One header data, the coding of the first packet and the first random data;First packet is stored and sent;
The first packet transmitted by S12, the receiving terminal reception step S11 is as the second packet, what is received The coding of the first header data and the first packet obtained by the step S11 is identified in second packet;If described The coding of the first header data and the first packet is recognized in two packets, extracts the first packet in second packet Coding after the second random data;
S13, the second packet obtained by the step S12 and the first packet be subjected to correct byte contrast, according to than Correct byte number is calculated in relatively result;
S14, correct byte number calculates transmission error rates of data according to obtained by the step S13.
The another technical solution that the present invention uses for:
A kind of device for calculating transmission error rates of data, including:Transmitting terminal and receiving terminal;
The transmitting terminal includes the first setup module, memory module and sending module;
First setup module, for being provided with the first packet of transmission data, first packet in transmitting terminal Including:The first header data, the coding of the first packet and the first random data being arranged in order;
The memory module, for first packet to be stored;
The sending module, for first packet to be transmitted;
The receiving terminal includes identification module, extraction module, comparison module and computing module;
The identification module, for identifying first header data and first in second packet received The coding of packet;
The extraction module, if for recognizing the first header data and the first packet in second packet Coding, extract the second random data after the coding of the first packet in second packet;
The comparison module, for by the first of the second packet obtained by receiving terminal and the memory module of the transmitting terminal Packet carries out correct byte contrast, draws comparative result;
The computing module, correct byte number is calculated for the comparative result according to obtained by comparison module, according to institute Obtain correct byte number and calculate transmission error rates of data.
The beneficial effects of the present invention are:By setting packet in transmitting terminal, the packet includes what is be arranged in order First header data, the coding of the first packet and the first random data, the first packet header number is identified through sending to receiving terminal According to the coding with the first packet, the second random data is extracted, then the data of the data received and transmitting terminal are contrasted, Correct byte number is calculated, finally draws the bit error rate.By identifying the coding of the first header data and the first packet, data are avoided When the situation for losing code occurs in transmission process, error rate calculation is caused to produce very big deviation.
Brief description of the drawings
Fig. 1 is the flow chart that the method for error rates of data is transmitted in a kind of calculating of the specific embodiment of the invention;
Fig. 2 is the structural representation that the device of error rates of data is transmitted in a kind of calculating of the specific embodiment of the invention;
Label declaration:
1st, transmitting terminal;10th, the first setup module;11st, memory module;12nd, sending module;2nd, receiving terminal;20th, mould is identified Block;21st, extraction module;22nd, comparison module;23rd, computing module.
Embodiment
To describe the technology contents of the present invention, the objects and the effects in detail, below in conjunction with embodiment and coordinate attached Figure is explained.
The design of most critical of the present invention is:By identifying the coding of the first header data and the first packet, avoid counting Very big deviation is produced according to error rate calculation when the situation for losing code occurs in transmission process, is caused.
Fig. 1 is refer to, is the flow chart that the method for error rates of data is transmitted in a kind of calculating of the specific embodiment of the invention, It is specific as follows:
A kind of method for calculating transmission error rates of data, including:
S11, the first packet for transmitting data is provided with transmitting terminal, first packet includes:Be arranged in order One header data, the coding of the first packet and the first random data;First packet is stored and sent;
The first packet transmitted by S12, the receiving terminal reception step S11 is as the second packet, what is received The coding of the first header data and the first packet obtained by the step S11 is identified in second packet;If described The coding of the first header data and the first packet is recognized in two packets, extracts the first packet in second packet Coding after the second random data;
S13, the second packet obtained by the step S12 and the first packet be subjected to correct byte contrast, according to than Correct byte number is calculated in relatively result;
S14, correct byte number calculates transmission error rates of data according to obtained by the step S13.
It was found from foregoing description, the beneficial effects of the present invention are:By setting packet, the packet in transmitting terminal Including the first header data, the coding of the first packet and the first random data being arranged in order, carried out through sending to receiving terminal Identify the coding of the first header data and the first packet, extract the second random data, then by the data received and transmitting terminal Data contrasted, calculate correct byte number, finally draw the bit error rate.By identifying the first header data and the first packet Coding, avoid data when the situation for losing code occurs in transmission process, cause error rate calculation to produce very big deviation.
Further, the step S11 is specifically included:More than two the first data being arranged in order are provided with transmitting terminal Bag, first packet include:The first header data, the coding of the first packet and the first random data being arranged in order;
First header data is the first data for including fixed byte number and character;
It is described two more than the first packet be encoded to natural number 1 start to it is more than two be arranged in order first The coding number consecutively of packet;
First random data is the random data of fixed word joint number;
The data of the first packet being arranged in order more than described two start number consecutively for natural number 1.
Seen from the above description, by the coding number consecutively to more than two first packets, to more than two The data number consecutively for the first packet being arranged in order, it can be identified successively by way of pointer displacement.
Further, the coding, random data differ with first data.
Seen from the above description, first data are the first header data, represent the starting of a packet, if Coding or random data are identical with first data, then can be erroneously interpreted as the starting of another packet, therefore, easily cause It is mistakenly considered error code.
Further, the coding for the first header data and the first packet being identified in the step S12 is specially:
S121, primary condition is set;
The primary condition includes:The data total bytes of more than two second packets, the first header data, first Coding, data pointer, encoding indicators and the maximum packet numbered of packet;
The packet of the maximum numbering is the data total bytes according to the second packet and the data of fixed word joint number Bag calculates gained;
S122, primary condition obtained by the step S121 initialized;
The initialization includes:The data pointer points to the data that numbering is 1, and it is 1 that the encoding indicators, which point to numbering, Packet, total correct byte number resets;
S123, judge that data pointer points to whether numbering is more than data total bytes, if it is not, then entering step S124;If It is, then into step S126;
S124, judge whether data pointed by data pointer and first header data are equal, if so, then entering step Rapid S125;If it is not, then data pointer adds 1, the data pointer points to the data of next numbering, return to step S123;
Data pointed by S125, the mark data pointer are starting packet header, are obtained pointed by the data pointer Coding after data, whether encoding for judging to get be equal with the coding of the packet pointed by the encoding indicators, if so, Then enter step S128;If it is not, then data pointer adds 1, the data pointer points to the data of next numbering, return to step S123;
S126, judge whether the coding pointed by the encoding indicators is the packet of maximum numbering, if so, then entering step Rapid S129;If it is not, then enter step S127;
S127, the data pointer is pointed to the position that packet header is originated obtained by the step S125, encoding indicators add 1, institute The packet that encoding indicators point to next coding is stated, data pointer adds 1, and the data pointer points to the number of next numbering According to return to step S124;
S128, the coding for recognizing the first header data and the first packet, extract the random number of the second fixed word joint number According to;
The total correct byte number of S129, statistics, transmission data are calculated with data total bytes according to total correct byte number The bit error rate.
Seen from the above description, by identifying the coding of the first header data and the first packet, data are avoided to send When the situation for losing code occurs in process, error rate calculation is caused to produce very big deviation.
Further, the step S13 is specially:
S131, compared with second packet is carried out into positive sequence one by one with the first packet for being stored in transmitting terminal, with Data are all mutually correct, count the first correct byte number, by second packet and the first number stored in transmitting terminal Backward is carried out according to bag one by one to compare, and is all mutually correct with data, is counted the second correct byte number;
S132, the first correct byte number obtained by the step S131 contrasted with the second correct byte number, if first Correct byte number is more than or equal to the second correct byte number, then the first correct byte number is correct byte number;If the first correct word Joint number is less than the second correct byte number, then the second correct byte number is correct byte number;
S133, correct byte number drawn according to the step S132.
Seen from the above description, compared by positive sequence and compared with backward, select the comparative result more than correct byte number as just True byte number, it can effectively reduce the bit error rate lost caused by code.
Another method for calculating transmission error rates of data of the specific embodiment of the invention, it is specific as follows:
The first packet is provided with transmitting terminal, first packet includes:The first header data for being arranged in order, first The coding of packet and the first random data;First packet is stored and sent;
Data configuration part is:Using 10 bytes as a packet, the first header data is entered for the 16 of 1 byte number 0x02 processed, the first packet are encoded to 2 byte numbers, and the first random data is the random data of 7 byte numbers;If the first number According to there is 0x02 in the coding of bag, then 0x03 is changed to;If occurring 0x02 in random data, other random data are changed to;First The coding of packet number consecutively since natural number 1.
Receiving terminal receives the second packet, and the first header data and first are identified in second packet received The coding of packet;If recognizing the coding of the first header data and the first packet in second packet, institute is extracted State the second random data after the coding of the first packet in the second packet;
Searching data packet portion is:Receiving terminal is traveled through, is begun look for from the first packet for being encoded to 1;If find institute State be encoded to 1 the first packet, then begin look for being encoded to 2 after last byte for the first packet for being encoded to 1 First packet;
Such as:It is 02 00 01 09 08 07 06 05 04 03 to receive data | 02 00 03 08 08 08 08 08 06;
From receive data beginning have found 02 00 01 for be encoded to 1 the first packet, then from be encoded to 1 first The data content (in example | content above) of packet, search backward be encoded to 2 the first packet, that is, find example 02 00 03 in son.
If traversal is not also found to the end, next coding is begun look for from the position for finding the first header data First packet.
Such as:It is 02 00 to receive data | 02 00 03 08 08 08 08 08 06;
02 is have found from the beginning for receiving data, but does not and then find 00 01 (being 02 00 in example);So Next 02 is searched, and then still by that analogy, finds without 00 01 (being 00 03 in example) and does not finally all find 02 00 01.So, the position for just finding the first header data from the beginning starts (to be exactly the 1st byte for receiving data here Start), search the 2nd the first packet;02 00 03 are found, represents that the 2nd the first packet is present.By that analogy, until The first packet of the maximum numbering of transmitting terminal is found, or has traveled through reception area last first packet.
Identify that the first data packet portions are:The first character section 0x02 for first finding the first packet is the first packet header number According to.2 bytes next encode, and are determined whether according to coding for the first packet pointed by encoding indicators.If confirm this One packet, then total correct byte number increase by 3;If not this is wrapped, then looked into again since first header data the latter byte Look for the first header data.
Second packet and the first packet are subjected to correct byte contrast, correct byte is calculated according to comparative result Number;
The first packet searched is with transmitting terminal rating unit:
After finding the first packet, 7 bytes are traveled through backward.If running into 0x02 in 7 bytes, this bag is by the end of 0x02 Previous byte.
The random data of this first packet is carried out 2 times with sending the random data of corresponding first packet in buffering area Compare.It is respectively:Compare once from positive sequence;If random data compares once again less than 7 bytes from backward.Take 2 comparisons In, correct byte number more mostly result, then always correct byte number increases according to result.
Such as:
Random data 01 03 04 05 06 07 08 in transmitting terminal;
Random data 01 03 05 06 07 08 in receiving terminal;
Positive sequence compares, and 2 bytes are correct (01 03);
Backward compares, and 4 bytes are correct (05 06 07 08);
Because of 2>4, it is taken as that the correct byte number of this random data is 4.
Transmission error rates of data is calculated according to correct byte number;
Error code byte number is equal to reception data total bytes and subtracts total correct byte number, can be calculated according to error code byte number The bit error rate.
Referring to Fig. 2, the structure for a kind of device of calculating transmission error rates of data of the specific embodiment of the invention is shown It is intended to, it is specific as follows:
A kind of device for calculating transmission error rates of data, including:Transmitting terminal 1 and receiving terminal 2;
The transmitting terminal 1 includes the first setup module 10, memory module 11 and sending module 12;
First setup module 10, for being provided with the first packet of transmission data, first data in transmitting terminal 1 Bag includes:The first header data, the coding of the first packet and the first random data being arranged in order;
The memory module 11, for first packet to be stored;
The sending module 12, for first packet to be transmitted;
The receiving terminal 2 includes identification module 20, extraction module 21, comparison module 22 and computing module 23;
The identification module 20, for the first packet transmitted by receiving terminal reception sending module as the second data Bag, the coding of first header data and the first packet is identified in second packet received;
The extraction module 21, if for recognizing the first header data and the first packet in second packet Coding, extract the second random data after the coding of the first packet in second packet;
The comparison module 22, for by the second packet of the gained of receiving terminal 2 and the memory module of the transmitting terminal First packet carries out correct byte contrast, draws comparative result;
The computing module 23, for correct byte number, root to be calculated according to the comparative result of the gained of comparison module 22 Transmission error rates of data is calculated according to the correct byte number of gained.
The beneficial effects of the present invention are:By setting packet in transmitting terminal, the packet includes what is be arranged in order First header data, the coding of the first packet and the first random data, the first packet header number is identified through sending to receiving terminal According to the coding with the first packet, the second random data is extracted, then the data of the data received and transmitting terminal are contrasted, Correct byte number is calculated, finally draws the bit error rate.By identifying the coding of the first header data and the first packet, data are avoided When the situation for losing code occurs in transmission process, error rate calculation is caused to produce very big deviation.
Further, the transmitting terminal 1 also includes the first numbering module and the second numbering module;
The first numbering module, for the coding to more than two the first packets being arranged in order from natural number 1 Start number consecutively;
The second numbering module, for the data to more than two the first packets being arranged in order from natural number 1 Start number consecutively.
Seen from the above description, by the coding number consecutively to more than two first packets, to more than two The data number consecutively for the first packet being arranged in order, it can be identified successively by way of pointer displacement.
Further, the transmitting terminal 1 also includes random data generation module, for generating the of the second fixed word joint number One random data.
Further, the receiving terminal 2 is also sentenced including the second setup module, initialization module, the first judge module, second Disconnected module, mark module, the 3rd judge module and the 4th judge module;
Second setup module, for setting primary condition;The primary condition includes:More than two second data What data total bytes, the first header data, the coding of the first packet, data pointer, encoding indicators and the maximum of bag were numbered Packet;The packet of the maximum numbering is the data total bytes according to the second packet and the packet of fixed word joint number Calculate gained;
The initialization module, for primary condition to be initialized;The initialization includes:The data pointer refers to The data for being 1 to numbering, the encoding indicators point to the packet that numbering is 1, and total correct byte number is reset;
First judge module, for judging that data pointer points to whether numbering is more than data total bytes;
Second judge module, for judge the data pointed by data pointer and first header data whether phase Deng;
The mark module, for marking the data pointed by the data pointer to originate packet header, obtain the data The coding after data pointed by pointer;
3rd judge module, for the volume of the coding and the packet pointed by the encoding indicators that judge to get Whether code is equal;
4th judge module, for judging whether the coding pointed by the encoding indicators is the maximum data numbered Bag.
Seen from the above description, by identifying the coding of the first header data and the first packet, data are avoided to send When the situation for losing code occurs in process, error rate calculation is caused to produce very big deviation.
Further, it is more single to include positive sequence comparing unit, backward comparing unit and correct byte number for the comparison module Member;
The positive sequence comparing unit, for second packet to be carried out with the first packet stored in transmitting terminal Positive sequence compares one by one, is all mutually correct with data, counts the first correct byte number;
The backward comparing unit, for second packet to be carried out with the first packet stored in transmitting terminal Backward compares one by one, is all mutually correct with data, counts the second correct byte number;
The correct byte number comparing unit, for by the first correct byte number obtained by positive sequence comparing unit compared with backward Second correct byte number obtained by unit is contrasted, and draws correct byte number;
If the first correct byte number is more than or equal to the second correct byte number, the first correct byte number is correct byte Number;If the first correct byte number is less than the second correct byte number, the second correct byte number is correct byte number.
Seen from the above description, compared by positive sequence and compared with backward, select the comparative result more than correct byte number as just True byte number, it can effectively reduce the bit error rate lost caused by code.
In summary, a kind of method and device for calculating transmission error rates of data provided by the invention, by transmitting terminal Packet is set, and the packet includes the first header data, the coding and the first random number of the first packet being arranged in order According to, the coding of the first header data and the first packet is identified through sending to receiving terminal, extracts the second random data, then will The data and the data of transmitting terminal received are contrasted, and are calculated correct byte number, are finally drawn the bit error rate.Pass through identification first The coding of header data and the first packet, data are avoided to cause error rate calculation when the situation for losing code occurs in transmission process Produce very big deviation.By the coding number consecutively to more than two first packets, it is arranged in order to more than two The data number consecutively of first packet, it can be identified successively by way of pointer displacement.First data are One header data, the starting of a packet is represented, if coding or random data are identical with first data, can be missed It is considered the starting of another packet, therefore, easily causes and be mistakenly considered error code.Compared by positive sequence and compared with backward, selected Comparative result more than correct byte number is correct byte number, can effectively reduce the bit error rate lost caused by code.
Embodiments of the invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalents that bright specification and accompanying drawing content are made, or the technical field of correlation is directly or indirectly used in, similarly include In the scope of patent protection of the present invention.

Claims (10)

  1. A kind of 1. method for calculating transmission error rates of data, it is characterised in that including:
    S11, the first packet for transmitting data is provided with transmitting terminal, first packet includes:The first bag being arranged in order Head data, the numbering of the first packet and the first random data;First packet is stored and sent;
    The first packet transmitted by S12, the receiving terminal reception step S11 is as the second packet, described in receiving The first header data obtained by the step S11 and the numbering of the first packet are identified in second packet;If in the described second number According to the numbering that the first header data and the first packet are recognized in bag, the volume of the first packet in second packet is extracted The second random data after number;
    S13, the second packet obtained by the step S12 and the first packet be subjected to correct byte contrast, according to comparing knot Correct byte number is calculated in fruit;
    S14, correct byte number calculates transmission error rates of data according to obtained by the step S13.
  2. 2. the method according to claim 1 for calculating transmission error rates of data, it is characterised in that the step S11 is specific Including:More than two the first packets being arranged in order are provided with transmitting terminal, first packet includes:It is arranged in order First header data, the numbering of the first packet and the first random data;
    First header data is the first data for including fixed byte number and character;
    The numbering of the first packet more than described two is that natural number 1 starts to more than two the first data being arranged in order The numbering number consecutively of bag;
    First random data is the random data of fixed word joint number;
    The data of the first packet being arranged in order more than described two start number consecutively for natural number 1.
  3. 3. the method according to claim 2 for calculating transmission error rates of data, it is characterised in that the numbering, random number Differed according to first header data.
  4. 4. the method for the calculating transmission error rates of data according to claim 1-3 any one, it is characterised in that the step The numbering that the first header data and the first packet are identified in rapid S12 is specially:
    S121, primary condition is set;
    The primary condition includes:The data total bytes of more than two second packets, the first header data, the first data Numbering, data pointer, encoding indicators and the maximum packet numbered of bag;
    The packet of the maximum numbering is the data total bytes according to the second packet and the packet meter of fixed word joint number Calculate gained;
    S122, primary condition obtained by the step S121 initialized;
    The initialization includes:The data pointer points to the data that numbering is 1, and the encoding indicators point to the number that numbering is 1 According to bag, the correct byte number is reset;
    S123, judge that data pointer points to whether numbering is more than data total bytes, if it is not, then entering step S124;If so, then Into step S126;
    S124, judge whether data pointed by data pointer and first header data are equal, if so, then entering step S125;If it is not, then data pointer adds 1, the data pointer points to the data of next numbering, return to step S123;
    Data pointed by S125, the mark data pointer are starting packet header, obtain the data pointed by the data pointer Coding afterwards, whether encoding for judging to get be equal with the coding of the packet pointed by the encoding indicators, if so, then entering Enter step S128;If it is not, then data pointer adds 1, the data pointer points to the data of next numbering, return to step S123;
    S126, judge whether the coding pointed by the encoding indicators is the maximum packet numbered, if so, then entering step S129;If it is not, then enter step S127;
    S127, the data pointer is pointed to the position that packet header is originated obtained by the step S125, encoding indicators add 1, the volume Code pointer points to the packet of next coding, and data pointer adds 1, and the data pointer points to the data of next numbering, returns Return step S124;
    S128, recognize the first header data and the numbering of the first packet, random number of the extraction with the second fixed word joint number According to;
    The total correct byte number of S129, statistics, transmission data errors are calculated with data total bytes according to total correct byte number Rate.
  5. 5. the method according to claim 4 for calculating transmission error rates of data, it is characterised in that the step S13 is specific For:
    S131, compared with second packet is carried out into positive sequence one by one with the first packet for being stored in transmitting terminal, with data It is all mutually correct, counts the first correct byte number, the first packet stored by second packet and in transmitting terminal Carry out backward one by one to compare, be all mutually correct with data, count the second correct byte number;
    S132, the first correct byte number obtained by the step S131 contrasted with the second correct byte number, if first is correct Byte number is more than or equal to the second correct byte number, then the first correct byte number is correct byte number;If the first correct byte number Less than the second correct byte number, then the second correct byte number is correct byte number;
    S133, correct byte number drawn according to the step S132.
  6. A kind of 6. device for calculating transmission error rates of data, it is characterised in that including:Transmitting terminal and receiving terminal;
    The transmitting terminal includes the first setup module, memory module and sending module;
    First setup module, for being provided with the first packet of transmission data in transmitting terminal, first packet includes: The first header data, the numbering of the first packet and the first random data being arranged in order;
    The memory module, for first packet to be stored;
    The sending module, for first packet to be transmitted;
    The receiving terminal includes identification module, extraction module, comparison module and computing module;
    The identification module, for the first packet transmitted by receiving terminal reception sending module as the second packet, connecing First header data and the numbering of the first packet are identified in second packet received;The extraction module, use If in recognizing the first header data and the numbering of the first packet in second packet, second packet is extracted In the first packet numbering after the second random data;
    The comparison module, for by the first data of the second packet obtained by receiving terminal and the memory module of the transmitting terminal Bag carries out correct byte contrast, draws comparative result;
    The computing module, correct byte number is calculated for the comparative result according to obtained by comparison module, according to gained just True byte number calculates transmission error rates of data.
  7. 7. the device according to claim 6 for calculating transmission error rates of data, it is characterised in that the transmitting terminal also includes First numbering module and the second numbering module;
    The first numbering module, for the numbering to more than two the first packets being arranged in order since natural number 1 Number consecutively;
    The second numbering module, for the data to more than two the first packets being arranged in order since natural number 1 Number consecutively.
  8. 8. the device according to claim 6 for calculating transmission error rates of data, it is characterised in that the transmitting terminal also includes Random data generation module, for generating the first random data of the second fixed word joint number.
  9. 9. the device according to claim 6 for calculating transmission error rates of data, it is characterised in that the receiving terminal also includes Second setup module, initialization module, the first judge module, the second judge module, mark module, the 3rd judge module and the 4th Judge module;
    Second setup module, for setting primary condition;The primary condition includes:More than two second packets Data total bytes, the first header data, the numbering of the first packet, data pointer, encoding indicators and the maximum data numbered Bag;The packet of the maximum numbering is to be calculated according to the data total bytes of the second packet and the packet of fixed word joint number Gained;
    The initialization module, for primary condition to be initialized;The initialization includes:The data pointer, which points to, to be compiled Number data for being 1, the encoding indicators point to the packet that numbering is 1, and the correct byte number is reset;
    First judge module, for judging that data pointer points to whether numbering is more than data total bytes;
    Second judge module, for judging whether the data pointed by data pointer and first header data are equal;
    The mark module, for marking the data pointed by the data pointer to originate packet header, obtain the data pointer Coding after pointed data;
    3rd judge module, the coding of coding and the packet pointed by the encoding indicators for judging to get are It is no equal;
    4th judge module, for judging whether the coding pointed by the encoding indicators is the maximum packet numbered.
  10. 10. the device according to claim 6 for calculating transmission error rates of data, it is characterised in that the comparison module bag Include positive sequence comparing unit, backward comparing unit and correct byte number comparing unit;
    The positive sequence comparing unit, for second packet to be carried out into positive sequence with the first packet stored in transmitting terminal Compare one by one, be all mutually correct with data, count the first correct byte number;
    The backward comparing unit, for second packet to be carried out into backward with the first packet stored in transmitting terminal Compare one by one, be all mutually correct with data, count the second correct byte number;
    The correct byte number comparing unit, for by the first correct byte number obtained by positive sequence comparing unit and backward comparing unit The second correct byte number of gained is contrasted, and draws correct byte number;
    If the first correct byte number is more than or equal to the second correct byte number, the first correct byte number is correct byte number;If First correct byte number is less than the second correct byte number, then the second correct byte number is correct byte number.
CN201410495670.5A 2014-09-24 2014-09-24 A kind of method and device for calculating transmission error rates of data Active CN104283640B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410495670.5A CN104283640B (en) 2014-09-24 2014-09-24 A kind of method and device for calculating transmission error rates of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410495670.5A CN104283640B (en) 2014-09-24 2014-09-24 A kind of method and device for calculating transmission error rates of data

Publications (2)

Publication Number Publication Date
CN104283640A CN104283640A (en) 2015-01-14
CN104283640B true CN104283640B (en) 2017-12-08

Family

ID=52258160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410495670.5A Active CN104283640B (en) 2014-09-24 2014-09-24 A kind of method and device for calculating transmission error rates of data

Country Status (1)

Country Link
CN (1) CN104283640B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205725809U (en) * 2016-04-08 2016-11-23 同济大学 A kind of electric automobile distributed ring architectures of communication networks based on vehicle-mounted Ethernet
CN111258295A (en) * 2020-01-15 2020-06-09 重庆长安汽车股份有限公司 System and method for verifying big data acquisition and uploading accuracy
CN111541584B (en) * 2020-04-20 2022-11-01 上海航天测控通信研究所 1553B data transmission reliability test method, device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100461655C (en) * 2007-04-28 2009-02-11 北京交通大学 System and method for testing channel transmission performance with the practical channel and computer simulation
CN103780345A (en) * 2014-01-21 2014-05-07 清华大学 System and method for multi-buffering non-constant-speed code transmission of real-time service in intensive communication

Also Published As

Publication number Publication date
CN104283640A (en) 2015-01-14

Similar Documents

Publication Publication Date Title
CN104283640B (en) A kind of method and device for calculating transmission error rates of data
CN104199298B (en) A kind of method of CAN baud rate self-adapting
CN102185762B (en) Method for recognizing, extracting user data sending behavior
CN105959143B (en) A kind of FlexRay bus protocol analysis system and method based on digital fluorescence oscilloscope
US10396921B2 (en) Multi-lane synchronization method, synchronization apparatus and system, and computer storage medium
CN102510323A (en) Frame identifying method for serial data
CN105827367A (en) Wireless data transmission method and system
CN106452688A (en) Beidou data lost message retransmission method and system
CN102497265A (en) Pulse light signal identification method and apparatus thereof
CN103338092B (en) The method and system of distributed short-wave radio set communication
CN105024993A (en) Protocol comparison method based on vector operation
CN103425931B (en) A kind of abnormal web script detection method and system
CN105955915A (en) Method, device, and system for removing deflection of parallel data
CN109524068A (en) A kind of disease symptoms extracting method based on AC automatic machine
CN105515843A (en) FDIR (Fault Diagnosis, Isolation and Restoration) processing method for SpW (SpaceWire) network
CN106470091A (en) The method of telemetering under deep-space spacecraft low bit- rate
CN108063986A (en) Frame number bearing method, the apparatus and system of multichannel passive optical network
CN101848202A (en) Method for storing communication protocol as well as method and device for automatically matching communication protocol of external equipment
CN102968286B (en) A kind of data transfer tracking, device and system
US10032432B2 (en) Method, system and apparatus for transmitting intelligent information
CN104811422B (en) Data transmission method and device in a kind of Industrial Ethernet
CN103269289B (en) Air traffic control radar information test method and equipment
CN110381050A (en) The multi-protocols conversion method of calibration and device of data packet
CN105141395A (en) Frame payload extraction method in broadband access network system
CN101488193A (en) Wireless bar code data acquisition unit and system thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant