The invention relates to data processing and in particular validation of data transmitted and received from a remote source.
Various approaches are known for error detection in transmitted data. For example according to the “parity bit” approach the sum of the individual bits of a data message is calculated and an additional parity bit is added to the message such that the sum of the bits in the message together with the parity bit is either an even or an odd number dependent upon the scheme adopted. Although very quick and simple the scheme has various problems; it will not work if a message has an even number of errors or if bits in the data message are transposed.
Another approach is the simple checksum approach in which a checksum is calculated for example by adding segments of the message according to some modulo scheme. The checksum is added to the data message which is transmitted as a datastream. At the receiving end the checksum is extracted and the calculations repeated to ensure that the checksum is correct. However this approach may miss multiple self-cancelling errors, reordering of data or “stuck at zero” errors where all of the bits have been reset to zero (in which case the checksum will be zero as well).
A more complex known scheme comprises a cyclic redundancy check (CRC) in which a frame check sequence is added to a data message, the frame check sequence being calculated such that division of the message by the frame check sequence according to an appropriate mathematical operator leaves no remainder. However this system requires more computational overhead for calculation of the frame check sequence. In addition processing is bit serial which can slow processing significantly in some implementations.
In a further approach described in EP1271828 a data message is interleaved with a pseudo randomly generated pattern. This is found to provide improved error detection but requires a pseudo random number generator.
The invention is set out in the claims. Because a checksum is generated using a non-linear mathematical operation good fault coverage is obtained using simple, fast operations whilst allowing rapid processing.
Embodiments of the invention will now be described, by way of example, with reference to the drawings, of which:
a shows conversion of binary code to gray code;
b shows calculation of a checksum according to the method of
In overview the invention relates to the generation of a checksum by dividing a data message to be validated into data blocks or segments and combining the data blocks with non-linear operators as shown in
The use of non-linear operators ensures a greater likelihood that a correct checksum represents accurately transmitted data. Simple logical operators easily supported by the processor can be used and surprisingly four or less operators can be used to obtain a high level of accuracy.
In general the invention can be implemented on a system of the type shown in
Implementation of a first embodiment of the invention can be further understood with reference to
Gray code will be well known to the skilled reader and is described at, for example, http://www.ecse.rpi.edu/Courses/F03/ECSE-2610/Part3.ppt and so is only described in summary here. In particular gray code is constructed such that only one bit changes on each count when consecutive integers are represented as bits, as opposed to binary code in which any number of bits can change on each count. For example a gray code representation of the binary numbers 00 to 11 (i.e. 0 to 3 in decimal) is shown in
The system then enters a loop for each of the remaining data blocks in the message. At step 308 the next data block is extracted and in block 310 the block is added bitwise to the previously calculated gray code checksum to provide the next checksum component. Referring to
The approach adopted has numerous advantages. Gray code is very simply processed at the processor level such that the checksum can be computed rapidly. Because gray code is non-linear and evenly distributed by virtue of its symmetrical counting system, the error correction properties are increased over basic checksum approaches. Because the data is processed in blocks, transmission and decoding is faster as opposed to the bit serial approach in many known error detection techniques. In fact it is found that in many cases, because simple and easily supported non-linear operators such as gray code are used, processing is faster than retrieving the data blocks from memory such that data validation effectively carries no time penalty.
It will be appreciated that various alternative non-linear operations can be applied in order to obtain a final checksum. In particular “mixed operators” can be adopted comprising combinations of logical operators applied alternately or in a predetermined sequence to data segments and/or the results of operations applied previously to data segments to form checksum pre-cursors. One example in which “subtract” and “exclusive” or operators are applied sequentially to data blocks, is described with reference to
It will further be appreciated that more complicated sequences of logical operators can be applied and one further example is described with reference to
It will be appreciated that the invention can be implemented in any appropriate manner and, for the purposes of example, the embodiment described with reference to
It will be appreciated that any appropriate combination of non-linear operation can be adopted and that the embodiments described above are for the purposes of example only.
Because the system generates a checksum which has a reasonable likelihood of being unique to the corresponding data message this encoding approach can be used for example in exact voting systems of the type described in http://www.deeds.informatik.tu-darmstadt.de/course/slides/Lec%205%20Chp7.pdf and http://www.cs.mu.oz.au/343/lectures/Fault-Tolerance.pdf and described in more detail in a co-pending application filed on the same day as the present application in the name of Ricardo UK Limited entitled “Fault Tolerant Data Processing”. The skilled reader will be familiar with the concept of exact voting and so it will be described only in summary here.
In particular exact voting can be used in applications where fault tolerance is required, for example where a value such as a sensor input is calculated independently at multiple processors to obtain redundancy. In such an event, the independent values can be compared to establish where there is correspondence between them and, whether there are three or more processors, as long as a majority of the values correspond, the majority value is adopted as the correct value, forming a majority voting scheme.
Accordingly the various data values must be compared but it will be seen that where they have been encoded using the scheme described above, instead of comparing the entire data message in an optimisation it is possible simply to compare the checksums which should be identical in the case of identical data. Where there are differences between the checksums, if the majority of the checksums agree then these are taken to represent the correct data and the corresponding data message is extracted. As a result the computational overhead is reduced as against the requirement to compare the entire data message in each case.
It will be appreciated that the invention can be implemented in any appropriate form such as hardware, software or firmware and, where appropriate, in any code such as the C programming language. Any specific processing and encoding approach can be applied to data blocks comprising single or multiple bits, and in binary, hexadecimal or other appropriate formats. The data can be transmitted according to any appropriate communications protocol and any appropriate non-linear operator or set of operators can be applied individually, alternately, or in any order, and either to individual bits of a data block, to multiple data blocks, or to checksum precursors comprising the result of operations already performed on data blocks. In addition to the operators and combinations of operators described above, preferred operators will be non-biased or self-cancelling and hence symmetrical combinations such as “exclusive-or” and “subtract” or “and” and “or”.
The invention can be used in any application if required for example in a data communications network such as the Internet or in a distributing processing environment comprising multiple communicating processors such as an engine control unit (ECU).
Number | Date | Country | Kind |
---|---|---|---|
0411053.2 | May 2004 | GB | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/GB2005/001923 | 5/18/2005 | WO | 00 | 5/25/2007 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2005/114848 | 12/1/2005 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5390196 | Cecil et al. | Feb 1995 | A |
5663952 | Gentry, Jr. | Sep 1997 | A |
5960012 | Spracklen et al. | Sep 1999 | A |
5996113 | Korn et al. | Nov 1999 | A |
6061703 | DeBellis et al. | May 2000 | A |
6289023 | Dowling et al. | Sep 2001 | B1 |
6438724 | Cox et al. | Aug 2002 | B1 |
7284181 | Venkatramani | Oct 2007 | B1 |
7360148 | D'Arcy et al. | Apr 2008 | B2 |
7590996 | Medvinsky | Sep 2009 | B2 |
20010037323 | Moulton et al. | Nov 2001 | A1 |
20020092015 | Sprunk et al. | Jul 2002 | A1 |
Number | Date | Country |
---|---|---|
1 065 595 | Jan 2001 | EP |
1 146 651 | Oct 2001 | EP |
1 271 828 | Jan 2003 | EP |
2001-53621 | Feb 2001 | JP |
WO-0026783 | May 2000 | WO |
WO-2004040818 | May 2004 | WO |
Number | Date | Country | |
---|---|---|---|
20080104492 A1 | May 2008 | US |