CN110806948B - Data verification method and device - Google Patents

Data verification method and device Download PDF

Info

Publication number
CN110806948B
CN110806948B CN201911054147.8A CN201911054147A CN110806948B CN 110806948 B CN110806948 B CN 110806948B CN 201911054147 A CN201911054147 A CN 201911054147A CN 110806948 B CN110806948 B CN 110806948B
Authority
CN
China
Prior art keywords
data
processed
receiving end
check
transmission
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
CN201911054147.8A
Other languages
Chinese (zh)
Other versions
CN110806948A (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.)
Shanghai IC R&D Center Co Ltd
Original Assignee
Shanghai IC R&D Center 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 Shanghai IC R&D Center Co Ltd filed Critical Shanghai IC R&D Center Co Ltd
Priority to CN201911054147.8A priority Critical patent/CN110806948B/en
Publication of CN110806948A publication Critical patent/CN110806948A/en
Application granted granted Critical
Publication of CN110806948B publication Critical patent/CN110806948B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/09Error detection only, e.g. using cyclic redundancy check [CRC] codes or single parity bit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

The invention provides a data verification method and a data verification device, wherein the method comprises the following steps: the transmitting end performs a first preprocessing operation on the first data to obtain second data, and the second data is transmitted to the data transmission channel; in the process of executing the first preprocessing operation, the detection component checks the data processed by the sending end so as to check whether the data processed by the sending end is consistent with the first data; the data transmission channel transmits the second data to the receiving end, and the detection component checks the transmission data in the data transmission channel in the process of transmitting the data so as to check whether the transmission data is consistent with the second data; the receiving end executes a second preprocessing operation on the second data; in the process of executing the second preprocessing operation, the detection component checks the data processed by the receiving end so as to check whether the data processed by the receiving end is consistent with the second data. The data verification method and the data verification device can ensure the stability of data processing and transmission and ensure the correct proceeding of subsequent operation.

Description

Data verification method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data verification method and apparatus.
Background
In the technical field of data processing, a single chip microcomputer (Micro Control Unit, MCU) generally runs a plurality of pipelines in parallel to process data. There are multiple modules on each pipeline that perform different operations on the data sequence to process the data to obtain the desired data.
Specifically, on a pipeline, a first module on the pipeline may acquire data to be processed, perform a first operation (such as a finger fetching operation, a decoding operation, an executing operation, or a write-back operation) on the data to be processed to obtain new data, and send the new data to a second module so that the second module performs a second operation on the new data, where the second operation is a next stage operation of the first operation. And then, the second module sends the data obtained after the second operation is executed to the third module, and the data is pushed until the last module on the pipeline outputs the data, so that the data output by the last module is the required data.
However, in the related art, during the process of processing data by a certain module, errors may be avoided in the processed data, for example, a certain data bit of the processed data may be flipped, which may cause errors in the processing result of the module, thereby affecting the correct performance of the second preprocessing operation. Meanwhile, in the process of transferring data from one module to another module, errors are also unavoidable in the data, and at this time, the data received by the other module is wrong data, which affects the processing result and also affects the correct execution of the second preprocessing operation.
Disclosure of Invention
The invention aims to provide a data verification method and a data verification device, which are used for ensuring that errors do not occur in the process of processing and transmitting data, improving the stability of data processing and data transmission and further ensuring that the follow-up operation can be correctly performed.
The invention provides a data verification method, which comprises the following steps:
a transmitting end acquires first data to be processed, performs first preprocessing operation on the first data to obtain second data to be transmitted, and transmits the second data to a data transmission channel; during the process of executing the first preprocessing operation, the detection component checks the data processed by the sending end to check whether the data processed by the sending end is consistent with the first data, if not, an alarm is sent out, or error correction is carried out on the data processed by the sending end to obtain the first data, and the first preprocessing operation is continuously executed;
after the data transmission channel receives the second data, transmitting the second data to a receiving end, wherein in the process of transmitting the data by the data transmission channel, the detection component is utilized to verify the transmission data in the data transmission channel so as to verify whether the transmission data are consistent with the second data, if not, an alarm is sent out, or error correction is carried out on the transmission data so as to obtain the second data, and the transmission is continued;
The receiving end receives the second data and executes a second preprocessing operation on the second data; and in the process of executing the second preprocessing operation, the detection component checks the data processed by the receiving end to check whether the data processed by the receiving end is consistent with the second data, if not, an alarm is sent out, or error correction is carried out on the data processed by the receiving end to obtain the second data, and the second preprocessing operation is continuously executed.
Optionally, the step of verifying the data processed by the transmitting end by the detecting component is performed synchronously with the first preprocessing operation; the step of checking the transmission data in the data transmission channel by the detection component is synchronous with the step of transmitting the first data by the data transmission channel; and the step of checking the data processed by the receiving end by the detection component is synchronous with the second preprocessing operation, so that the step of checking is performed without adding extra time, thereby saving time and improving efficiency.
Optionally, after the sending end obtains the first data, the sending end sends the first data to a detection component.
Optionally, the method for verifying the data processed by the sending end by the detection component includes:
and determining a first check code based on the acquired first data by using a preset check method, acquiring the data processed by the transmitting end in real time, and checking the data processed by the transmitting end in real time based on the first check code by using the preset check method so as to check whether the data processed by the transmitting end is consistent with the first data or not, and if not, sending an alarm or correcting errors of the data processed by the transmitting end based on the first check code.
Optionally, the method for verifying the data processed by the sending end by the detection component includes:
acquiring data processed by the transmitting end in real time, and comparing whether the acquired data processed by the transmitting end is consistent with the first data or not; and if the data are inconsistent, executing a turning operation to correct the error of the data inconsistent with the first data in the data processed by the sending end.
Optionally, the sending end sends the second data to the data transmission channel and the detection component synchronously.
Optionally, the method for checking the transmission data in the data transmission channel by the detection component includes:
Determining a second check code based on the acquired second data by using a preset check method, acquiring the transmission data in the data transmission channel in real time, and checking the transmission data in real time by using the preset check method based on the second check code to check whether the transmission data are consistent with the second data or not, if not, sending an alarm, or correcting the transmission data in the data transmission channel based on the second check code.
Optionally, the method for checking the transmission data in the data transmission channel by the detection component includes:
acquiring transmission data in the data transmission channel in real time, and comparing whether the acquired transmission data is consistent with the second data; and if the data in the transmission data of the data transmission channel are inconsistent, performing a flipping operation to correct errors on the data inconsistent with the second data, and continuing to transmit.
Optionally, the method for verifying the data processed by the receiving end by the detection component includes:
and determining a third check code based on the acquired second data by using a preset check method, acquiring the data processed by the receiving end in real time, and checking the data processed by the receiving end in real time by using the preset check method based on the third check code so as to check whether the data processed by the receiving end is consistent with the second data or not, and if not, sending an alarm or correcting errors of the data processed by the transmitting end based on the third check code.
Optionally, the method for verifying the data processed by the receiving end by the detection component includes:
acquiring data processed by the receiving end in real time, and comparing whether the acquired data processed by the receiving end is consistent with the second data; and if the data are inconsistent, executing a turning operation to correct the error of the data inconsistent with the second data in the data processed by the receiving end.
Optionally, the method for verifying the data processed by the receiving end by the detection component includes:
and acquiring the data processed by the receiving end in real time, and performing real-time verification on the data processed by the receiving end based on the second verification code by using the preset verification method to verify whether the data processed by the receiving end is consistent with the second data, if not, sending an alarm, or performing error correction on the data processed by the transmitting end based on the third verification code.
Optionally, the predetermined check method includes a parity check or cyclic redundancy check method or a hamming check method.
Optionally, the detection component includes logic circuitry.
In addition, the invention also provides a data verification device, which comprises:
The data transmission system comprises a transmitting end, a data transmission channel and a data transmission channel, wherein the transmitting end is used for acquiring first data to be processed, executing first preprocessing operation on the first data to obtain second data to be transmitted, and transmitting the second data to the data transmission channel;
the data transmission channel is used for receiving the second data and transmitting the second data to a receiving end;
the receiving end is used for receiving the second data and executing a second preprocessing operation on the second data;
a detection assembly for:
in the process that a transmitting end executes first preprocessing operation, verifying the data processed by the transmitting end to verify whether the data processed by the transmitting end is consistent with the first data, if not, sending an alarm, or correcting errors of the data processed by the transmitting end to obtain the first data, and continuing to execute the first preprocessing operation;
in the process of transmitting second data through the data transmission channel, checking the transmission data in the data transmission channel to check whether the transmission data are consistent with the second data, if not, sending an alarm, or correcting the transmission data to obtain the second data, and continuing transmission;
And in the process of executing the second preprocessing operation by the receiving end, checking the data processed by the receiving end to check whether the data processed by the receiving end is consistent with the second data, if not, sending out an alarm, or correcting the error of the data processed by the receiving end to obtain the second data, and continuing to execute the second preprocessing operation.
In summary, in the data verification method and device provided by the invention, the sending end or the receiving end performs the preprocessing operation on the acquired data, and the detection component synchronously verifies the data processed by the sending end or the receiving end so as to verify whether the data processed by the sending end or the receiving end is consistent with the data received by the sending end or the receiving end, thereby ensuring that the data processed by the sending end or the receiving end cannot be error data, namely ensuring the stability of the sending end or the receiving end on data processing, and further ensuring the correct proceeding of the subsequent operation. In addition, in the invention, when the data transmission channel transmits the acquired data, the detection component is utilized to synchronously check the transmission data of the data transmission channel so as to verify whether the transmission data is the data acquired by the data transmission channel, thereby ensuring that the transmission data of the data transmission channel cannot be transmitted in error, ensuring the stability of data transmission and ensuring the correct proceeding of subsequent operations.
In addition, in the invention, the verification steps are all executed synchronously with the processing steps or the transmission steps, so that no extra time is needed for verification, thereby saving time and improving efficiency.
Drawings
Fig. 1 is a schematic flow chart of a data verification method according to the present embodiment;
fig. 2 is a timing chart of a data transmission process and a verification step performed by a detection component according to the present embodiment;
FIG. 3 is a timing chart illustrating another data transmission process and a checking step performed by the detecting component according to the present embodiment;
fig. 4 is a schematic structural diagram of a data verification device according to the present embodiment.
Detailed Description
The data verification method and the data verification device provided by the invention are further described in detail below with reference to the accompanying drawings and the specific embodiments. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the drawings are in a very simplified form and are all to a non-precise scale, merely for convenience and clarity in aiding in the description of embodiments of the invention.
Fig. 1 is a flow chart of a data verification method provided in this embodiment, as shown in fig. 1, where the method includes:
step 100, a transmitting end acquires first data to be processed, performs a first preprocessing operation on the first data to obtain second data to be transmitted, and transmits the second data to a data transmission channel; and in the process of executing the first preprocessing operation, the detection component checks the data processed by the sending end to check whether the data processed by the sending end is consistent with the first data, if not, an alarm is sent out, or error correction is carried out on the data processed by the sending end to obtain the first data, and the first preprocessing operation is continuously executed.
The sending end may be a processing module, and the first preprocessing operation may include, but is not limited to, one of a finger fetching operation, a decoding operation, an executing operation, and a write-back operation. In this embodiment, the period of time for performing the first preprocessing operation may be specifically one clock cycle.
In addition, in this embodiment, the step of verifying the data processed by the transmitting end by the detecting component (for example, may be composed of a logic circuit) should be performed synchronously with the first preprocessing operation, so that the detecting component can perform real-time verification on the data processed by the transmitting end, so as to determine whether the data processed by the transmitting end is correct in real time, and, when the data processed by the transmitting end is incorrect, alert that an alarm indicates that the data processed by the transmitting end is correct, or perform error correction on the data processed by the transmitting end and continue to perform the first preprocessing operation. Therefore, the data processed by the sending end can be ensured not to be error data in the process of executing the first preprocessing operation, the stability of data processing is improved, and the correct execution of the follow-up operation is ensured.
Step 200, after the data transmission channel receives the second data, transmitting the second data to a receiving end, wherein in the process of transmitting the data by the data transmission channel, the detection component is utilized to verify the transmission data in the data transmission channel so as to verify whether the transmission data is consistent with the second data, if not, an alarm is sent out, or error correction is performed on the transmission data so as to obtain the second data, and the transmission is continued.
In this embodiment, the period of time for transmitting the first data from the transmitting end to the receiving end by using the data transmission channel may specifically be one clock cycle.
And the step of checking the transmission data in the data transmission channel by the detection component is synchronous with the step of transmitting the first data by the data transmission channel, so that the detection component can check the transmission data in the data transmission channel in real time to determine whether the transmission data is correct or not, and when the transmission data is incorrect, an alarm prompts or the transmission data in the data transmission channel is corrected and continuously transmitted, thereby ensuring that the data transmitted by the data transmission channel is not error data when the data is transmitted, improving the stability of data transmission and ensuring the correct operation of subsequent operations.
Step 300, a receiving end receives the second data and executes a second preprocessing operation on the second data; and in the process of executing the second preprocessing operation, the detection component checks the data processed by the receiving end to check whether the data processed by the receiving end is consistent with the second data, if not, an alarm is sent out, or error correction is carried out on the data processed by the receiving end to obtain the second data, and the second preprocessing operation is continuously executed.
The receiving end may also be a processing module, and the second preprocessing operation may also include, but is not limited to, one of a finger fetching operation, a decoding operation, an executing operation, and a write-back operation. And, the second preprocessing operation should be a next stage operation of the first preprocessing operation, for example, when the first preprocessing operation is a finger fetching operation, the second preprocessing operation should be a decoding operation; when the first preprocessing operation is a coding operation, the second preprocessing operation should be an execution operation. And, in this embodiment, the period of time for performing the second preprocessing operation may also be one clock cycle.
And similarly, in this step, the step of verifying the data processed by the receiving end by the detection component and the second preprocessing operation should be performed synchronously, so that it can be ensured that the data processed by the receiving end is not error data when the second preprocessing operation is performed, improving stability of data processing, and ensuring correct performance of subsequent operations.
In addition, it should be noted that, when the receiving end performs the second preset operation on the second data, the receiving end may be used as a transmitting end and may transmit the third data to another processing module by using a data transmission channel, where the other processing module should be the receiving end and may perform a third preprocessing operation on the received third data, and the third preprocessing operation should be a next stage operation of the second preprocessing operation.
In summary, in the data verification method provided by the invention, the sending end or the receiving end performs the preprocessing operation on the acquired data, and the detection component synchronously verifies the data processed by the sending end or the receiving end so as to verify whether the data processed by the sending end or the receiving end is consistent with the data received by the sending end or the receiving end, thereby ensuring that the data processed by the sending end or the receiving end cannot be error data, namely ensuring the stability of the sending end or the receiving end on data processing, and further ensuring the correct proceeding of the subsequent operation. In addition, in the invention, when the data transmission channel transmits the acquired data, the detection component is utilized to synchronously check the transmission data of the data transmission channel so as to verify whether the transmission data is the data acquired by the data transmission channel, thereby ensuring that the transmission data of the data transmission channel cannot be transmitted in error, ensuring the stability of data transmission and ensuring the correct proceeding of subsequent operations.
In addition, in the invention, the verification steps are all executed synchronously with the processing steps or the transmission steps, so that no extra time is needed for verification, thereby saving time and improving efficiency.
The above data verification method will be described in detail below.
Example 1
In the step 100, when the transmitting end acquires the first data to be processed, the transmitting end synchronously transmits the first data to the detecting component, so that when the subsequent transmitting end executes the first preprocessing operation, the detecting component can verify the data processed by the transmitting end based on the first data acquired by the transmitting end, and when the transmitting end acquires the second data, the transmitting end synchronously transmits the second data to the data transmission channel and the detecting component, so that the subsequent detecting component verifies the data transmitted by the data transmission channel and the data processed by the receiving end based on the second data.
And in the step 100, the method for verifying the data processed by the sending end by the detection component based on the first data acquired by the detection component may specifically include, but is not limited to, the following two methods:
in the first method, the detection component receives and stores the first data sent by the sending end, acquires the data processed by the sending end in real time, compares whether the acquired data processed by the sending end and the stored first data are consistent, and when the acquired data processed by the sending end and the stored first data are inconsistent, performs a flipping operation on the data inconsistent with the stored first data in the data processed by the sending end to correct errors, and continues to perform a first preprocessing operation.
Specifically, for the first method, fig. 2 is a timing chart of a data transmission flow and a checking step executed by a detecting component according to the present embodiment. As shown in fig. 2, M in fig. 2 corresponds to a timing chart of processing data by the transmitting end, the data transmission channel, and the receiving end, and N corresponds to a timing chart of performing a verification step by the detecting component. Referring to M in fig. 2, at time a, a transmitting end acquires first data, at time a-b, the transmitting end executes a first preprocessing operation, and at time b, the first preprocessing operation is completed to acquire second data, and the second data is transmitted to a data transmission channel. Thereafter, the second data is transmitted by the data transmission channel during the b-c period, and the data transmission channel transmits the second data to the receiving end at the c time, and the receiving end performs a second preprocessing operation on the second data during the c-d period.
And referring to N in fig. 2, for the detection component, at time a, the detection component receives the first data sent by the sending end, then, in a time period a-b, the detection component can acquire the data processed by the sending end in real time, compares whether the acquired data processed by the sending end and the first data stored by the sending end are consistent, and when the acquired data processed by the sending end and the first data stored by the sending end are inconsistent, performs a flipping operation on bits inconsistent with the first data in the data processed by the sending end to correct errors, and continues to perform a first preprocessing operation, so that the data processed by the sending end in the time period a-b can be ensured to be always the first data, the data processed by the sending end is ensured to be always correct data, and the correct execution of subsequent operations is ensured.
For example, assuming that the first data acquired by the transmitting end is 10110011 (all the examples that follow are described with reference to the first data being 10110011), the transmitting end will transmit the first data 10110011 to the detecting component. And, assuming that at a certain moment in the a-b time period, the processing data acquired by the detection component from the sending end is 10110010, by comparing, it can be determined that the data 10110010 processed by the acquired sending end is inconsistent with the last bit of the first data 10110011 stored in the data acquisition component, and then it can be determined that the data processed by the sending end at the current moment is error data. At this time, the detection component may perform a flip operation on the last bit of the data processed by the sender to correct errors, that is, change "0" of the last bit to "1", thereby changing the data processed by the sender at the current time to 10110011, and then continue to perform the first preprocessing operation. In this way, it can be ensured that the data processed by the transmitting end is always correct, that is, always the first data 10110011, thereby ensuring the stability of data processing.
In the second method, after the detection component receives the first data sent by the sending end, a first check code is determined based on the first data by using a preset check method, then the detection component can acquire the data processed by the sending end in real time, and the data processed by the sending end is checked in real time based on the first check code by using the preset check method.
For the second method, fig. 3 is a timing chart of a data transmission flow and a checking step executed by the detecting component according to the present embodiment. As shown in fig. 3, m in fig. 3 corresponds to a timing chart of processing data by the transmitting end, the data transmission channel, and the receiving end, and n corresponds to a timing chart of performing a verification step by the detecting component. The M timing diagram in fig. 3 is the same as the M timing diagram in fig. 2, that is, the transmitting end of the a-b period in fig. 3 performs the first preprocessing operation, the data transmission channel of the b-c period transmits data, and the receiving end of the c-d period performs the second preprocessing operation. And, further referring to fig. 3, it can be seen that, for the detection component, at time a, the detection component receives the first data sent by the sending end, and during time a-e, the detection component determines a first check code based on the first data by using a predetermined check method, and at time e, the detection component determines the first check code, and then, during time e-b, the detection component obtains the data processed by the sending end in real time, and performs real-time check on the data processed by the sending end based on the first check code by using the predetermined check method, so as to check whether the data processed by the sending end is consistent with the first data.
It should be noted that the predetermined verification methods may include a plurality of types, and different predetermined verification methods determine the first verification code in different manners, and the verification manners of the data based on the first verification code are also different. In this regard, in the present embodiment, a method for determining the first check code and a specific check scheme will be described by taking a parity check method, a cyclic redundancy check method, and a hamming check method as examples, respectively.
The length of the generated first check code is 1 bit for the parity check method, the first check code is 0 or 1, the parity check method specifically comprises odd check and even check, the requirements of the odd check and the even check on the first check code are different, and the check methods are different.
For odd parity, the first parity should satisfy the following requirements: when the first check code is added to the first data to be checked, a new sequence containing an odd number of 1's can be obtained.
For example, assuming that the first data is 10110011, it may be determined that the first data includes five "1", that is, includes an odd number of "1", and the first check code determined by the detection component based on the first data should be "0", so that when the first check code "0" is added to the first data 10110011, the new sequence "101100110" obtained by adding the first check code "0" to the first data includes five "1", that is, an odd number of "1".
In the first embodiment, the method for the detection component to verify the data processed by the transmitting end based on the first verification code by using the odd verification may be: and after the detection component determines the first check code, the first check code is stored, the data processed by the sending end is obtained in real time, then the stored first check code and the obtained data processed by the sending end are combined to obtain a new sequence, when the new sequence contains an odd number of 1 s, the data processed by the sending end is correct, and otherwise, the data processed by the sending end is wrong, and an alarm is triggered.
For example, assuming that the processing data acquired by the detection component from the transmitting end is 10110011, combining the first check code "0" with the data "10110011" processed by the transmitting end acquired by the detection component to obtain a new sequence "101100110", where the new sequence "101100110" includes an odd number of "1", and then it can be determined that the data processed by the transmitting end at the current moment is correct; if the processing data acquired from the transmitting end by the detecting component is 10110010, the first check code "0" and the processing data acquired from the first check code "10110010" are combined to obtain a new sequence "101100100", and the new sequence includes an even number of "1", but not an odd number, so that the data processed by the transmitting end at the current moment is wrong, and an alarm is triggered at the moment.
And, for even parity, the first parity should satisfy the following requirements: when the first check code is added to the first data to be checked, a new sequence containing an even number of 1's can be obtained. In the first embodiment, the method for the detection component to verify the first data based on the first verification code by using the odd verification may be: the detection component acquires the data processed by the sending end in real time, combines the first check code and the acquired data processed by the sending end to obtain a new sequence, and when the new sequence contains an even number of 1 s, the data processed by the sending end is correct, otherwise, the data processed by the sending end is wrong, and an alarm is triggered.
Further, for the cyclic redundancy check method (Cyclic Redundancy Check, CRC), a CRC-16 check method, a CRC-32 check method, a CRC-12 check method, a CRC-CCITT check method, a CRC-8 check method, a CRC-4 check method, and the like are also specifically classified. In the present embodiment, a predetermined check method is specifically described as a CRC-4 check method.
Based on this, the method for calculating the first check code by using the CRC-4 check method can be as follows: providing a first data and a generating polynomial corresponding to CRC-4 in advance, wherein the generating polynomial corresponding to CRC-4 corresponds to different generating polynomials for different types of CRC check methods, and the generating polynomial corresponding to CRC-4 is specifically G (X) =X 4 +X 3 +1. And determining a binary sequence corresponding to the generator polynomial and the bit number of the first check code based on the generator polynomial, wherein the bit number of the first check code is supposed to be the highest power of the generator polynomial. Then, the binary sequence is removed from the first data in a modulo-two division manner, a remainder is calculated, and when the remainder is calculated, the number of bits of the remainder is made to be the same as the number of bits of a predetermined first check code, and finally, the remainder can be determined as the first check code of the first data.
For example, assuming the first data is 10110011, the generator polynomial G (X) =x 4 +X 3 +1, the method of calculating the first check code should be: based on the generator polynomial G (X) =x 4 +X 3 +1 determines its corresponding binary sequence, which should be 11001, and determines the number of bits of the first check code based on the generator polynomial, which should be generator polynomial G (X) =x 4 +X 3 The highest power of +1, i.e. 4. Then, the binary sequence is removed from the first data 10110011 by modulo-two division to be 11001, and a remainder is calculated, wherein the number of bits of the remainder is ensured to be the same as the predetermined number of bits of the first check code and also 4 bits, and the specific division formula of removing the binary sequence from the first data 10110011 by modulo-two division is as follows:
It can be determined from the above division that the remainder should be 0100, i.e., the first check code is 0100.
And the method for the detection component to check the data processed by the transmitting end based on the first check code by using the CRC-4 check method can be as follows: and adding the first check code to the tail part of the processed data acquired from the transmitting end to form a check sequence, removing the binary sequence determined before by the check sequence in a mode of modulo two division, if the remainder is 0, the data processed by the transmitting end is correct, otherwise, the data processed by the transmitting end is wrong, and triggering an alarm.
For example, assuming that the processing data acquired from the transmitting end by the detecting component is 10110011, adding the first check code 0100 to the tail of the acquired data processed by the transmitting end, to obtain a check sequence 101100110100, and then, making the check sequence 101100110100 remove the binary sequence 11001 by a method of modulo-two division, and determining a remainder, where the check sequence 101100110100 removes the binary sequence 11001 by a method of modulo-two division is as follows:
the above division indicates that the remainder is 0, that is, the data processed by the transmitting end at the current time is correct.
And when the predetermined check method is a hamming check method, the method for calculating the first check code based on the first data by using the hamming check method specifically comprises the following steps: first, determining a first check code bit number K based on a bit number R of first data, wherein K is 2 K And (2) the minimum value of K+R+1. And, the correspondence between the bit number R of the first data and the bit number K of the first check code shown in table 1.
TABLE 1
As shown in table 1, when the number of bits of the first data is between 2 and 4 bits, the number of bits of the first check code should be 3 bits; when the bit number of the first data is between 12 and 26 bits, the bit number of the first check code should be 5 bits.
And, after determining the bit number of the first check code, replacing the first check code with a letter, for example, when determining that the bit number of the first check code is 4 bits, it may be assumed that the first check code is p 1 p 2 p 3 p 4 . Then, the code elements in the first data are marked with marks from left to right, and each code element in the first check code is sequentially inserted in the 1 st, 2 nd and 2 nd of the first data 2 、2 3 ......2 n Bits to obtain a combined sequence, where n is an integer greater than 1.
Specifically, assuming that the first data is 10011101, the bit number R thereof is 8, and the bit number K of the first check code is 4 based on the relationship shown in table 1, at this time, it is assumed that the first check code is p 1 p 2 p 3 p 4 And p is taken 1 、p 2 、p 3 、p 4 The 1 st, 2 nd, 4 th and 8 th bit groups respectively inserted into the first data form a combined sequence, which may be p as shown in Table 2 1 p 2 1p 3 001p 4 1101。
TABLE 2
Bit position 1 2 3 4 5 6 7 8 9 10 11 12
Combinatorial sequences p 1 p 2 1 p 3 0 0 1 p 4 1 1 0 1
And then, determining the specific value of each code element in the first check code based on the combined sequence. It should be noted that, each symbol in the first check code corresponds to a detection group in the combined sequence, which can determine the detection group corresponding to each symbol of the first check code first, and then determine the value of each symbol based on the detection group by using a spouse principle or an odd-order principle, thereby determining the first check code.
Wherein, the criterion for determining the detection group corresponding to each code element of the first check code in the combined sequence is as follows: the detection group corresponding to the ith bit code element in the first check code is as follows: 2 nd of the combined sequence (i-1) Bit to 2 x 2 (i-1) 3 x 2 of the-1 bit, combined sequence (i-1) Bits to 4×2 (i-1) -5 x 2 of the 1-bit, combined sequence (i-1) Bits to 6×2 (i-1) -1-bit.
For example, for the combined sequence shown in Table 2 above, the 1 st bit symbol p in the first check code 1 The corresponding detection group g1 should be: 2 nd in New sequence (1-1) =1st to 2nd×2 (1-1) -1=1 bit, 3×2 of combined sequence (1-1) =3 bits to 4×2 (1-1) -1=3 bits of composition, 5×2 of combined sequence (1-1) =5 bits to 6×2 (1-1) -1=5 bits, 7×2 of combined sequence (1-1) =7 bits to 8×2 (1-1) -1=7 bits, 9*2 of the combined sequence (1-1) =9 bits to 10×2 (1-1) -1=9 bits, 11 x 2 of combined sequence (1-1) =111th to 12th bits (1-1) -1=11 bits, i.e. the first bit symbol p 1 The corresponding detection group g1 is: the 1 st, 3 rd, 5 th, 7 th, 9 th and 11 th positions of the combined sequences, referring to Table 2 above, show that the detection group g1 is p 1 1, 0, 1, 0; the 2 nd bit code element p in the first check code 2 The corresponding detection group g2 should be: 2 nd in New sequence (2-1) =2 bits to 2×2 (2-1) -1=3 bits, 3*2 of the combined sequence (2-1) =6th to 4*2 th (2-1) -1=7 th bit composition, 5*2 of the combined sequence (2-1) =10th to 6*2 th (2-1) -1=11 bits, then the detection group g2 should be the 2 nd, 3 rd, 6 th, 7 th, 10 th, 11 th bits of the combined sequence, as can be seen by referring to table 2 above, the detection group g2 is p 2 1, 0, 1. Similarly, the third bit symbol p can be determined 3 Corresponding detection groupg3 is the 4 th, 5 th, 6 th, 7 th and 12 th positions of the combined sequence, and referring to the above Table 2, it can be seen that the detection group g3 is p 3 0, 1; fourth bit symbol p 4 The corresponding detection group g4 should be the 8 th, 9 th, 10 th, 11 th and 12 th positions of the combined sequence, and as can be seen by referring to the above Table 2, the detection group g4 is p 4 、1、1、0、1。
After determining the detection groups corresponding to the code elements of the first check code, determining the specific value of each code element in the first check code based on the detection groups according to the spouse principle or the odd-match principle.
Wherein the spouse principle is specifically as follows: and determining the value of each code element in the first check code by enabling the number of 1 in the detection group corresponding to each code element of the first check code to be an even number. The odd principle is specifically as follows: and determining the value of each code element in the first check code by making the number of 1 in the detection group corresponding to each code element of the first check code be an odd number.
For example, assuming that the present embodiment employs the spouse principle, then for the first bit symbol p 1 The corresponding test group g1: p is p 1 1 of 1, 0, 1, 0 is an even number, said p 1 Should be 1; in order to make the second bit symbol p 2 The corresponding test group g2: p is p 2 1 of 1, 0, 1 is an even number, said p 2 Should be 1; in order to make the third bit symbol p 3 Corresponding detection group g3: p is p 3 1 of 0, 1 is an even number, said p 3 Should be 0; in order to make the fourth bit symbol p 4 The corresponding test group g4: p is p 4 1 of 1, 0, 1 is an even number, said p 4 Should be 1. The first check code p 1 p 2 p 3 p 4 The method comprises the following steps: 1101.
after determining the specific value of each code element in the first check code, the detection component can check whether the data processed by the sending end acquired by the detection component is correct based on the first check code by utilizing a hamming check method, and the specific method can be as follows:
the detection component will first check the first checkEach code element in the code is sequentially inserted in the 1 st, 2 nd and 2 nd of the data processed by the obtained transmitting end 2 、2 3 ......2 n And obtaining a combined sequence, determining corresponding detection groups (the determination mode can be specifically described in the above description) from the combined sequence aiming at each code element of the first check code, performing exclusive-or calculation on each detection group, and when the exclusive-or calculation results are all 0, processing the data correctly by the transmitting end. Otherwise, the calculation results of all the detection groups are formed into a positioning sequence, wherein the first code element of the positioning sequence corresponds to the result of the detection group exclusive OR operation of the last code element in the first check code, the last code element of the positioning sequence corresponds to the result of the detection group exclusive OR operation of the first code element in the first check code, and finally, the positioning sequence is converted into decimal numbers, and the decimal numbers are the bit numbers of the error data in the combined sequence.
And it should be noted that, the combined sequence is not the data processed by the transmitting end, and is formed by combining the data processed by the transmitting end with the first check code. Therefore, after determining the number of bits of the erroneous data in the combined sequence, the error correction operation cannot be performed on the data processed by the transmitting side based on the number of bits. Therefore, the number of symbols of the first check code existing before the erroneous data in the combined sequence should be determined, and then the number of symbols of the first check code existing before the erroneous data is subtracted from the number of bits to obtain another number, where the another number is a bit of the erroneous data in the data processed by the transmitting end, and then a flipping operation is performed on the data corresponding to the bit in the data processed by the transmitting end to correct the error.
For example, if it is assumed that the data processed by the transmitting end acquired by the detecting component is 10011001, the 1101 is respectively inserted into the 1 st, 2 nd and 2 nd of the acquired data 2 、2 3 Bits result in a combined sequence, as shown in table 3, which is 111000111101.
TABLE 3 Table 3
Bit position 1 2 3 4 5 6 7 8 9 10 11 12
Combinatorial sequences 1 1 1 0 0 0 1 1 1 0 0 1
Then from the first bit symbol p for the first check code in the combined sequence 1 Determining a detection group g1, wherein the detection group g1 is as follows: 1. 1, 0, 1, 0, 1.1.0 after exclusive-or operation of the detection group g1, 0=0, and a second bit symbol p 2 The test group g2 should be: 1. 1, 0, 1, 0, 1 +.1 +.0=1 after exclusive-or operation is performed on the detection group g 2; similarly, the exclusive OR operation result 0 of the detection group g 3; and (3) determining the data errors processed by the transmitting end according to the exclusive OR operation result 1 of the detection group g 4. And, it may be determined that the positioning sequence is 1010, where the first bit symbol 1 of the positioning sequence is the xor result 1 of the detection group g4, the second bit symbol is the xor result 0 of the detection group g3, the third bit symbol is the xor result 1 of the detection group g2, the fourth bit symbol is the xor result 0 of the detection group g1, and the decimal number corresponding to the positioning sequence 1010 is 10, that is, the erroneous data is located at the 10 th bit of the combined sequence.
Then, based on the knowledge of table 3, if there are four symbols in the first check code before the 10 th bit of the combined sequence, it can be determined that the erroneous data should be located at the 10 th-4=6 th bit of the data processed by the transmitting end, and at this time, the 6 th bit "0" of the data 10011001 processed by the transmitting end is turned to "1" to obtain 10011101, that is, the first data is obtained, so that it can be ensured that the data processed by the transmitting end is always the first data in the process of executing the first preprocessing operation by the transmitting end, and further, the stability of data processing can be improved, and the subsequent operation is ensured to be correctly performed.
As is clear from the above, the parity check method or the CRC check method has only an error checking function and does not have an error correcting function, and the hamming check method has an error correcting function. Therefore, when the data is checked by the parity check method or the CRC check method, whether the data is correct or not can only be detected, and the error correction operation cannot be performed, and when the data error processed by the transmitting end is checked by the parity check method or the CRC check method, only an alarm prompt can be given so that the data checking device performs the abnormality processing to check the error. When the hamming check method is used for checking the data errors processed by the transmitting end, bit positions corresponding to the data errors in the data processed by the transmitting end can be determined based on the check code, and the data on the bit positions can be subjected to overturn operation to correct errors, and the first preprocessing operation is continuously executed.
In addition, the predetermined check method may be a triple modular redundancy check method other than the above-described CRC check method, parity check method, and hamming check code, which is not checked with a check code but is checked based on a vote of "minority-subject-to-majority". Specifically, the triple modular redundancy check method comprises the following steps: the plurality of modules execute the same operation to obtain a plurality of processed data, and the plurality of data which are the same in the plurality of processed data are used as correct data and output so as to ensure that the output is correct.
Based on this, when the predetermined checking method is a triple modular redundancy checking method, at least two (for example, two modules may be included in the detecting assembly) configured identically to the transmitting end, and the at least two modules may perform the first preprocessing operation. And when the transmitting end acquires the first data, synchronously transmitting the first data to at least two modules of the detection assembly, and synchronously executing a first preprocessing operation on the first data by the at least two modules and the transmitting end to obtain at least three processed data, wherein the at least three processed data are data obtained after the at least two modules and the transmitting end execute the first preprocessing operation on the first data respectively. And then, the detection component takes most of the same data in the at least three processing data as second data and outputs the second data to the data transmission channel. When a plurality of modules run synchronously, more than two modules have an extremely small probability of error, usually one module has error, so that most of the same data in the at least three processing data are correct data, and the data output by a transmitting end to the data transmission channel can be ensured to be correct data by the three-module redundancy check method, thereby ensuring the correct execution of subsequent operations.
Further, after the step 100 is performed, the method adopted in the step 200 of "checking the data transmitted by the data transmission channel by the detection component" includes but is not limited to the following two methods:
firstly, acquiring transmission data in the data transmission channel in real time, and comparing whether the acquired transmission data is consistent with the second data; and if the data is inconsistent, executing a turnover operation to correct errors on the data inconsistent with the acquired second data in the transmission data of the data transmission channel, and continuing transmission.
The detailed step of checking the data transmitted by the data transmission channel by the detection component based on the method is similar to the step of checking the data processed by the sending end by the detection component in the first method, and the detailed description is referred to the first method, which is not repeated herein.
And secondly, determining a second check code based on the acquired second data by using a preset check method, acquiring the transmission data in the data transmission channel in real time, and checking the transmission data in real time by using the preset check method based on the second check code to check whether the transmission data are consistent with the second data or not, and if the transmission data are inconsistent with the second data, sending an alarm or correcting errors of the transmission data based on the second check code.
As shown in fig. 3, the data transmission channel and the detection component synchronously acquire second data sent by the sending end at time b, and the detection component determines a second check code based on the second data acquired by the detection component in time b-f, and the detection component acquires the second check code at time f, and the detection component performs real-time check on the data transmitted by the data transmission channel based on the second check code in time f-c.
It should be noted that, the determining manner of the second check code is similar to the determining manner of the first check code in the second method described in the above step 100, and the checking manner based on the second check code is also similar to the checking manner based on the first check code in the above second method, which is not repeated in this embodiment.
Still further, for the above step 300, the method for verifying the data processed by the receiving end by the detecting component also includes, but is not limited to, the following two methods:
acquiring data processed by the receiving end in real time, and comparing whether the acquired data processed by the receiving end is consistent with the second data; and if the data are inconsistent, executing a turning operation to correct the error of the data inconsistent with the second data in the data processed by the receiving end.
The detailed step of the detection component for verifying the data processed by the receiving end based on the third method is similar to the step of the detection component for verifying the data processed by the transmitting end in the first method, and the detailed description is made with reference to the first method, which is not repeated herein.
Determining a third check code based on the acquired second data by using a preset check method, acquiring the data processed by the receiving end in real time, checking the data processed by the receiving end in real time by using the preset check method based on the third check code to check whether the data processed by the receiving end is consistent with the second data or not, and sending an alarm if the data processed by the receiving end is inconsistent with the second data or correcting errors of the data processed by the transmitting end based on the third check code.
Referring to fig. 3, as shown in fig. 3, in a period of c-g, the detection component may determine a third check code based on the second data acquired by the detection component, and in a period of g-d, the detection component may acquire the second check code, and in a period of g-d, the detection component may perform real-time check on the data processed by the transmitting end based on the second check code.
It should be noted that, the determining manner of the third check code is similar to the determining manner of the first check code in the first method, and the checking manner based on the third check code is also similar to the checking manner based on the first check code in the second method in the step 100, which is not repeated in this embodiment.
In addition, in this embodiment, when the second method is adopted to test the transmission data in the above step 200, in step 300, when the detection component is used to test the data processed by the receiving end, the data processed by the receiving end may be directly obtained without determining the third check code, and the data processed by the receiving end may be checked by using the predetermined check method in step 200 based on the second check code determined in step 200.
Finally, it should be noted that, in this embodiment, the predetermined verification methods used in the steps 100, 200, and 300 may be different or the same, and this embodiment is not limited herein.
Example two
In the second embodiment, before the transmitting end performs "send the second data to the data transmission channel" in the above step 100, the transmitting end determines the second check code based on the second data by using a predetermined check method. In step 100, the method for the transmitting end to transmit the second data to the data transmission channel includes: and combining the second check code and the second data into a data group, and sending the data group containing the second data to a data transmission channel.
The manner of determining the second check code is different for different predetermined check methods. The predetermined check method may include a plurality of kinds, in this embodiment, the predetermined check method includes a parity check method, a CRC check method, and a hamming check method, and a determination method for determining the second check code by using a different predetermined check method is similar to a determination method for determining the first check code in the first embodiment, which is not described herein.
Further, when the predetermined verification method is different, the combination manner of the second verification code and the second data to be combined into a data set in step 100 is also different. Specifically, when the predetermined check method is a parity check method or a CRC check method, the manner of combining the second check code and the second data may be: the second check code is punctured into an arbitrary position of the second data, for example, the second check code may be punctured into a tail, a head, or an intermediate position of the second data; when the predetermined check method is a hamming check method, the manner of combining the second check code and the second data may be: sequentially interleaving the code elements in the second check code to the 1 st, 2 nd and 2 nd of the second data 2 、2 3 ……2 n Bits.
In addition, it should be noted that, in the second embodiment, the combination manner of the second check code and the second data may be commonly agreed by the receiving end and the transmitting end based on the predetermined check method.
Still further, in this embodiment, the specific manner of the detection component to perform "check the transmission data in the data transmission channel" in step 200 may be: and acquiring transmission data in the data transmission channel in real time, and checking the transmission data based on the second check code by utilizing the preset check method to check whether data except the second check code in the transmission data are consistent with the second data or not, and determining that the second data are transmitted correctly when the data are consistent with the second data, otherwise, transmitting the second data in error.
Wherein the verification process for the data set based on the second verification code is also different for different predetermined verification methods. Specifically, for a detailed description of the parity check method, the CRC check method, and the hamming check method in this embodiment, refer to embodiment one, and this embodiment two is not described here in detail.
In addition, in the second embodiment, in the case where the predetermined verification method is a hamming verification method: when the detecting component determines the number of bits of the data in the combined sequence based on the second check code by using the hamming check method, since in the second embodiment, the combined sequence is the data in the data transmission channel, both are formed by combining the second check code and the second data, and the combination modes are the same, the step of "determining the number of symbols of the second check code existing before the data in the transmission error" in the first embodiment, and subtracting the number of symbols of the second check code existing before the data in the transmission error from the number of bits to obtain another number "can be omitted, and the flipping operation can be directly performed on the data in the data transmission channel based on the determined number of bits to correct the error.
For example, if the hamming check method is used to determine the 10 th bit transmission error of the combined sequence based on the second check code, the 10 th bit of the transmission data in the data transmission channel may be directly flipped for error correction.
And, in step 300, the method for receiving the second data by the receiving end includes: the receiving end receives the transmission data of the data transmission channel, locates and extracts the second data from the received transmission data based on a preset combination mode of the second data and the second check code, so that the second preprocessing operation can be performed on the second data.
Example III
The present invention also provides a data verification device, and fig. 4 is a schematic structural diagram of the data verification device provided in this embodiment, as shown in fig. 4, where the device includes:
the sending end 01 is used for acquiring first data to be processed, performing first preprocessing operation on the first data to obtain second data to be transmitted, and sending the second data to a data transmission channel;
a data transmission channel 02, configured to receive the second data and transmit the second data to a receiving end;
a receiving end 03, configured to receive the second data and perform a second preprocessing operation on the second data;
A detection component 04 for:
in the process that a transmitting end executes first preprocessing operation, verifying the data processed by the transmitting end to verify whether the data processed by the transmitting end is consistent with the first data, if not, sending an alarm, or correcting errors of the data processed by the transmitting end to obtain the first data, and continuing to execute the first preprocessing operation;
in the process of transmitting second data through the data transmission channel, checking the transmission data in the data transmission channel to check whether the transmission data are consistent with the second data, if not, sending an alarm, or correcting the transmission data to obtain the second data, and continuing transmission;
and in the process of executing the second preprocessing operation by the receiving end, checking the data processed by the receiving end to check whether the data processed by the receiving end is consistent with the second data, if not, giving an alarm, or correcting the error of the data processed by the receiving end to obtain the second data, and continuing to execute the second preprocessing operation
Optionally, after the sending end obtains the first data, the sending end sends the first data to a detection component.
Optionally, the detection component is configured to:
and determining a first check code based on the acquired first data by using a preset check method, acquiring the data processed by the transmitting end in real time, and checking the data processed by the transmitting end in real time based on the first check code by using the preset check method so as to check whether the data processed by the transmitting end is consistent with the first data or not, and if not, sending an alarm or correcting errors of the data processed by the transmitting end based on the first check code.
Optionally, the detection assembly is further configured to:
acquiring data processed by the transmitting end in real time, and comparing whether the acquired data processed by the transmitting end is consistent with the first data or not; and if the data are inconsistent, executing a turning operation to correct the error of the data inconsistent with the first data in the data processed by the sending end.
Optionally, the sending end sends the second data to the data transmission channel and the detection component synchronously.
Optionally, the detection assembly is further configured to:
Determining a second check code based on the acquired second data by using a preset check method, acquiring the transmission data in the data transmission channel in real time, and checking the transmission data in real time by using the preset check method based on the second check code to check whether the transmission data are consistent with the second data or not, if not, sending an alarm, or correcting the transmission data in the data transmission channel based on the second check code.
Optionally, the detection assembly is further configured to:
acquiring transmission data in the data transmission channel in real time, and comparing whether the acquired transmission data is consistent with the second data; and if the data in the transmission data of the data transmission channel are inconsistent, performing a flipping operation to correct errors on the data inconsistent with the second data, and continuing to transmit.
Optionally, the detection assembly is further configured to:
and determining a third check code based on the acquired second data by using a preset check method, acquiring the data processed by the receiving end in real time, and checking the data processed by the receiving end in real time by using the preset check method based on the third check code so as to check whether the data processed by the receiving end is consistent with the second data or not, and if not, sending an alarm or correcting errors of the data processed by the transmitting end based on the third check code.
Optionally, the detection assembly is further configured to:
acquiring data processed by the receiving end in real time, and comparing whether the acquired data processed by the receiving end is consistent with the second data; and if the data are inconsistent, executing a turning operation to correct the error of the data inconsistent with the second data in the data processed by the receiving end.
Optionally, the detection assembly is further configured to:
and acquiring the data processed by the receiving end in real time, and performing real-time verification on the data processed by the receiving end based on the second verification code by using the preset verification method to verify whether the data processed by the receiving end is consistent with the second data, if not, sending an alarm, or performing error correction on the data processed by the transmitting end based on the third verification code.
Optionally, the predetermined check method includes a parity check or cyclic redundancy check method or a hamming check method.
Optionally, the detection component includes logic circuitry
Optionally, the bit width of the processor of the data checking device should be less than or equal to 64 bits.
In summary, in the data verification method and device provided by the invention, the sending end or the receiving end performs the preprocessing operation on the acquired data, and the detection component synchronously verifies the data processed by the sending end or the receiving end so as to verify whether the data processed by the sending end or the receiving end is consistent with the data received by the sending end or the receiving end, thereby ensuring that the data processed by the sending end or the receiving end cannot be error data, namely ensuring the stability of the sending end or the receiving end on data processing, and further ensuring the correct proceeding of the subsequent operation. In addition, in the invention, when the data transmission channel transmits the acquired data, the detection component is utilized to synchronously check the transmission data of the data transmission channel so as to verify whether the transmission data is the data acquired by the data transmission channel, thereby ensuring that the transmission data of the data transmission channel cannot be transmitted in error, ensuring the stability of data transmission and ensuring the correct proceeding of subsequent operations.
In addition, in the invention, the verification steps are all executed synchronously with the processing steps or the transmission steps, so that no extra time is needed for verification, thereby saving time and improving efficiency.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system disclosed in the embodiment, the description is relatively simple because of corresponding to the method disclosed in the embodiment, and the relevant points refer to the description of the method section.
The above description is only illustrative of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention, and any alterations and modifications made by those skilled in the art based on the above disclosure shall fall within the scope of the appended claims.

Claims (14)

1. A method of data verification, the method comprising:
a transmitting end acquires first data to be processed, performs first preprocessing operation on the first data to obtain second data to be transmitted, and transmits the second data to a data transmission channel; during the process of executing the first preprocessing operation, the detection component checks the data processed by the sending end to check whether the data processed by the sending end is consistent with the first data, if not, an alarm is sent out, or error correction is carried out on the data processed by the sending end to obtain the first data, and the first preprocessing operation is continuously executed;
After the data transmission channel receives the second data, transmitting the second data to a receiving end, wherein in the process of transmitting the data by the data transmission channel, the detection component is utilized to verify the transmission data in the data transmission channel so as to verify whether the transmission data are consistent with the second data, if not, an alarm is sent out, or error correction is carried out on the transmission data so as to obtain the second data, and the transmission is continued;
the receiving end receives the second data and executes a second preprocessing operation on the second data so as to obtain the required data; and in the process of executing the second preprocessing operation, the detection component checks the data processed by the receiving end to check whether the data processed by the receiving end is consistent with the second data, if not, an alarm is sent out, or error correction is carried out on the data processed by the receiving end to obtain the second data, and the second preprocessing operation is continuously executed.
2. The data verification method according to claim 1, wherein the step of verifying the data processed by the transmitting end by the detecting component is performed in synchronization with a first preprocessing operation; the step of checking the transmission data in the data transmission channel by the detection component is synchronous with the step of transmitting the second data by the data transmission channel; and the step of checking the data processed by the receiving end by the detection component is synchronous with the second preprocessing operation, so that the step of checking is performed without adding extra time, thereby saving time and improving efficiency.
3. The data verification method according to claim 1, wherein the transmitting end transmits the first data to the detecting component after acquiring the first data.
4. The data verification method as claimed in claim 3, wherein the method for verifying the data processed by the transmitting end by the detecting component includes:
and determining a first check code based on the acquired first data by using a preset check method, acquiring the data processed by the transmitting end in real time, and checking the data processed by the transmitting end in real time based on the first check code by using the preset check method so as to check whether the data processed by the transmitting end is consistent with the first data or not, and if not, sending an alarm or correcting errors of the data processed by the transmitting end based on the first check code.
5. The data verification method as claimed in claim 3, wherein the method for verifying the data processed by the transmitting end by the detecting component includes:
acquiring data processed by the transmitting end in real time, and comparing whether the acquired data processed by the transmitting end is consistent with the first data or not; and if the data are inconsistent, executing a turning operation to correct the error of the data inconsistent with the first data in the data processed by the sending end.
6. The data verification method according to claim 1, wherein the transmitting end transmits the second data to the data transmission channel and the detecting component synchronously.
7. The data verification method according to claim 6, wherein the method for verifying the transmission data in the data transmission channel by the detection component includes:
determining a second check code based on the acquired second data by using a preset check method, acquiring the transmission data in the data transmission channel in real time, and checking the transmission data in real time by using the preset check method based on the second check code to check whether the transmission data are consistent with the second data or not, if not, sending an alarm, or correcting the transmission data in the data transmission channel based on the second check code.
8. The data verification method according to claim 6, wherein the method for verifying the transmission data in the data transmission channel by the detection component includes:
acquiring transmission data in the data transmission channel in real time, and comparing whether the acquired transmission data is consistent with the second data; and if the data in the transmission data of the data transmission channel are inconsistent, performing a flipping operation to correct errors on the data inconsistent with the second data, and continuing to transmit.
9. The data verification method as claimed in claim 6, wherein said method for verifying the data processed by the receiving end by the detecting component comprises:
and determining a third check code based on the acquired second data by using a preset check method, acquiring the data processed by the receiving end in real time, and checking the data processed by the receiving end in real time by using the preset check method based on the third check code so as to check whether the data processed by the receiving end is consistent with the second data or not, and if not, sending an alarm or correcting errors of the data processed by the receiving end based on the third check code.
10. The data verification method as claimed in claim 6, wherein said method for verifying the data processed by the receiving end by the detecting component comprises:
acquiring data processed by the receiving end in real time, and comparing whether the acquired data processed by the receiving end is consistent with the second data; and if the data are inconsistent, executing a turning operation to correct the error of the data inconsistent with the second data in the data processed by the receiving end.
11. The data verification method as claimed in claim 7, wherein said method for verifying the data processed by the receiving end by the detecting component comprises:
And acquiring the data processed by the receiving end in real time, and performing real-time verification on the data processed by the receiving end based on the second verification code by using the preset verification method to verify whether the data processed by the receiving end is consistent with the second data, if not, sending an alarm, or performing error correction on the data processed by the receiving end based on the second verification code.
12. The data checking method according to claim 4 or 7 or 9 or 11, wherein the predetermined checking method includes a parity check method or a cyclic redundancy check method or a hamming check method.
13. A data verification method according to any one of claims 1 to 11, wherein the detection component comprises logic circuitry.
14. A data verification device, the device comprising:
the data transmission system comprises a transmitting end, a data transmission channel and a data transmission channel, wherein the transmitting end is used for acquiring first data to be processed, executing first preprocessing operation on the first data to obtain second data to be transmitted, and transmitting the second data to the data transmission channel;
the data transmission channel is used for receiving the second data and transmitting the second data to a receiving end;
the receiving end is used for receiving the second data and executing a second preprocessing operation on the second data so as to obtain the required data;
A detection assembly for:
in the process that a transmitting end executes first preprocessing operation, verifying the data processed by the transmitting end to verify whether the data processed by the transmitting end is consistent with the first data, if not, sending an alarm, or correcting errors of the data processed by the transmitting end to obtain the first data, and continuing to execute the first preprocessing operation;
in the process of transmitting second data through the data transmission channel, checking the transmission data in the data transmission channel to check whether the transmission data are consistent with the second data, if not, sending an alarm, or correcting the transmission data to obtain the second data, and continuing transmission;
and in the process of executing the second preprocessing operation by the receiving end, checking the data processed by the receiving end to check whether the data processed by the receiving end is consistent with the second data, if not, sending out an alarm, or correcting the error of the data processed by the receiving end to obtain the second data, and continuing to execute the second preprocessing operation.
CN201911054147.8A 2019-10-31 2019-10-31 Data verification method and device Active CN110806948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911054147.8A CN110806948B (en) 2019-10-31 2019-10-31 Data verification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911054147.8A CN110806948B (en) 2019-10-31 2019-10-31 Data verification method and device

Publications (2)

Publication Number Publication Date
CN110806948A CN110806948A (en) 2020-02-18
CN110806948B true CN110806948B (en) 2024-02-02

Family

ID=69489907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911054147.8A Active CN110806948B (en) 2019-10-31 2019-10-31 Data verification method and device

Country Status (1)

Country Link
CN (1) CN110806948B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286715A (en) * 2020-09-23 2021-01-29 卡斯柯信号有限公司 Safe output method and device based on coding technology
CN113239026B (en) * 2021-04-29 2022-08-16 上海德衡数据科技有限公司 Cloud server and cloud data processing method based on same
WO2024077486A1 (en) * 2022-10-11 2024-04-18 华为技术有限公司 Method for determining cyclic redundancy check (crc) bit, and communication method and apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102394720A (en) * 2011-10-14 2012-03-28 广西师范大学 Information safety checking processor
CN104809250A (en) * 2015-05-19 2015-07-29 福建新大陆电脑股份有限公司 Loose type data consistency checking method
CN206115541U (en) * 2016-07-29 2017-04-19 中体彩科技发展有限公司 System of falsifying is prevented to betting data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102394720A (en) * 2011-10-14 2012-03-28 广西师范大学 Information safety checking processor
CN104809250A (en) * 2015-05-19 2015-07-29 福建新大陆电脑股份有限公司 Loose type data consistency checking method
CN206115541U (en) * 2016-07-29 2017-04-19 中体彩科技发展有限公司 System of falsifying is prevented to betting data

Also Published As

Publication number Publication date
CN110806948A (en) 2020-02-18

Similar Documents

Publication Publication Date Title
CN110806948B (en) Data verification method and device
JP4152887B2 (en) Erase location for linear block codes-and-single-error correction decoder
US6581178B1 (en) Error correction coding/decoding method and apparatus
CN102567134A (en) Error check and correction system and error check and correction method for memory module
US20030106009A1 (en) Error correction improvement for concatenated codes
CN110071727B (en) Encoding method, decoding method, error correction method and device
US20080155372A1 (en) Methods and apparatus for improving error indication performance in systems with low-density parity check codes
US8032812B1 (en) Error correction decoding methods and apparatus
US20060031742A1 (en) Decoding device and decoding method
US8694850B1 (en) Fast erasure decoding for product code columns
CN106506011B (en) Power-frequency communication of electric encoding error correction scheme
CN101938280B (en) Coding and decoding method and codec of error correction code
CN102780496A (en) RS (Reed-Solomon) code decoding method and device
CN110995392A (en) Data transmission method and device
US9191029B2 (en) Additional error correction apparatus and method
CN110492889B (en) Encoding and decoding method, encoding and decoding device and processor for detecting and correcting two-bit errors
Potey et al. Error Detection and Correction Capability for BCH Encoder using VHDL
CN111224741B (en) BCH code decoding method and decoder for satellite navigation and satellite navigation receiver
US6360349B1 (en) Syndrome computing apparatus
CN101803204A (en) Bit string-error correcting method
CN110489269B (en) Encoding and decoding method, encoding and decoding device and processor for detecting and correcting three-bit errors
JP5357993B2 (en) Encoding / decoding method capable of error correction
JP2004282600A (en) Encoder and decoder
Aliev et al. Software System for Simulation Research of Reed-Solomon Decoders in Presence of Noise Applied in Digital Communication Systems
CN113595560B (en) Information error correction method, device, equipment and storage medium

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