CN108551382B - Communication data error correction method and device - Google Patents

Communication data error correction method and device Download PDF

Info

Publication number
CN108551382B
CN108551382B CN201810246210.7A CN201810246210A CN108551382B CN 108551382 B CN108551382 B CN 108551382B CN 201810246210 A CN201810246210 A CN 201810246210A CN 108551382 B CN108551382 B CN 108551382B
Authority
CN
China
Prior art keywords
data
verified
error correction
verification
communication
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
CN201810246210.7A
Other languages
Chinese (zh)
Other versions
CN108551382A (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.)
Nanjing Yiduan Information Technology Co ltd
Chongqing Sibaigao Technology Co ltd
Original Assignee
Nanjing Yiduan Information Technology Co ltd
Chongqing Sibaigao Technology 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 Nanjing Yiduan Information Technology Co ltd, Chongqing Sibaigao Technology Co ltd filed Critical Nanjing Yiduan Information Technology Co ltd
Priority to CN201810246210.7A priority Critical patent/CN108551382B/en
Publication of CN108551382A publication Critical patent/CN108551382A/en
Application granted granted Critical
Publication of CN108551382B publication Critical patent/CN108551382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • 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

Abstract

The invention discloses a communication data error correction method and a communication data error correction device. Wherein the method comprises the following steps: receiving a communication data packet, wherein the communication data packet comprises first data to be verified and first verification data, and generating second verification data according to the first data to be verified; if the second check data is judged to be not matched with the first check data, error correction is carried out on the first data to be checked according to a first data error correction table, and second data to be checked are obtained; wherein the first data error correction table is preset; generating third verification data according to the second data to be verified; and if the third verification data is judged to be matched with the first verification data, processing the second data to be verified. The device is used for executing the method. The communication data error correction method and the communication data error correction device provided by the invention realize error correction of the received communication data and improve the communication efficiency.

Description

Communication data error correction method and device
Technical Field
The invention relates to the technical field of communication, in particular to a communication data error correction method and device.
Background
Various communication methods such as various wired communications and wireless communications are used in daily life. With the development of communication technology, in order to improve communication reliability, communication data needs to be checked.
In the prior art, a Cyclic Redundancy Check (CRC) code is usually used to Check received communication data, a data transmitting end generates a set of CRC codes according to transmitted data, transmits the transmitted data and the corresponding CRC codes to a data receiving end, the data receiving end recalculates a set of CRC codes according to the received data, compares the recalculated CRC codes with the received CRC codes, and if the two sets of CRC codes are different, indicates that the data received by the data receiving end has an error. After judging that the error data is received, the data receiving end may send a request for retransmission of data to the data transmitting end in case of having a bidirectional communication channel, so as to obtain correct data. Further, in order to correct the error data in the communication process, data transmission can be performed by using hamming codes or multidimensional cyclic redundancy codes, but the error correction by using the above method occupies the bandwidth, reduces the bandwidth utilization rate, and reduces the communication efficiency.
Therefore, how to provide a method for error correction of communication data, which can correct errors of received communication data to improve communication efficiency, is an important issue to be solved in the industry.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a communication data error correction method and a communication data error correction device.
In one aspect, the present invention provides a method for correcting errors of communication data, including:
receiving a communication data packet, wherein the communication data packet comprises first data to be verified and first verification data, and generating second verification data according to the first data to be verified;
if the second check data is judged to be not matched with the first check data, error correction is carried out on the first data to be checked according to a first data error correction table, and second data to be checked are obtained; wherein the first data error correction table is preset;
generating third verification data according to the second data to be verified;
and if the third verification data is judged to be matched with the first verification data, processing the second data to be verified.
In another aspect, the present invention provides a communication data error correction apparatus, including:
the receiving unit is used for receiving a communication data packet, wherein the communication data packet comprises first data to be verified and first verification data, and second verification data is generated according to the first data to be verified;
the first error correction unit is used for correcting errors of the first data to be verified according to a first data error correction table after judging that the second verification data is not matched with the first verification data, so as to obtain second data to be verified; wherein the first data error correction table is preset;
the first generating unit is used for generating third verification data according to the second data to be verified;
and the first processing unit is used for processing the second data to be verified after judging that the third verification data is matched with the first verification data.
In yet another aspect, the present invention provides an electronic device comprising: a processor, a memory, and a communication bus, wherein:
the processor and the memory are communicated with each other through the communication bus;
the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the communication data error correction method provided by the embodiments.
In yet another aspect, the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the communication data error correction method provided in the above embodiments.
According to the communication data error correction method and device provided by the invention, the communication data packet can be received, the second check data is generated according to the first check data included in the communication data packet, after the second check data is judged to be not matched with the first check data included in the communication data packet, the first check data is corrected according to the preset first data error correction table to obtain the second check data, then the third check data is generated according to the second check data, and after the third check data is judged to be matched with the first check data, the second check data is processed, so that the error correction of the received communication data is realized, and the communication efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a waveform of a signal received by a receiving end according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a communication data error correction method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a data structure of a communication data packet according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for error correction of communication data according to another embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a communication data error correction apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a communication data error correction apparatus according to another embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a communication data error correction apparatus according to another embodiment of the present invention;
fig. 8 is a schematic physical structure diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic diagram of a signal waveform received by a receiving end according to an embodiment of the present invention, as shown in fig. 1, although a transmitting end transmits a standard square wave signal during a communication process, the signal waveform received by the receiving end may change due to a response delay of a receiving device or a circuit, and particularly, at a rising edge and a falling edge of the signal waveform, an error may occur when the receiving end converts the signal waveform into a digital signal due to a gradual transition of the received signal waveform at the rising edge and the falling edge or a threshold selection difference when performing conversion between an analog signal and a digital signal, for example, a 0 is determined to be 1 at the rising edge or a 0 is determined to be 1 at the falling edge. With the acceleration of the frequency of the square wave signal sent by the sending end, the distortion of the signal waveform received by the receiving end is more obvious, and the data misjudgment caused by the distortion of the signal waveform is correspondingly increased. In view of the above situation, the present invention provides a communication data error correction method, which performs error correction on a received communication data packet, and can improve the accuracy of the received data, reduce retransmission or discarding of the data, and improve the communication efficiency. In the communication process, the sending end sends the communication data packet, and the receiving end receives the communication data packet, for example, the sending end is an electrical appliance remote controller, the receiving end is an electrical appliance corresponding to the electrical appliance remote controller, and the sending end and the receiving end are selected according to actual needs.
Fig. 2 is a schematic flow chart of a communication data error correction method according to an embodiment of the present invention, and as shown in fig. 1, the communication data error correction method provided by the present invention includes:
s201, receiving a communication data packet, wherein the communication data packet comprises first data to be verified and first verification data, and generating second verification data according to the first data to be verified;
specifically, in the communication process, a receiving end receives a communication data packet, where the communication data packet includes first data to be checked and first check data, and the first check data is used to check whether the first data to be checked is correct. In order to ensure the reliability of communication, the receiving end may check the first data to be checked, and the receiving end generates second check data according to the first data to be checked. It is understood that the second check data is generated in the same manner as the first check data.
For example, fig. 3 is a schematic data structure diagram of a communication data packet according to an embodiment of the present invention, and as shown in fig. 3, the communication data packet received by the receiving end includes a header, the first to-be-verified data, the first verification data, and a trailer. When the sending end sends the communication data packet, it sends original data corresponding to the first data to be checked and the first check data generated according to the original data, for example, the sending end generates a CRC code according to the original data, and the CRC code is used as the first check data. In an ideal situation, the first data to be verified is the same as the original data, but distortion of a signal waveform received by a receiving end may be caused due to a response delay of a receiving device or a circuit of the receiving end, so that the first data to be verified is different from the original data.
S202, if the second check data is judged to be not matched with the first check data, correcting the first data to be checked according to a first data error correction table to obtain second data to be checked; wherein the first data error correction table is preset;
specifically, after the receiving end generates the second check data, the second check data is compared with the first check data, and if the second check data is not matched with the first check data, it indicates that the first to-be-checked data is different from the original data, which is sent by the sending end and corresponds to the first to-be-checked data, and an error occurs. The first data to be verified comprises at least one data field, a first data error correction table is preset at the receiving end, and the first data error correction table stores error data fields which may occur in the communication process and data fields which are subjected to error correction and correspond to each other one by one. The receiving end searches the error data fields which are the same as the data fields included in the first data to be verified in the first data error correction table, and replaces the corresponding data fields in the first data to be verified with the data fields after error correction corresponding to the error data fields after the error data fields are found, so that second data to be verified are obtained. The error data field in the first data error correction table and the corresponding error-corrected data field may be set according to actual experience, which is not limited in the embodiment of the present invention.
For example, table 1 is a 4b/5b encoding table, and as shown in table 1, in order to ensure clock synchronization, a binary number of 4 bits can be represented by a binary number of 5 bits, 16 binary numbers of 5 bits are required, and the remaining 16 binary numbers of 5 bits are unused. It is possible to use 15 binary numbers of 5 bits other than 00000 among unused binary numbers of 5 bits as the error data field of the first data error correction table, indicate that the first data to be checked is erroneous when any one of the above-mentioned 15 binary numbers of 5 bits occurs in the first data to be checked, and set a binary number of 5 bits after error correction corresponding to a binary number of 5 bits each of the above-mentioned 15 binary numbers of 5 bits in the first data error correction table.
TABLE 1A 4b/5b coding table
Figure BDA0001606599600000061
Figure BDA0001606599600000071
Table 2 is a data error correction table according to an embodiment of the present invention, and as shown in table 2, table 2 is used as the first data error correction table, when the first to-be-verified data received by the receiving end includes an error data field in table 2, the receiving end obtains the error-corrected data field corresponding to the error data field, and replaces the corresponding data field in the first to-be-verified data with the error-corrected data field, so as to obtain the second to-be-verified data. As shown in table 2, table 2 is for the case where the receiving end identifies an error to the falling edge of the signal waveform.
TABLE 2 data error correction Table
Figure BDA0001606599600000072
Figure BDA0001606599600000081
Table 3 is a data error correction table according to another embodiment of the present invention, and as shown in table 3, taking table 3 as the first data error correction table, when the receiving end receives the first data to be verified that includes the error data field in table 3, the receiving end obtains the error-corrected data field corresponding to the error data field, and replaces the corresponding data field in the first data to be verified with the error-corrected data field, so as to obtain the second data to be verified. Table 3 addresses the case where the receiving end identifies an error to the rising edge of the signal waveform.
TABLE 3 data error correction Table
Error data field Error corrected data field
00111 00011
01011 01001
01101 00101
01110 00110
01111 00111
10011 10001
10110 10010
10111 10011
11001 01001
11010 01010
11011 11001
11100 01100
11101 01101
11110 01110
11111 01111
S203, generating third verification data according to the second data to be verified;
specifically, after obtaining the second data to be verified, the receiving end generates third verification data according to the second data to be verified. It is understood that the third check data is generated in the same manner as the first check data.
And S204, if the third verification data is judged to be matched with the first verification data, processing the second data to be verified.
Specifically, after obtaining the third verification data, the receiving end compares the third verification data with the first verification data, and if the third verification data matches the first verification data, it indicates that the second data to be verified is the same as the original data, which is sent by the sending end and corresponds to the first data to be verified. The receiving end may replace the first data to be verified with the second data to be verified, and then process the second data to be verified, where the processing is a subsequent operation after the receiving terminal obtains correct data through verification, for example, the receiving end may forward the second data to be verified, and perform an operation by using the second data to be verified, and the like, and an embodiment of the present invention is not limited.
For example, the first data to be verified is derived from a temperature sensor and used for displaying temperature, the receiving end replaces the first data to be verified with the second data to be verified and sends the second data to be verified to a display device, and the display device displays the temperature according to the second data to be verified.
According to the communication data error correction method provided by the invention, the communication data packet can be received, the second check data is generated according to the first data to be checked included in the communication data packet, after the second check data is judged to be not matched with the first check data included in the communication data packet, the first data to be checked is corrected according to the preset first data error correction table to obtain the second data to be checked, the third check data is generated according to the second data to be checked, and after the third check data is judged to be matched with the first check data, the second data to be checked is processed, so that the error correction of the received communication data is realized, and the communication efficiency is improved.
Fig. 4 is a schematic flowchart of a communication data error correction method according to another embodiment of the present invention, and as shown in fig. 4, the communication data error correction method provided by the present invention further includes:
s205, if the third verification data is judged to be not matched with the first verification data, correcting the first data to be verified according to a second data error correction table to obtain third data to be verified; wherein the second data error correction table is preset;
specifically, after the receiving end obtains the third check data, the third check data is compared with the first check data, and if the third check data is not matched with the first check data, it indicates that the second data to be checked is different from the original data, which is sent by the sending end and corresponds to the first data to be checked, and the second data to be checked, which is obtained through error correction, is still erroneous. And a second data error correction table is also preset at the receiving end, and error data fields which may occur in the communication process and the error-corrected data fields which respectively correspond one to one are stored in the second data error correction table. The receiving end searches the error data fields which are the same as the data fields included in the first data to be verified in the second data error correction table, and replaces the corresponding data fields in the first data to be verified with the error-corrected data fields corresponding to the error data fields after the error data fields are found, so that third data to be verified is obtained. The error data field in the second data error correction table and the corresponding error-corrected data field may be set according to actual experience, which is not limited in the embodiment of the present invention. It is understood that the second data error correction table is different from the first data error correction table, for example, the first data error correction table employs table 2 and the second data error correction table employs table 3, or the first data error correction table employs table 3 and the second data error correction table employs table 2.
S206, generating fourth verification data according to the third data to be verified;
specifically, after obtaining the third data to be verified, the receiving end generates fourth verification data according to the third data to be verified. It is understood that the generation method of the fourth check data is the same as the generation method of the first check data.
And S207, if the fourth verification data is judged to be matched with the first verification data, processing the third data to be verified.
Specifically, after obtaining the fourth verification data, the receiving end compares the fourth verification data with the first verification data, and if the fourth verification data matches the first verification data, it indicates that the third data to be verified is the same as the original data, which is sent by the sending end and corresponds to the first data to be verified. The receiving end may replace the first data to be verified with the third data to be verified, and process the third data to be verified.
On the basis of the foregoing embodiments, further, the method for correcting errors in communication data according to the present invention further includes:
and if the fourth verification data is judged to be not matched with the first verification data, discarding the first data to be verified.
Specifically, after the receiving end obtains the fourth check data, the fourth check data is compared with the first check data, and if the fourth check data is not matched with the first check data, it indicates that the third data to be checked is different from the original data, which is sent by the sending end and corresponds to the first data to be checked, and the third data to be checked, which is obtained through error correction, is still erroneous. The receiving end may discard the first data to be verified because the error correction of the first data to be verified cannot be completed. The receiving end may prompt the data error of the communication data packet or request the transmitting end to retransmit the communication data packet in the case of having a bidirectional communication channel.
On the basis of the foregoing embodiments, further, the method for correcting errors in communication data according to the present invention further includes:
and if the second check data is judged to be matched with the first check data, processing the first data to be checked.
Specifically, after the receiving end generates the second check data, the second check data is compared with the first check data, and if the second check data is matched with the first check data, it indicates that the first to-be-checked data is the same as the original data, which is sent by the sending end and corresponds to the first to-be-checked data. And the receiving end processes the first data to be verified.
On the basis of the foregoing embodiments, further, the method for correcting errors in communication data according to the present invention further includes:
and after receiving the communication data packet, carrying out integrity check on the communication data packet.
Specifically, after receiving the communication data packet, the receiving end may perform integrity check on the communication data packet according to a packet tail of the communication data packet, and after the communication data packet passes the integrity check, check reliability of the communication data packet and correct an error of the communication data packet if necessary.
For example, the end identifier of the communication data packet is stored at the packet tail of the data packet, and the receiving end determines that the communication data packet is complete when detecting the end identifier.
Fig. 5 is a schematic structural diagram of a communication data error correction apparatus according to an embodiment of the present invention, and as shown in fig. 5, the communication data error correction apparatus provided by the present invention includes a receiving unit 501, a first error correction unit 502, a first generation unit 503, and a first processing unit 504, where:
the receiving unit 501 is configured to receive a communication data packet, where the communication data packet includes first data to be verified and first verification data, and generate second verification data according to the first data to be verified; the first error correction unit 502 is configured to, after it is determined that the second check data is not matched with the first check data, correct an error of the first data to be checked according to a first data error correction table, and obtain second data to be checked; wherein the first data error correction table is preset; the first generating unit 503 is configured to generate third verification data according to the second data to be verified; the first processing unit 504 is configured to process the second data to be verified after it is determined that the third verification data matches the first verification data.
Specifically, during the communication process, the receiving unit 501 receives a communication data packet, where the communication data packet includes first data to be verified and first verification data, and the first verification data is used to verify whether the first data to be verified is correct. In order to ensure the reliability of communication, the first data to be verified is verified, and the receiving unit 501 generates second verification data according to the first data to be verified. It is understood that the second check data is generated in the same manner as the first check data.
After generating the second parity data, the first error correction unit 502 compares the second parity data with the first parity data, and if the second parity data does not match the first parity data, it indicates that the first to-be-verified data is different from the original data corresponding to the first to-be-verified data sent by the sending end, and an error occurs. The first to-be-verified data includes at least one data field, and a first data error correction table is preset in the first error correction unit 502, where the first data error correction table stores error data fields that may occur in a communication process and data fields that are error-corrected and correspond to each other one by one. The first error correction unit 502 searches the error data fields that are the same as the data fields included in the first data to be verified in the first data error correction table, and replaces the error-corrected data fields corresponding to the error data fields with the corresponding data fields in the first data to be verified after the error data fields are found, so as to obtain second data to be verified. The error data field in the first data error correction table and the corresponding error-corrected data field may be set according to actual experience, which is not limited in the embodiment of the present invention.
After obtaining the second data to be verified, the first generating unit 503 generates third verification data according to the second data to be verified. It is understood that the third check data is generated in the same manner as the first check data.
After obtaining the third verification data, the first processing unit 504 compares the third verification data with the first verification data, and if the third verification data matches the first verification data, it indicates that the second data to be verified is the same as the original data, which is sent by the sending end and corresponds to the first data to be verified. The first processing unit 504 may replace the first data to be verified with the second data to be verified, and then process the second data to be verified, where the processing is a subsequent operation of the first processing unit 504 after obtaining correct data through verification, for example, forwarding the second data to be verified, and performing an operation by using the second data to be verified, which is not limited in the embodiment of the present invention.
According to the communication data error correction device provided by the invention, the communication data packet can be received, the second check data is generated according to the first data to be checked included in the communication data packet, after the second check data is judged to be not matched with the first check data included in the communication data packet, the first data to be checked is corrected according to the preset first data error correction table to obtain the second data to be checked, the third check data is generated according to the second data to be checked, and after the third check data is judged to be matched with the first check data, the second data to be checked is processed, so that the error correction of the received communication data is realized, and the communication efficiency is improved.
Fig. 6 is a schematic structural diagram of a communication data error correction apparatus according to another embodiment of the present invention, and as shown in fig. 6, the communication data error correction apparatus further includes a second error correction unit 505, a second generation unit 506, and a second processing unit 507, where:
the second error correction unit 505 is configured to, after it is determined that the third check data is not matched with the first check data, perform error correction on the first data to be checked according to a second data error correction table, to obtain third data to be checked; wherein the second data error correction table is preset; the second generating unit 506 is configured to generate fourth verification data according to the third data to be verified; the second processing unit 507 is configured to process the third data to be verified after it is determined that the fourth verification data matches the first verification data.
Specifically, after obtaining the third check data, the second error correction unit 505 compares the third check data with the first check data, and if the third check data is not matched with the first check data, it indicates that the second data to be checked is different from the original data, which is sent by the sending end and corresponds to the first data to be checked, and the second data to be checked obtained through error correction is still wrong. A second data error correction table is preset in the second error correction unit 505, and the second data error correction table stores error data fields that may occur in the communication process and error-corrected data fields that respectively correspond one to one. The second error correction unit 505 searches the second data error correction table for the error data field that is the same as each data field included in the first data to be verified, and replaces the error-corrected data field corresponding to the error data field with the corresponding data field in the first data to be verified after the error data field is found, so as to obtain third data to be verified. The error data field in the second data error correction table and the corresponding error-corrected data field may be set according to actual experience, which is not limited in the embodiment of the present invention. It is understood that the second data error correction table is different from the first data error correction table, for example, the first data error correction table employs table 2 and the second data error correction table employs table 3, or the first data error correction table employs table 3 and the second data error correction table employs table 2.
After obtaining the third data to be verified, the second generating unit 506 generates fourth verification data according to the third data to be verified. It is understood that the generation method of the fourth check data is the same as the generation method of the first check data.
After obtaining the fourth verification data, the second processing unit 507 compares the fourth verification data with the first verification data, and if the fourth verification data matches the first verification data, it indicates that the third data to be verified is the same as the original data, which is sent by the sending end and corresponds to the first data to be verified. The second processing unit 507 may replace the first data to be verified with the third data to be verified, and process the third data to be verified.
Fig. 7 is a schematic structural diagram of a communication data error correction apparatus according to another embodiment of the present invention, and as shown in fig. 7, the communication data error correction apparatus further includes a discarding unit 508, where:
the discarding unit 508 is configured to discard the first to-be-verified data after it is determined that the fourth verification data is not matched with the first verification data.
Specifically, the discarding unit 508 compares the fourth check data with the first check data after obtaining the fourth check data, and if the fourth check data is not matched with the first check data, it indicates that the third data to be checked is different from the original data, which is sent by the sending end and corresponds to the first data to be checked, and the third data to be checked, which is obtained through error correction, is still erroneous. The discarding unit 508 may discard the first data to be verified because error correction of the first data to be verified cannot be completed. The discarding unit 508 may prompt the communication packet for a data error or request the sender to retransmit the communication packet if a bidirectional communication channel is available.
The embodiment of the apparatus provided in the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the apparatus are not described herein again, and refer to the detailed description of the above method embodiments.
Fig. 8 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 8, the electronic device includes a processor (processor)801, a memory (memory)802, and a communication bus 803;
the processor 801 and the memory 802 complete communication with each other through a communication bus 803;
the processor 801 is configured to call program instructions in the memory 802 to perform the methods provided by the above-described method embodiments, including, for example: receiving a communication data packet, wherein the communication data packet comprises first data to be verified and first verification data, and generating second verification data according to the first data to be verified; if the second check data is judged to be not matched with the first check data, error correction is carried out on the first data to be checked according to a first data error correction table, and second data to be checked are obtained; wherein the first data error correction table is preset; generating third verification data according to the second data to be verified; and if the third verification data is judged to be matched with the first verification data, processing the second data to be verified.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: receiving a communication data packet, wherein the communication data packet comprises first data to be verified and first verification data, and generating second verification data according to the first data to be verified; if the second check data is judged to be not matched with the first check data, error correction is carried out on the first data to be checked according to a first data error correction table, and second data to be checked are obtained; wherein the first data error correction table is preset; generating third verification data according to the second data to be verified; and if the third verification data is judged to be matched with the first verification data, processing the second data to be verified.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: receiving a communication data packet, wherein the communication data packet comprises first data to be verified and first verification data, and generating second verification data according to the first data to be verified; if the second check data is judged to be not matched with the first check data, error correction is carried out on the first data to be checked according to a first data error correction table, and second data to be checked are obtained; wherein the first data error correction table is preset; generating third verification data according to the second data to be verified; and if the third verification data is judged to be matched with the first verification data, processing the second data to be verified.
In addition, the logic instructions in the memory may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer (which may be a personal computer, an apparatus, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for error correction of communication data, comprising:
receiving a communication data packet, wherein the communication data packet comprises first data to be verified and first verification data, and generating second verification data according to the first data to be verified;
if the second check data is judged to be not matched with the first check data, error correction is carried out on the first data to be checked according to a first data error correction table, and second data to be checked are obtained; wherein the first data error correction table is preset;
generating third verification data according to the second data to be verified;
if the third verification data is judged to be matched with the first verification data, processing the second data to be verified;
if the third verification data is judged to be not matched with the first verification data, error correction is carried out on the first data to be verified according to a second data error correction table, and third data to be verified are obtained; wherein the second data error correction table is preset.
2. The method of claim 1, further comprising:
generating fourth verification data according to the third data to be verified;
and if the fourth verification data is judged to be matched with the first verification data, processing the third data to be verified.
3. The method of claim 2, further comprising:
and if the fourth verification data is judged to be not matched with the first verification data, discarding the first data to be verified.
4. The method of claim 1, further comprising:
and if the second check data is judged to be matched with the first check data, processing the first data to be checked.
5. The method of any of claims 1 to 4, further comprising:
and after receiving the communication data packet, carrying out integrity check on the communication data packet.
6. An apparatus for error correction of communication data, comprising:
the receiving unit is used for receiving a communication data packet, wherein the communication data packet comprises first data to be verified and first verification data, and second verification data is generated according to the first data to be verified;
the first error correction unit is used for correcting errors of the first data to be verified according to a first data error correction table after judging that the second verification data is not matched with the first verification data, so as to obtain second data to be verified; wherein the first data error correction table is preset;
the first generating unit is used for generating third verification data according to the second data to be verified;
the first processing unit is used for processing the second data to be verified after the third verification data is judged to be matched with the first verification data;
the device further comprises: the second error correction unit is used for correcting the error of the first data to be verified according to a second data error correction table after judging that the third verification data is not matched with the first verification data, so as to obtain third data to be verified; wherein the second data error correction table is preset.
7. The apparatus of claim 6, further comprising:
the second generating unit is used for generating fourth verification data according to the third data to be verified;
and the second processing unit is used for processing the third data to be verified after judging that the fourth verification data is matched with the first verification data.
8. The apparatus of claim 7, further comprising:
and the discarding unit is used for discarding the first to-be-verified data after judging that the fourth verification data is not matched with the first verification data.
9. An electronic device, comprising: a processor, a memory, and a communication bus, wherein:
the processor and the memory are communicated with each other through the communication bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 5.
10. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 5.
CN201810246210.7A 2018-03-23 2018-03-23 Communication data error correction method and device Active CN108551382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810246210.7A CN108551382B (en) 2018-03-23 2018-03-23 Communication data error correction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810246210.7A CN108551382B (en) 2018-03-23 2018-03-23 Communication data error correction method and device

Publications (2)

Publication Number Publication Date
CN108551382A CN108551382A (en) 2018-09-18
CN108551382B true CN108551382B (en) 2021-06-25

Family

ID=63516964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810246210.7A Active CN108551382B (en) 2018-03-23 2018-03-23 Communication data error correction method and device

Country Status (1)

Country Link
CN (1) CN108551382B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352754B (en) * 2018-12-21 2023-09-15 中国石油天然气集团有限公司 Error detection and correction method for data storage and data storage device
CN109495217A (en) * 2019-01-17 2019-03-19 江西理工大学应用科学学院 A kind of artificial intelligence communication data monitoring system and monitoring method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1176726A1 (en) * 2000-03-02 2002-01-30 Kawasaki Steel Corporation Decoder
CN1815937A (en) * 2005-02-03 2006-08-09 中兴通讯股份有限公司 Method for error-correcting by circulation redundance calibrating for personal hand-helding system
CN101232348A (en) * 2006-10-04 2008-07-30 马维尔国际贸易有限公司 Method and device for error correcting using cyclic redundancy check
CN103763067A (en) * 2014-01-28 2014-04-30 天地融科技股份有限公司 Method and device for error correction and calibration of communication data packets

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103197984B (en) * 2012-01-10 2016-03-09 炬芯(珠海)科技有限公司 A kind of method and apparatus data being carried out to debugging

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1176726A1 (en) * 2000-03-02 2002-01-30 Kawasaki Steel Corporation Decoder
CN1815937A (en) * 2005-02-03 2006-08-09 中兴通讯股份有限公司 Method for error-correcting by circulation redundance calibrating for personal hand-helding system
CN101232348A (en) * 2006-10-04 2008-07-30 马维尔国际贸易有限公司 Method and device for error correcting using cyclic redundancy check
CN103763067A (en) * 2014-01-28 2014-04-30 天地融科技股份有限公司 Method and device for error correction and calibration of communication data packets

Also Published As

Publication number Publication date
CN108551382A (en) 2018-09-18

Similar Documents

Publication Publication Date Title
CN107257270B (en) Data transmission method and system based on hybrid automatic repeat request
JP2009528728A (en) Error detection method and error detection apparatus in data block
JP2012147197A (en) Communication device, communication method, and communication program
CN108551382B (en) Communication data error correction method and device
CN103763067A (en) Method and device for error correction and calibration of communication data packets
CN108600124B (en) Network unpacking and packing method based on safety protocol
CN108337069B (en) Improved error rate reducing end parallel grouping CRC (Cyclic redundancy check) system
EP4274127A1 (en) Data transmission method and apparatus, and device, system and computer-readable storage medium
CN102780496A (en) RS (Reed-Solomon) code decoding method and device
CN110806948A (en) Data verification method and device
CN108270508B (en) Cyclic redundancy check CRC implementation method, device and network equipment
CN111183748B (en) Error code resisting method based on cyclic redundancy check and erasure correction coding
US9432058B2 (en) Error correction apparatus and associated method
CN109217982B (en) Data transmission method and device, sending equipment and receiving equipment
JP5376990B2 (en) Relay device and relay method of relay device
CN112073153B (en) Virtual inspection judging method and device, storage medium and terminal
CN111181628B (en) Method, terminal and storage medium for transmitting voice data through Beidou short message
US10833799B2 (en) Message correction and dynamic correction adjustment for communication systems
CN111130695B (en) Method for calculating CANOPEN protocol CRC through redundant code words
JP5895238B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
JP5589995B2 (en) Information processing device
CN101588222A (en) Communication adapter with error correction processing function and application thereof
TWI399042B (en) To detect the wrong position of the detection device
CN116722954B (en) Encoding and decoding verification system, method, equipment and storage medium
WO2016063728A1 (en) Receiving device, receiving method for receiving device, and program

Legal Events

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