CN110806948A - Data verification method and device - Google Patents

Data verification method and device Download PDF

Info

Publication number
CN110806948A
CN110806948A CN201911054147.8A CN201911054147A CN110806948A CN 110806948 A CN110806948 A CN 110806948A CN 201911054147 A CN201911054147 A CN 201911054147A CN 110806948 A CN110806948 A CN 110806948A
Authority
CN
China
Prior art keywords
data
processed
check
receiving end
sending end
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.)
Granted
Application number
CN201911054147.8A
Other languages
Chinese (zh)
Other versions
CN110806948B (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

Images

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 device, wherein the method comprises the following steps: the sending end executes a first preprocessing operation on the first data to obtain second data, and sends the second data to the data transmission channel; in the process of executing the first preprocessing operation, the detection component verifies the data processed by the sending end so as to verify 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 assembly checks the transmission data in the data transmission channel in the data transmission process 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 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 provided by the invention can ensure the stability of data processing and transmission and ensure the correct operation of subsequent operations.

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 field of data processing technology, a plurality of pipelines are usually run in parallel in a single chip Microcomputer (MCU) to process data. Each pipeline has a plurality of modules, and the modules execute different operations on the data in sequence to process the data to obtain the required data.
Specifically, on a pipeline, a first module on the pipeline acquires data to be processed, performs a first operation (e.g., an instruction fetch operation, a decode operation, an execute operation, or a write-back operation) on the data to be processed to obtain new data, and sends 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 a third module, and so on until the last module on the pipeline outputs the data, and 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, the processed data is inevitably erroneous, for example, a certain data bit of the processed data may be flipped, which may cause an error 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, the data is also difficult to avoid making mistakes, and at this time, the data received by another module is wrong data, which may affect the processing result and also affect 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 no error occurs in the data processing and transmission process, improving the stability of data processing and data transmission and ensuring that the subsequent operation can be correctly performed.
The invention provides a data verification method, which comprises the following steps:
a sending end acquires first data to be processed, executes first preprocessing operation on the first data to obtain second data to be transmitted, and sends the second data to a data transmission channel; 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, and if not, an alarm is sent out, or the data processed by the sending end is corrected 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 data by the data transmission channel, the detection assembly is utilized to check the transmission data in the data transmission channel so as to check whether the transmission data is consistent with the second data or not, if not, an alarm is sent out, or the transmission data is corrected so as to obtain the second data and is continuously transmitted;
the receiving end receives the second data and executes a second preprocessing operation on the second data; in the process of executing the second preprocessing operation, the detection assembly checks the data processed by the receiving end to check whether the data processed by the receiving end is consistent with the second data, and if not, an alarm is sent out, or the data processed by the receiving end is corrected to obtain the second data, and the second preprocessing operation is continuously executed.
Optionally, the step of verifying the data processed by the sending end by the detection component is performed synchronously with the first preprocessing operation; the detection component checks the transmission data in the data transmission channel and synchronously performs the step of transmitting the first data with the data transmission channel; and the step of verifying the data processed by the receiving end by the detection assembly is synchronously performed with the second preprocessing operation, so that the verification step is executed without adding extra time, thereby saving time and improving efficiency.
Optionally, after acquiring the first data, the sending end sends the first data to a detection component.
Optionally, the method for the detection component to check the data processed by the sending end includes:
determining a first check code based on the acquired first data by using a predetermined check method, acquiring data processed by the sending end in real time, and performing 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 or not, and if not, giving an alarm or correcting the data processed by the sending end based on the first check code.
Optionally, the method for the detection component to check the data processed by the sending end includes:
acquiring data processed by the sending end in real time, and comparing whether the acquired data processed by the sending end is consistent with the first data or not; and if the data processed by the sending end is inconsistent with the first data, performing a turning operation on the data inconsistent with the first data in the data processed by the sending end to correct errors.
Optionally, the sending end sends the second data to a data transmission channel and a detection component synchronously.
Optionally, the method for verifying the transmission data in the data transmission channel by the detection component includes:
and 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 is consistent with the second data or not, and if not, giving an alarm or correcting the transmission data in the data transmission channel based on the second check code.
Optionally, 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 are inconsistent with the second data, performing turnover operation on the data inconsistent with the second data in the transmission data of the data transmission channel to correct errors, and continuously transmitting the data.
Optionally, the method for the detection component to check the data processed by the receiving end includes:
determining a third check code based on the acquired second data by using a predetermined check method, acquiring data processed by the receiving end in real time, and performing real-time check on the data processed by the receiving end based on the third check code by using the predetermined check method to check whether the data processed by the receiving end is consistent with the second data, and if not, sending an alarm or correcting the data processed by the sending end based on the third check code.
Optionally, the method for the detection component to check the data processed by the receiving end 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 or not; and if the data processed by the receiving end is inconsistent with the second data, performing a turning operation on the data inconsistent with the second data in the data processed by the receiving end to correct errors.
Optionally, the method for the detection component to check the data processed by the receiving end includes:
and acquiring data processed by the receiving end in real time, and carrying out real-time verification on the data processed by the receiving end based on the second check code by using the preset verification method so as to verify whether the data processed by the receiving end is consistent with the second data or not, and if not, sending an alarm or carrying out error correction on the data processed by the sending end based on the third check code.
Optionally, the predetermined check method includes a parity check method, a cyclic redundancy check method, or a hamming check method.
Optionally, the detection component includes a logic circuit.
In addition, the present invention also provides a data verification apparatus, comprising:
the system comprises a sending end, a data transmission channel and a data transmission channel, wherein the sending 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 sending 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 second preprocessing operation on the second data;
a detection component to:
in the process of executing a first preprocessing operation by a sending end, checking data processed by the sending end to check whether the data processed by the sending end is consistent with the first data or not, if not, sending an alarm, or correcting the data processed by the sending end to obtain the first data and continuously executing the first preprocessing operation;
in the process of transmitting second data by the data transmission channel, checking the transmission data in the data transmission channel to check whether the transmission data is consistent with the second data, and if not, giving an alarm, or correcting the transmission data to obtain the second data and continuing to transmit;
and in the process of executing a second preprocessing operation by a 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 an alarm, or correcting the data processed by the receiving end to obtain the second data and continuously executing the second preprocessing operation.
In summary, in the data verification method and apparatus provided by the present invention, during the process of performing the preprocessing operation on the acquired data by the sending end or the receiving end, the detection component may synchronously verify the data processed by the sending end or the receiving end 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, so as to ensure that the data processed by the sending end or the receiving end is not erroneous data, that is, ensure the stability of the sending end or the receiving end with respect to data processing, and further ensure the correct performance 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 wrongly, ensuring the stability of data transmission and also ensuring the correct operation of subsequent operations.
In addition, in the invention, the checking steps are executed synchronously with the processing steps or the transmission steps, so that extra time is not required to be added for checking, thereby saving time and improving efficiency.
Drawings
Fig. 1 is a schematic flow chart of a data verification method according to this embodiment;
FIG. 2 is a timing diagram illustrating a data transmission process and a checking step performed by the detecting component according to this embodiment;
FIG. 3 is a timing diagram illustrating another data transmission process and the checking steps performed by the detecting component according to this embodiment;
fig. 4 is a schematic structural diagram of a data verification apparatus provided in this embodiment.
Detailed Description
The data verification method and apparatus proposed by the present invention will be further described in detail with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description. It is to be noted that the drawings are in a very simplified form and are not to precise scale, which is merely for the purpose of facilitating and distinctly claiming the embodiments of the present invention.
Fig. 1 is a schematic flow chart of a data verification method provided in this embodiment, and as shown in fig. 1, the method includes:
step 100, a sending end obtains first data to be processed, performs a first preprocessing operation on the first data to obtain second data to be transmitted, and sends the second data to a data transmission channel; 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, and if not, an alarm is sent out, or the data processed by the sending end is corrected 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 an instruction fetch operation, a decode operation, an execute operation, and a write-back operation. In addition, in this embodiment, the time period for executing the first preprocessing operation may be specifically one clock cycle.
In addition, in this embodiment, the step of checking the data processed by the sending end by the detecting component (which may be composed of a logic circuit, for example) should be performed synchronously with the first preprocessing operation, so that the detecting component can perform real-time checking on the data processed by the sending end to determine whether the data processed by the sending end is correct or not in real time, and when the data processed by the sending end is incorrect, an alarm is issued, or the data processed by the sending end is corrected and the first preprocessing operation is continuously performed. Therefore, the data processed by the sending end can not be wrong data in the process of executing the first preprocessing operation, the stability of data processing is improved, and the correct operation of the subsequent 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 data through the data transmission channel, the detection assembly is used for checking the transmission data in the data transmission channel to check whether the transmission data is consistent with the second data, and if not, an alarm is sent out, or the transmission data is corrected to obtain the second data and is continuously transmitted.
In this embodiment, a time period for transmitting the first data from the transmitting end to the receiving end by using the data transmission channel may be specifically one clock cycle.
And the step of checking the transmission data in the data transmission channel by the detection component and the step of transmitting the first data by the data transmission channel should be performed synchronously, 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 in real time, and when the transmission data is incorrect, an alarm is given, or the transmission data in the data transmission channel is corrected and transmitted continuously, so that the data transmitted by the detection component can not be wrong data when the data is transmitted in the data transmission channel, the stability of data transmission is improved, and the correct performance of subsequent operations is ensured.
Step 300, the receiving end receives the second data and executes a second preprocessing operation on the second data; in the process of executing the second preprocessing operation, the detection assembly checks the data processed by the receiving end to check whether the data processed by the receiving end is consistent with the second data, and if not, an alarm is sent out, or the data processed by the receiving end is corrected 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 an instruction fetch operation, a decode operation, an execute 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 fetch operation, the second preprocessing operation should be a decode operation; when the first preprocessing operation is a decoding operation, the second preprocessing operation should be an execution operation. In addition, in this embodiment, the time period for executing the second preprocessing operation may also be one clock cycle.
In addition, similarly, in this step, the step of verifying the data processed by the receiving end by the detection component should be performed synchronously with the second preprocessing operation, so that it can be ensured that the data processed by the receiving end is not wrong data when the receiving end performs the second preprocessing operation, the stability of data processing is improved, and the correct performance of the subsequent operation is ensured.
In addition, it should be noted that, after the receiving end performs the second preset operation on the second data, third data may be obtained, at this time, the receiving end may serve as a sending end and may send the third data to another processing module by using a data transmission channel, at this time, the another processing module should serve as a receiving end, which 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 present invention, during the process of performing the preprocessing operation on the acquired data by the sending end or the receiving end, the detection component may synchronously verify the data processed by the sending end or the receiving end 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, so as to ensure that the data processed by the sending end or the receiving end is not erroneous data, that is, ensure the stability of the sending end or the receiving end for data processing, and further ensure the correct performance 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 wrongly, ensuring the stability of data transmission and also ensuring the correct operation of subsequent operations.
In addition, in the invention, the checking steps are executed synchronously with the processing steps or the transmission steps, so that extra time is not required to be added for checking, thereby saving time and improving efficiency.
The data verification method described above will be described in detail below.
Example one
In step 100, when the sending end obtains first data to be processed, it may synchronously send the first data to a detection component, so that when a subsequent sending end executes a first preprocessing operation, the detection component may check the data processed by the sending end based on the first data obtained by the detection component, and when the sending end obtains second data, it may synchronously send the second data to a data transmission channel and the detection component, so that the subsequent detection component checks the data transmitted by the data transmission channel and the data processed by the receiving end based on the second data.
In step 100, the method for the detecting component to check the data processed by the sending end based on the first data acquired by the detecting component may specifically include, but is not limited to, the following two methods:
in the first method, the detection component receives first data sent by a sending end, stores the first data, obtains data processed by the sending end in real time, compares whether the obtained data processed by the sending end is consistent with the stored first data, and if the obtained data processed by the sending end is inconsistent with the stored first data, performs a turning operation on 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 the data transmission flow and the checking step executed by the detecting component according to the embodiment. As shown in fig. 2, M in fig. 2 corresponds to a timing chart of data processing by the transmitting end, the data transmission channel, and the receiving end, and N corresponds to a timing chart of the checking step performed by the detecting component. Referring to M in fig. 2, at time a, the sending end obtains first data, and at time a-b, the sending end performs a first preprocessing operation, and at time b, the sending end completes the execution of the first preprocessing operation to obtain second data, and transmits the second data to a data transmission channel. Then, in a time period b-c, the second data is transmitted by the data transmission channel, and at a time point c, the data transmission channel transmits the second data to a receiving end, and at a time period c-d, the receiving end performs a second preprocessing operation on the second data.
And referring to N in fig. 2, for the detection component, at a time, the detection component receives first data sent by a sending end, and then, in an a-b time period, the detection component may obtain data processed by the sending end in real time, and compare whether the obtained data processed by the sending end is consistent with first data stored in the data, and when the obtained data is inconsistent with the first data, perform a flipping operation on a bit of the data processed by the sending end that is inconsistent with the first data to correct errors, and continue to perform a first preprocessing operation, thereby ensuring that the data processed by the sending end is always the first data in the a-b time period, ensuring that the data processed by the sending end is always correct data, and ensuring that subsequent operations are correctly performed.
For example, assuming that the first data acquired by the transmitting end is 10110011 (all subsequent examples take the first data as 10110011 for illustration), the transmitting end transmits the first data 10110011 to the detecting component. And assuming that at a certain time of the a-b time period, the processing data acquired by the detection component from the transmitting end is 10110010, and by comparing, it can be determined that the acquired data 10110010 processed by the transmitting end is inconsistent with the last bit of the first data 10110011 stored by the detecting component, and it can be determined that the data processed by the transmitting end at the current time is error data. At this time, the detecting component may perform a flipping operation on the last bit of the data processed by the transmitting end to correct the error, that is, change "0" of the last bit to "1", so as to change the data processed by the transmitting end 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 receiving first data sent by a sending end, a detection component determines a first check code based on the first data by using a predetermined check method, and then 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.
In the second method, fig. 3 is a timing chart of the data transmission process and the checking step executed by the detecting component according to the embodiment. As shown in fig. 3, m in fig. 3 corresponds to a timing chart of the sending end, the data transmission channel, and the receiving end processing data, and n corresponds to a timing chart of the detection component performing the checking step. Wherein the timing diagram of M in fig. 3 is the same as the timing diagram of M in fig. 2, that is, the sender is performing the first preprocessing operation in the time period a-b, the data transmission channel is transmitting data in the time period b-c, and the receiver is performing the second preprocessing operation in the time period c-d in fig. 3. As can be seen from further referring to fig. 3, for a detection component, at time a, the detection component receives first data sent by a sending end, and, within a-e time period, the detection component determines a first check code based on the first data by using a predetermined check method, and at time e, determines the first check code, and then, within an e-b time period, the detection component obtains 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 method may include multiple types, and different predetermined verification methods have different manners of determining the first verification code, and different manners of verifying the data based on the first verification code. Based on this, in this embodiment, the method for determining the first check code and the specific check method are described by taking the predetermined check method as a parity check method, a cyclic redundancy check method, and a hamming check method, respectively, as an example.
For the parity check method, the length of the generated first check code should be 1 bit, and the first check code is "0" or "1", and the parity check method specifically includes odd check and even check, and the requirements of the odd check and the even check on the first check code are different, and the check methods are also different.
For odd check, the first check code should satisfy the following requirements: when the first check code is added to the first data to be checked, a new sequence containing odd numbers of '1' 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, 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 a new sequence "101100110" obtained after the first check code "0" is added to the first data 10110011 includes five "1", that is, an odd number of "1".
In this embodiment, in a method for the detection component to check the data processed by the sending end based on the first check code by using odd check, the method may be: the detection component stores the first check code after determining the first check code, acquires data processed by the sending end in real time, combines the stored first check code with the acquired data processed by the sending end to obtain a new sequence, and when the new sequence contains odd number of '1', the data processed by the sending end is correct, 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, the first check code "0" and the acquired data "10110011" processed by the transmitting end are combined to obtain a new sequence "101100110", where the new sequence "101100110" includes odd numbers of "1", and it may be determined that the data processed by the transmitting end at the current time is correct; if the processing data acquired by the detection component from the transmitting end is 10110010, the first check code "0" and the acquired processing data "10110010" are combined to obtain a new sequence "101100100", where the new sequence includes an even number of "1", and is not an odd number, so that the data processed by the transmitting end at the current time is incorrect, and an alarm is triggered at this time.
And, for even parity, the first parity code 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 this embodiment, in the first embodiment, the method for the detection component to verify the first data based on the first parity code by using odd parity may be: the detection component acquires data processed by the sending end in real time, and combines a first check code with the acquired data processed by the sending end to obtain a new sequence, when the new sequence contains even number of '1', 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, as for Cyclic Redundancy Check (CRC), there are also specifically classified CRC-16 Check, CRC-32 Check, CRC-12 Check, CRC-CCITT Check, CRC-8 Check, CRC-4 Check, and the like. In this embodiment, a predetermined check method is specifically described as an example of a CRC-4 check method.
Based on this, the method for calculating the first check code by using the CRC-4 check method may be: providing first data and a generator polynomial corresponding to CRC-4 in advance, wherein different generator polynomials correspond to different types of CRC check methods, and the generator polynomial corresponding to CRC-4 is specifically G (X) ═ X4+X3+1. And determining a binary sequence corresponding to the generator polynomial and the number of bits of the first check code based on the generator polynomial, wherein the number of bits of the first check code is the highest power of the generator polynomial. Then, the binary sequence is removed from the first data by modulo two division, and a remainder is calculated, and when the remainder is calculated, the number of bits of the remainder is the same as the number of bits of the predetermined first check code, and finally, the remainder may be determined as the first check code of the first data.
By way of example, assume whatThe first data is 10110011, and the generator polynomial g (X) is X4+X3+1, the method for calculating the first check code should be: based on the generator polynomial G (X) X4+X3+1 determines that its corresponding binary sequence should be 11001, and determines that the number of bits of the first check code should be a generator polynomial g (X) X based on the generator polynomial4+X3The highest power of +1, i.e. 4. Then, the first data 10110011 is made to remove the binary sequence by modulo two division as 11001, and the remainder is calculated, wherein it should be ensured that the number of bits of the remainder is the same as the predetermined number of the first check code, and is also 4 bits, then the specific division formula of the first data 10110011 by modulo two division to remove the binary sequence as 11001 is as follows:
then 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 sending end based on the first check code by using the CRC-4 check method may be: 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 previously determined binary sequence from the check sequence by a modulo two division method, 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 processed data obtained by the detection component from the sender is 10110011, the first check code 0100 is added to the tail of the obtained data processed by the sender to obtain a check sequence 101100110100, and then the check sequence 101100110100 is made to remove the binary sequence 11001 by a modulo two division method, and a remainder is determined, where the check sequence 101100110100 removes the binary sequence 11001 by a modulo two division method, and the division is as follows:
Figure BDA0002256094460000131
as can be seen from the above division equation, the remainder is 0, that is, the data processed by the sending end at the current time is correct.
And when the predetermined verification method is a hamming verification method, the method for calculating the first verification code based on the first data by using the hamming verification method specifically comprises the following steps: firstly, determining a first check code bit number K based on a bit number R of first data, wherein K satisfies 2KThe minimum value of more than or equal to K + R + 1. And table 1 shows the correspondence between the bit number R of the first data and the bit number K of the first check code.
TABLE 1
Figure BDA0002256094460000132
As shown in table 1, when the number of bits of the first data is between 2-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-26 bits, the bit number of the first check code should be 5 bits.
And after the number of bits of the first check code is determined, replacing the first check code with a letter, for example, when the number of bits of the first check code is determined to be 4, the first check code may be assumed to be p1p2p3p4. Then, labeling the code elements in the first data from left to right, and sequentially inserting each code element in the first check code into the 1 st, 2 nd and 2 nd of the first data2、23......2nBits 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 is 8 bits, and it can be determined that 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 p1p2p3p4And p is1、p2、p3、p4Respectively insert the first numberAccording to the 1 st, 2 nd, 4 th and 8 th bits of the sequence, as shown in Table 2, the combined sequence can be p1p21p3001p41101。
TABLE 2
Bit position 1 2 3 4 5 6 7 8 9 10 11 12
Combined sequence p1 p2 1 p3 0 0 1 p4 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 code element in the first check code corresponds to a detection group in the combined sequence, and the detection group corresponding to each code element of the first check code may be determined first, and then a value of each code element is determined based on the detection group by using a parity rule or a parity rule, so as to determine the first check code.
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)Position-1, 3X 2 of the combined sequence(i-1)Bit to 4 x 2(i-1)Position-1, position 5X 2 of the combined sequence(i-1)Bit to 6 x 2(i-1)1.
Illustratively, for the combined sequence shown in table 2 above, the 1 st bit symbol p in the first check code1Its corresponding test set g1 should be: 2 nd in the New sequence(1-1)1 to 2 × 2(1-1)-1-position, position 1, position 3 × 2 of the combinatorial sequence(1-1)3 th to 4 × 2 th position(1-1)-5 × 2 of combined sequence consisting of 3 bits 1(1-1)5 th to 6 × 2 th position(1-1)-position 7 × 2 in combined sequence, 1 ═ 5(1-1)7 th to 8 × 2 th(1-1)-7 bits, 9 x 2 of the combined sequence(1-1)9 th to 10 th 2(1-1)-1=Position 9, 11 x 2 of the combined sequence(1-1)Position 11 to position 12 x 2(1-1)11 bits, i.e. the first bit symbol p1The corresponding test set g1 is: positions 1, 3, 5, 7, 9 and 11 of the combined sequence, and referring to the above Table 2, the detection group g1 is p11, 0, 1, 0; the 2 nd bit code element p in the first check code2Its corresponding test set g2 should be: 2 nd in the New sequence(2-1)2 to 2 x 2(2-1)-position 3, position 3 of the combined sequence(2-1)6 th to 4 th 2(2-1)-position 5 x 2 of the combined sequence consisting of 7-positions 1(2-1)10 th to 6 th 2(2-1)1-11, the detection group g2 should be the 2 nd, 3 rd, 6 th, 7 th, 10 th and 11 th positions of the combined sequence, and referring to the above table 2, the detection group g2 is p21, 0, 1. Similarly, a third bitsymbol p may be determined3The corresponding assay group g3 should be the 4 th, 5 th, 6 th, 7 th, 12 th positions of the combined sequence, as can be seen by referring to Table 2 above, the assay group g3 is p30, 1; and, a fourth bit symbol p4The corresponding assay group g4 should be the 8 th, 9 th, 10 th, 11 th, 12 th positions of the combined sequence, as can be seen by referring to Table 2 above, the assay group g4 is p4、1、1、0、1。
After the detection group corresponding to each code element of the first check code is determined, a specific value of each code element in the first check code can be determined based on each detection group according to a parity rule or an odd-parity rule.
The spouse principle is 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 even. The matching principle specifically comprises the following steps: 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 odd.
For example, assuming the dual principle is adopted in the present embodiment, in order to make the first bitsymbol p1Corresponding test set g 1: p is a radical of11 of 1, 0, 1, 0 is an even number, and p is1Should be 1; to make it standThe second bit symbol p2Corresponding test set g 2: p is a radical of21 is an even number among 1, 0, 1, and p2Should be 1; in order to make the third bitsymbol p3Corresponding test set g 3: p is a radical of31 of 0, 1 is an even number, and p is3Should be 0; in order to make the fourth bit symbol p4Corresponding test set g 4: p is a radical of41 of 1, 0, 1 is an even number, and p is4Should be 1. Said first check code p1p2p3p4The method comprises the following steps: 1101.
after the specific value of each code element in the first check code is determined, the detection component may check whether the acquired data processed by the transmitting end is correct or not based on the first check code by using a hamming check method, and the specific method may be:
the detection component will firstly insert each code element in the first check code in sequence into the 1 st, 2 nd of the data processed by the sending end obtained by the detection component2、23......2nObtaining a combined sequence by using bits, then determining a corresponding detection group (the determination method may specifically refer to the above description) for each symbol of the first check code from the combined sequence, and performing xor calculation on each detection group, and when the xor calculation results are all 0, the data processed by the sending end is correct. And if not, forming a certain sequence of the calculation results of all the detection groups, wherein the first code element of the positioning sequence corresponds to the result of the detection group XOR 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 XOR operation of the first code element in the first check code, and finally, converting the positioning sequence into a decimal number, wherein the decimal number is the bit number of the error data in the combined sequence.
The combined sequence is not data processed by the transmitting end, and is formed by combining the data processed by the transmitting end and the first check code. Therefore, after the number of bits of erroneous data in the combined sequence is determined, an error correction operation cannot be performed on the data processed by the transmitting end based on the number of bits. Therefore, the number of code elements of the first check code existing before the erroneous data in the combined sequence is determined, and then the number of the code elements of the first check code existing before the erroneous data is subtracted from the number of the bit 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, the data corresponding to the bit in the data processed by the transmitting end is inverted to correct errors.
For example, if it is assumed that the data processed by the transmitting end acquired by the detection component is 10011001, the 1101 is respectively punctured into the 1 st, 2 nd, and 2 nd of the acquired data2、23Bits to obtain a combined sequence, which is 111000111101, as shown in Table 3.
TABLE 3
Bit position 1 2 3 4 5 6 7 8 9 10 11 12
Combined sequence 1 1 1 0 0 0 1 1 1 0 0 1
Then the first bitsymbol p for the first check code in the combined sequence is used1Determining the detection group g1, wherein the detection group g1 should be 1, 0, 1 and 0, the exclusive OR operation on the detection group g1 is carried out to obtain 1 ⊕ 1 ⊕ 0 ⊕ 1 ⊕ 1 ⊕ 0 which is equal to 0, and the second bitsymbol p2If the detection group g2 is 1, 0, 1, 0, then 1 ⊕ 1 ⊕ 0 ⊕ 1 ⊕ 1 ⊕ 0 after xor operation is performed on the detection group g2 is 1, similarly, the xor operation result 0 of the detection group g3, and the xor operation result 1 of the detection group g4 can be determined to be an error of data processed by the transmitting end, and a positioning sequence can be determined to be 1010, where a first bit symbol 1 of the positioning sequence is the xor operation result 1 of the detection group g4, a second bit symbol is the xor operation result 0 of the detection group g3, a third bit symbol is the xor operation result 1 of the detection group g2, a fourth bit symbol is the xor operation result 0 of the detection group g1, and a corresponding ten-bit sequence 1010 is obtained by the xor operation result 0 of the detection group g1The carry number is 10, i.e. the erroneous data is located at bit 10 of the combined sequence.
As can be seen from table 3, if four symbols in the first check code exist before the 10 th bit of the combined sequence, it can be determined that the erroneous data should be located in the 6 th bit of the data processed by the sender, and at this time, the 6 th bit "0" of the data 10011001 processed by the sender is inverted to "1" to obtain 10011101, that is, the first data is obtained, so that the data processed by the sender is always the first data in the process of executing the first preprocessing operation, and thus the stability of data processing can be improved, and the subsequent operations can be performed correctly.
As can be seen from the above, the parity check method or the CRC check method only has an error checking function and does not have an error correction function, and the hamming check method has an error correction function. Therefore, when the data is checked by the parity check method or the CRC check method, only whether the data is correct or not can be detected, and the error correction operation cannot be performed, when the data processed by the transmitting end is checked by the parity check method or the CRC check method, only an alarm prompt may be given so that the data checking apparatus can perform the abnormal process for checking the error. When the hamming check method is used for checking that the data processed by the sending end is wrong, the bit corresponding to the wrong data in the data processed by the sending end can be determined based on the check code, and the data on the bit can be subjected to the flipping operation to correct the error and the first preprocessing operation is continuously performed.
Further, it should be noted that, in addition to the above-described CRC check method, parity check method, and hamming check code, the predetermined check method may be a triple modular redundancy check method, which is different from the above-described CRC check method, parity check method, and hamming check code, and which does not check with a check code but checks based on a vote of "minority majority obeying". 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 processed data are output as correct data to ensure correct output.
Based on this, when the predetermined checking method is a triple modular redundancy checking method, at least two (for example, two) modules having the same structure as the transmitting end should be included in the detection component, and each of the at least two modules may perform the first preprocessing operation. And when the sending end acquires first data, the first data are synchronously sent to at least two modules of the detection assembly, the at least two modules and the sending end synchronously execute first preprocessing operation on the first data to obtain at least three processed data, and the at least three processed data are respectively data obtained after the at least two modules and the sending end execute the first preprocessing operation on the first data. And then, the detection component takes most of the same data in the at least three processed data as second data and outputs the second data to the data transmission channel. When a plurality of modules run synchronously, the fact that an error occurs in more than two modules at the same time is a very small probability event, generally, an error occurs in one module, so that most of the same data in the at least three processed data should be correct data, and thus, the data output to the data transmission channel by the sending end can be ensured to be correct data by the triple modular redundancy check method, and the correct execution of subsequent operations is ensured.
Further, after the step 100 is executed, when the "detecting component checks the data transmitted by the data transmission channel" in the step 200 is executed, the adopted methods also include, but are not limited to, the following two methods:
the method I comprises the steps of acquiring transmission data in the data transmission channel in real time, and comparing whether the acquired transmission data is consistent with the second data or not; and if the data is inconsistent with the acquired second data, performing a turning operation on the data inconsistent with the acquired second data in the transmission data of the data transmission channel to correct errors, and continuously transmitting the data.
The detailed steps of the detecting component for checking the data transmitted by the data transmission channel based on the method are similar to the steps of the detecting component for checking the data processed by the transmitting end in the first method, and for detailed description, refer to the first method, which is not described herein again.
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, 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 is consistent with the second data, and if not, giving an alarm or correcting the transmission data based on the second check code.
Referring to fig. 3, as shown in fig. 3, at time b, the data transmission channel and the detection component synchronously acquire second data sent by a sending end, and at time b-f, the detection component determines a second check code based on the acquired second data, and at time f, the detection component acquires the second check code, and at time f-c, the detection component performs real-time check on the data transmitted by the data transmission channel based on the second check code.
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 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 second method, which is not repeated in this embodiment.
Still further, with respect to the step 300, the method for the detecting component to check the data processed by the receiving end 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 processed by the receiving end is inconsistent with the second data, performing a turning operation on the data inconsistent with the second data in the data processed by the receiving end to correct errors.
The detailed steps of the detecting component for verifying the data processed by the receiving end based on the third method are similar to the steps of the detecting component for verifying the data processed by the transmitting end in the first method, and for detailed description, refer to the first method, which is not described herein again.
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, 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, and if not, giving an alarm or correcting the data processed by the transmitting end based on the third check code.
Referring to fig. 3, as shown in fig. 3, in a c-g time period, the detection component may determine a third check code based on second data acquired by the detection component, and at a time g, the detection component may acquire the second check code, and in a g-d time period, the detection component may perform real-time check on data processed by the sending end based on the second check code.
It should be noted that the determination method of the third check code is similar to the determination method of the first check code in the first method, and the check method based on the third check code is also similar to the check method based on the first check code in the second method in step 100, which is not repeated in this embodiment.
In addition, in this embodiment, when the method is used to check the transmission data in step 200, in step 300, when the detection component is used to check the data processed by the receiving end, the data processed by the receiving end may be directly acquired 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 applied 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 sender performs the step "send the second data to the data transmission channel" in step 100, the sender determines a second check code based on the second data by using a predetermined check method. And, in step 100, the method for the sending end to send 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.
It should be noted that, for different predetermined verification methods, the manner of determining the second verification code is different. In this embodiment, the predetermined check method includes a parity check method, a CRC check method, and a hamming check method, and the determination method for determining the second check code by using different predetermined check methods is similar to the determination method for determining the first check code in the first embodiment, which is not repeated herein in the second embodiment.
Further, when the predetermined verification methods are different, the combination manner of combining the second parity code and the second data into one data set performed 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: puncturing the second parity into any position of the second data, for example, the second parity can be punctured into a tail, a head, or a middle 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: inserting the code elements in the second check code into the 1 st, 2 nd and 2 nd of the second data in sequence2、23……2nA bit.
In addition, it should be noted that, in the second embodiment, a combination manner of the second check code and the second data may be agreed by the receiving end and the transmitting end together based on a predetermined check method.
Still further, in this embodiment, the specific way of the detection component performing "checking 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, verifying the transmission data based on the second check code by using the preset verification method to verify whether data except the second check code in the transmission data is consistent with the second data, and determining that the second data is transmitted correctly when the data is consistent with the second data, otherwise, performing error transmission on the second data.
The verification process for the data set based on the second verification code is different for different predetermined verification methods. Specifically, for a detailed description of the checking process of the parity check method, the CRC check method, and the hamming check method in this embodiment, reference is made to the first embodiment, and details of the second embodiment are not repeated herein.
In addition, in the second embodiment, when the predetermined verification method is a hamming verification method: when the detection component determines the bit number of the transmission error 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 transmission data in the data transmission channel, both the combined sequence is formed by combining the second check code and the second data, and the combining manners are the same, the step of determining the number of the symbols of the second check code existing before the transmission error data and subtracting the number of the symbols of the second check code existing before the transmission error data by using the bit number to obtain another number in the first embodiment may not be required, and the inversion operation may be directly performed on the transmission data in the data transmission channel based on the determined bit number to correct the error.
For example, if a 10 th bit transmission error of the combined sequence is determined based on the second check code using the hamming check method, a flipping operation may be directly performed on the 10 th bit of the transmission data in the data transmission channel to correct the error.
And, in step 300, the method for receiving the second data by the receiving end includes: and the receiving end receives the transmission data of the data transmission channel, and locates and extracts the second data from the transmission data received by the receiving end based on a combination mode of the second data and the second check code predetermined in advance so as to execute a second preprocessing operation on the second data.
EXAMPLE III
The present invention further provides a data verification apparatus, fig. 4 is a schematic structural diagram of the data verification apparatus provided in this embodiment, and as shown in fig. 4, the apparatus includes:
the sending terminal 01 is configured to obtain first data to be processed, perform a first preprocessing operation on the first data to obtain second data to be transmitted, and send the second data to a data transmission channel;
the data transmission channel 02 is used for receiving the second data and transmitting the second data to a receiving end;
the receiving end 03 is configured to receive the second data and perform a second preprocessing operation on the second data;
a detection component 04 for:
in the process of executing a first preprocessing operation by a sending end, checking data processed by the sending end to check whether the data processed by the sending end is consistent with the first data or not, if not, sending an alarm, or correcting the data processed by the sending end to obtain the first data and continuously executing the first preprocessing operation;
in the process of transmitting second data by the data transmission channel, checking the transmission data in the data transmission channel to check whether the transmission data is consistent with the second data, and if not, giving an alarm, or correcting the transmission data to obtain the second data and continuing to transmit;
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 or not, if not, giving an alarm, or correcting the data processed by the receiving end to obtain the second data and continuously executing the second preprocessing operation
Optionally, after acquiring the first data, the sending end sends the first data to a detection component.
Optionally, the detection component is configured to:
determining a first check code based on the acquired first data by using a predetermined check method, acquiring data processed by the sending end in real time, and performing 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 or not, and if not, giving an alarm or correcting the data processed by the sending end based on the first check code.
Optionally, the detection component is further configured to:
acquiring data processed by the sending end in real time, and comparing whether the acquired data processed by the sending end is consistent with the first data or not; and if the data processed by the sending end is inconsistent with the first data, performing a turning operation on the data inconsistent with the first data in the data processed by the sending end to correct errors.
Optionally, the sending end sends the second data to a data transmission channel and a detection component synchronously.
Optionally, the detection component is further configured to:
and 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 is consistent with the second data or not, and if not, giving an alarm or correcting the transmission data in the data transmission channel based on the second check code.
Optionally, the detection component 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 are inconsistent with the second data, performing turnover operation on the data inconsistent with the second data in the transmission data of the data transmission channel to correct errors, and continuously transmitting the data.
Optionally, the detection component is further configured to:
determining a third check code based on the acquired second data by using a predetermined check method, acquiring data processed by the receiving end in real time, and performing real-time check on the data processed by the receiving end based on the third check code by using the predetermined check method to check whether the data processed by the receiving end is consistent with the second data, and if not, sending an alarm or correcting the data processed by the sending end based on the third check code.
Optionally, the detection component 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 or not; and if the data processed by the receiving end is inconsistent with the second data, performing a turning operation on the data inconsistent with the second data in the data processed by the receiving end to correct errors.
Optionally, the detection component is further configured to:
and acquiring data processed by the receiving end in real time, and carrying out real-time verification on the data processed by the receiving end based on the second check code by using the preset verification method so as to verify whether the data processed by the receiving end is consistent with the second data or not, and if not, sending an alarm or carrying out error correction on the data processed by the sending end based on the third check code.
Optionally, the predetermined check method includes a parity check method, a cyclic redundancy check method, or a hamming check method.
Optionally, the detection component comprises a logic circuit
Optionally, the bit width of the processor of the data checking apparatus should be less than or equal to 64 bits.
In summary, in the data verification method and apparatus provided by the present invention, during the process of performing the preprocessing operation on the acquired data by the sending end or the receiving end, the detection component may synchronously verify the data processed by the sending end or the receiving end 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, so as to ensure that the data processed by the sending end or the receiving end is not erroneous data, that is, ensure the stability of the sending end or the receiving end with respect to data processing, and further ensure the correct performance 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 wrongly, ensuring the stability of data transmission and also ensuring the correct operation of subsequent operations.
In addition, in the invention, the checking steps are executed synchronously with the processing steps or the transmission steps, so that extra time is not required to be added for checking, thereby saving time and improving efficiency.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The above description is only for the purpose of describing the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention, and any variations and modifications made by those skilled in the art based on the above disclosure are within the scope of the appended claims.

Claims (14)

1. A method for data verification, the method comprising:
a sending end acquires first data to be processed, executes first preprocessing operation on the first data to obtain second data to be transmitted, and sends the second data to a data transmission channel; 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, and if not, an alarm is sent out, or the data processed by the sending end is corrected 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 data by the data transmission channel, the detection assembly is utilized to check the transmission data in the data transmission channel so as to check whether the transmission data is consistent with the second data or not, if not, an alarm is sent out, or the transmission data is corrected so as to obtain the second data and is continuously transmitted;
the receiving end receives the second data and executes a second preprocessing operation on the second data; in the process of executing the second preprocessing operation, the detection assembly checks the data processed by the receiving end to check whether the data processed by the receiving end is consistent with the second data, and if not, an alarm is sent out, or the data processed by the receiving end is corrected to obtain the second data, and the second preprocessing operation is continuously executed.
2. The data verification method of claim 1, wherein the step of verifying the data processed by the sending end by the detection component is performed synchronously with a first preprocessing operation; the detection component checks the transmission data in the data transmission channel and synchronously performs the step of transmitting the first data with the data transmission channel; and the step of verifying the data processed by the receiving end by the detection assembly is synchronously performed with the second preprocessing operation, so that the verification step is executed without adding extra time, thereby saving time and improving efficiency.
3. The data verification method of claim 1, wherein the sending end sends the first data to a detection component after obtaining the first data.
4. The data verification method of claim 3, wherein the method for the detection component to verify the data processed by the sending end comprises:
determining a first check code based on the acquired first data by using a predetermined check method, acquiring data processed by the sending end in real time, and performing 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 or not, and if not, giving an alarm or correcting the data processed by the sending end based on the first check code.
5. The data verification method of claim 3, wherein the method for the detection component to verify the data processed by the sending end comprises:
acquiring data processed by the sending end in real time, and comparing whether the acquired data processed by the sending end is consistent with the first data or not; and if the data processed by the sending end is inconsistent with the first data, performing a turning operation on the data inconsistent with the first data in the data processed by the sending end to correct errors.
6. The data verification method of claim 1, wherein the sender sends the second data to a data transmission channel and a detection component synchronously.
7. The data verification method of claim 6, wherein the method for the detection component to verify the transmission data in the data transmission channel comprises:
and 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 is consistent with the second data or not, and if not, giving an alarm or correcting the transmission data in the data transmission channel based on the second check code.
8. The data verification method of claim 6, wherein the method for the detection component to verify the transmission data in the data transmission channel comprises:
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 are inconsistent with the second data, performing turnover operation on the data inconsistent with the second data in the transmission data of the data transmission channel to correct errors, and continuously transmitting the data.
9. The data verification method of claim 6, wherein the method for the detection component to verify the data processed by the receiving end comprises:
determining a third check code based on the acquired second data by using a predetermined check method, acquiring data processed by the receiving end in real time, and performing real-time check on the data processed by the receiving end based on the third check code by using the predetermined check method to check whether the data processed by the receiving end is consistent with the second data, and if not, sending an alarm or correcting the data processed by the sending end based on the third check code.
10. The data verification method of claim 6, wherein the method for the detection component to verify the data processed by the receiving end 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 or not; and if the data processed by the receiving end is inconsistent with the second data, performing a turning operation on the data inconsistent with the second data in the data processed by the receiving end to correct errors.
11. The data verification method of claim 7, wherein the method for the detection component to verify the data processed by the receiving end comprises:
and acquiring data processed by the receiving end in real time, and carrying out real-time verification on the data processed by the receiving end based on the second check code by using the preset verification method so as to verify whether the data processed by the receiving end is consistent with the second data or not, and if not, sending an alarm or carrying out error correction on the data processed by the sending end based on the third check code.
12. The data checking method of claim 4 or 7 or 9 or 11, wherein the predetermined checking method comprises a parity check or a cyclic redundancy check or a hamming check.
13. The data verification method of any of claims 1-11, wherein the detection component comprises a logic circuit.
14. A data verification apparatus, the apparatus comprising:
the system comprises a sending end, a data transmission channel and a data transmission channel, wherein the sending 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 sending 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 second preprocessing operation on the second data;
a detection component to:
in the process of executing a first preprocessing operation by a sending end, checking data processed by the sending end to check whether the data processed by the sending end is consistent with the first data or not, if not, sending an alarm, or correcting the data processed by the sending end to obtain the first data and continuously executing the first preprocessing operation;
in the process of transmitting second data by the data transmission channel, checking the transmission data in the data transmission channel to check whether the transmission data is consistent with the second data, and if not, giving an alarm, or correcting the transmission data to obtain the second data and continuing to transmit;
and in the process of executing a second preprocessing operation by a 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 an alarm, or correcting the data processed by the receiving end to obtain the second data and continuously executing 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 true CN110806948A (en) 2020-02-18
CN110806948B 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)

Cited By (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
CN113239026A (en) * 2021-04-29 2021-08-10 上海德衡数据科技有限公司 Cloud server and cloud data processing method based on cloud server
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

Cited By (4)

* 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
CN113239026A (en) * 2021-04-29 2021-08-10 上海德衡数据科技有限公司 Cloud server and cloud data processing method based on cloud server
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

Also Published As

Publication number Publication date
CN110806948B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
CN102567134B (en) Error check and correction system and error check and correction method for memory module
AU650399B1 (en) Improved error correcting decoder and decoding method for receivers in digital cellular communication
CN110806948B (en) Data verification method and device
US7149947B1 (en) Method of and system for validating an error correction code and parity information associated with a data word
US6581178B1 (en) Error correction coding/decoding method and apparatus
JP4152887B2 (en) Erase location for linear block codes-and-single-error correction decoder
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
JPH02178738A (en) Detection of errors in arithmetic computation of at least two operands
WO2014139123A1 (en) Method and apparatus of ldpc decoder with lower error floor
CN102780496A (en) RS (Reed-Solomon) code decoding method and device
CN110995392A (en) Data transmission method and device
CN101938280A (en) Coding and decoding method and codec of error correction code
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
US6360349B1 (en) Syndrome computing apparatus
CN111224741B (en) BCH code decoding method and decoder for satellite navigation and satellite navigation receiver
US20020124223A1 (en) Soft input - soft output forward error correction decoding for turbo codes
JP5357993B2 (en) Encoding / decoding method capable of error correction
JP2004282600A (en) Encoder and decoder
CN113595560B (en) Information error correction method, device, equipment and storage medium
US20240048159A1 (en) Error processing and correction of adjacent 2-bit errors
CN109787717B (en) QR31 code decoding method based on FPGA
JPH08111647A (en) Decoder of single error correction and multiplex error detection bch code

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