This description relates to a system and method for detecting errors in transmitted or stored data by using information embedded in the transmitted or stored data.
While providing vast amounts of data from one or more sources (e.g., transmission sites, storage devices), data transmission processes also exhibit risk in that the data may be modified in an unwanted manner. Noisy communication channels, damaged transmissions or storage media may cause such alternations in the transmitted data. To detect such errors, and possibly correct altered data, error-detecting and error-correcting techniques have been developed and refined. For example, a hash function may be implemented, in which a mathematical function converts a large amount of data into a smaller amount (e.g., a single integer) that is transmitted and provides a reference for detecting modifications to the transmitted data. One such hash function is a cyclic redundancy check (CRC) and is used with binary systems such as digital networks and storage devices such as hard drives. Using such a non-secure hash function, a short, fixed-length binary sequence, known as the CRC code or just CRC, is calculated for each data message and is sent or stored with the message. Upon being received or read, the calculation is repeated for each data message and if the newly calculated CRC does not match the earlier calculated CRC (e.g., stored with the data message), the block is considered to contain a data error and corrective action may be taken such as rereading or requesting the message be resent.
In general, in one aspect, a method includes segmenting a first portion of a data block into a plurality of segments that includes a first segment. The data block includes a second portion, different from the first portion, which stores cyclic redundancy check data calculated from data stored in the first portion of the data block. The method also includes calculating cyclic redundancy check data from the first segment, and, translating the calculated cyclic redundancy check data to a location associated with the data block. The method also includes combining the cyclic redundancy check data associated with the first segment and cyclic redundancy check data associated with at least one other segment included in the plurality of segments. The method also includes using the combined cyclic redundancy check data for error detection.
Implementations may include one or more of the following features. The cyclic redundancy check data associated with at least one other segment may be translated to the location associated with the data block. Calculating the cyclic redundancy check data from the first segment may include forward direction, reverse direction and forward and reverse direction calculations. The calculated cyclic redundancy check data from the first segment may include a maximum length sequence. Calculating the cyclic redundancy check data from the first segment may include initiating calculations from a non-zero state. The cyclic redundancy check data stored in the second portion of the data block may be calculated prior to transmission of the data block.
In general, in one aspect, a computing device includes a memory that is configured to store instructions. The computing device also includes a processor configured to execute the instructions to perform a method that includes segmenting a first portion of a data block into a plurality of segments that includes a first segment. The data block includes a second portion, different from the first portion, which stores cyclic redundancy check data calculated from data stored in the first portion of the data block. The method also includes calculating cyclic redundancy check data from the first segment, and, translating the calculated cyclic redundancy check data to a location associated with the data block. The method also includes combining the cyclic redundancy check data associated with the first segment and cyclic redundancy check data associated with at least one other segment included in the plurality of segments. The method also includes using the combined cyclic redundancy check data for error detection.
Implementations may include one or more of the following features. The cyclic redundancy check data associated with at least one other segment may be translated to the location associated with the data block. Calculating the cyclic redundancy check data from the first segment may include forward direction, reverse direction and forward and reverse direction calculations. The calculated cyclic redundancy check data from the first segment may include a maximum length sequence. Calculating the cyclic redundancy check data from the first segment may include initiating calculations from a non-zero state. The cyclic redundancy check data stored in the second portion of the data block may be calculated prior to transmission of the data block.
In general, in one aspect, a computer program product tangibly embodied in an information carrier and comprising instructions that when executed by a processor perform a method includes segmenting a first portion of a data block into a plurality of segments that includes a first segment. The data block includes a second portion, different from the first portion, which stores cyclic redundancy check data calculated from data stored in the first portion of the data block. The method also includes calculating cyclic redundancy check data from the first segment, and, translating the calculated cyclic redundancy check data to a location associated with the data block. The method also includes combining the cyclic redundancy check data associated with the first segment and cyclic redundancy check data associated with at least one other segment included in the plurality of segments. The method also includes using the combined cyclic redundancy check data for error detection.
Implementations may include one or more of the following features. The cyclic redundancy check data associated with at least one other segment may be translated to the location associated with the data block. Calculating the cyclic redundancy check data from the first segment may include forward direction, reverse direction and forward and reverse direction calculations. The calculated cyclic redundancy check data from the first segment may include a maximum length sequence. Calculating the cyclic redundancy check data from the first segment may include initiating calculations from a non-zero state. The cyclic redundancy check data stored in the second portion of the data block may be calculated prior to transmission of the data block.
These and other aspects and features and various combinations of them may be expressed as methods, apparatus, systems, means for performing functions, program products, and in other ways.
Other features and advantages will be apparent from the description in the claims.
Referring to
One or more techniques may be implemented for checking the CRC data 104 included in the data block 100 and the CRC data calculated from the payload 102 (upon receipt of the data block). For example, data may be accessed from the payload 102 in a particular manner for calculating the CRC (that is compared to the CRC data 104). In this particular example, data is read from one position 106 (i.e., the left most position), referred to as the start position, and progresses to a second position 108 (i.e., the right most position), referred to as the stop position. Moving from the start position 106 to the stop position 108, for reference, the data accessing direction is defined as being forward. As such, payload data is considered as being gathered in a forward direction for calculating the CRC. Alternatively, the opposite direction (e.g., backward direction) may also be used for gather payload data. Referring to exemplary data block 110, which includes a payload 112 and CRC data 114, data is accessed in the opposite direction. In particular, data is accessed from a start position 116 to a stop position 118 in a backward direction (compared to the forward direction associated with accessing the data of the data block 100). As such, CRC checking may be accomplished in either direction, forward or backward. The calculations and comparisons associated with CRC checking, while progressing through payload data in either direction, may be completed in a relatively efficient manner. However, some decoders (e.g., Turbo decoders) operate by dividing data payloads into segments and separately decoding each individual segment. Such decoding schemes, which typically involve considerable recursive iterations (e.g., sixteen to twenty-four iterations for Turbo decoders), may need significant processing time and computational resources (e.g., twelve times the processing time needed for CRC checking). To improve processing efficiency for such decoders, less intense processing operations may be executed in concert with the time consuming decoding operations. For example, CRC checking may be accomplished by executing operations on individual segments. Once decoding is completed, the CRC data associated with each segment may be used in combination to calculate CRC data for the entire data block (and be compared to the CRC data stored in the data block). In another arrangement, upon detecting one or more errors in an individual segment during CRC checking, decoding operations may be halted or other steps executed (e.g., repeat processing on the segment) to address the error detection. Along with improving efficiency, performing such functions in parallel may reduce consumption of computational resources.
Referring to
Along with accessing segment data in a forward direction, a segmented payload may be accessed in a backward direction for CRC checking. For example, a payload 232 of a data block 230 may be divided in a manner similar to the payload of data block 200. As such, four demonstrative segments 234, 236, 238, 240 are each accessed in a backward direction. In particular, respective starting points 242, 246, 250, 254 and stopping points 244, 248, 252, 256 are used to access data for CRC checking of the payload segments 234, 236, 238, 240. To determine if one or more errors are present in the data, the calculated CRC data is compared to CRC data 258 included in the data block 230. For both data blocks 200, 230, each respective segment is accessed using the same direction, e.g., segments of data block 200 are accessed in a forward direction and segments of data block 230 are accessed in a backward direction. In some arrangements, accessing in different directions may be used for CRC checking of data block segments. For example, a payload 262 of a data block 260 may be divided into segments 264, 266, 268 and 270 that may be accessed in the forward or backward direction. In this example, segments 264 and 268 are accessed in the forward direction (e.g., defined by respective starting points 272, 280 and stopping points 274, 282) and segments 266 and 270 are accessed in the backward direction (e.g., defined by respective starting points 278, 286 and stopping points 276, 284). Similar to data blocks 200 and 230, the calculated CRC data from the segments is compared to CRC data 288 stored in the data block 260. In this particular example, an equivalent number of segments are accessed in the forward direction and in the backward direction (e.g., two segments for each direction). However, different numbers of segments may be accessed for each of the directions (e.g., more segments are accessed in the forward direction).
Referring to
In this representation, I is the identity matrix and b is a vector that represents a function used to generate the CRC data (e.g., polynomial tap positions excluding the first and last polynomial terms). The quantity wk, determined by modulo-2 addition, is the k-th CRC data vector and uk is the k-th bit of the data block payload. The quantity W represents the final value of the CRC word vector for the data block of length k.
Similarly, for CRC checking in the backward direction, the state space system is calculated from the inverse:
For matrices C and D, the matrix inverse operations are followed by a modulo-2 operation such that each matrix element has a value of “one” or “zero”. For the payload data to be considered as passing the CRC check, the vector w0 includes all zero values.
Illustrated in the figure, a CRC checker 300 can access payload data in a forward direction to determine if CRC data calculated from the payload data matches CRC data extracted from the data block. Similarly, a CRC checker 302 is illustrated that operates in a reverse direction to determine if the CRC data matches. In both arrangements, uk represents the k-th bit of the payload data, and elements from the vector b (e.g., b1, b2, b3, b4, b5, bN−2, bN−1, etc.) represent, for example, the terms of a polynomial (excluding the first and last polynomial term) selected to generate the CRC data. Similar addition operations (i.e., modulo-2 addition), logic operations (e.g., AND logical operations) and shift register operations (shift register elements are represented with Z−1) are used in each arrangement. In general, CRC polynomials are often selected that have the property of being irreducible (e.g., cannot be factored into nontrivial polynomials over the same field). As such, temporarily ignoring the payload data input uk, the shift registers can be considered maximal length sequence generators. As such, the shift registers are capable of producing each possible binary sequence (before returning to the initial sequence) so long as the initial sequence is not a sequence of all zero values. While the CRC checkers 300, 302 are capable of checking entire data block payloads, such checkers architecture may be adjusted for checking payload segments.
Referring to
In general, translation of the CRC data may be provided from a transform, E. For translating CRC data from a payload segment forward t steps, the transform may be represented as:
E=A
t;
and for translating CRC data from a segment backward t steps, the transform may be represented as:
E=C
t.
For each segment, the initial value is the all zero state. For forward recursions, with a starting point S, a k-length CRC vector may be represented as:
w
s=[0 . . . 0];
w
k+1
=A·w
k
⊕B·u
k;
W=w
S+t.
Similarly, for backward recursions, with an ending point S, a t-length CRC vector may be represented as:
w
s=[0 . . . 0];
w
k
=C·w
k+1
⊕D·u
k;
Referring to
Graphical representation 420 illustrates another methodology for translating and combining CRC data associated with payload segments. In general, CRC data associated with two (or more) payload segments may be combined prior to being translated. Further, the combined CRC data may be translated to another payload segment and combined with additional CRC data (associated with the segment). Referring to the graphical representation 420, CRC data is calculated for a payload segment, translated to an adjacent segment and combined. For example, CRC data is calculated by progressing from a starting point 422 to a stopping point 424 associated with a payload segment (as represented with an arrow 426). Once calculated, the CRC data is translated to a location associated with an adjacent payload segment (as represented by an arrow 428). Similar to the first payload segment (defined by the starting point 422 and the stopping point 424), CRC data is also calculated for the adjacent segment by progressing from a starting point 430 to a stopping point 432 (as represented with an arrow 434). Upon reaching the stopping point 432, the calculated CRC data is combined (e.g., using modulo-2 addition) with the translated CRC data from the first segment. Once the CRC data from the two segments are combined, the aggregate CRC data is translated to a location associated with the next payload segment (as represented by an arrow 436). At this location, the aggregate CRC data is further combined with CRC data associated with the next payload segment and is translated. Such combining and translating of CRC data continues (as represented by an arrow 440) until reaching a location 442 associated with the last segment of the payload. Upon reaching this location, the translated and combined CRC data may be used to identify if one or more data errors are present in the payload of the data block.
In this particular example, CRC data is combined from two adjacent payload segments prior to being translated, however, other methodologies may also be implemented. For example, CRC data associated with more than two segments (e.g., three segments) may be combined and translated. Both forward and backward directions may be used for translating data along with translation positions for the CRC data associated with the payload segments. Further, while this example suggested that the payload segments have equivalent lengths, in some arrangement a variety of segment lengths may be implemented.
Referring to
Referring to
Operations of the CRC checker include dividing 602 a payload of a data block or other type of data collection (e.g., retrieved from a storage device or received from one or more communications). Once segmented, the CRC checker may calculate 604 CRC data associated with a segment. In some arrangements, the CRC checker steps through the data segments in particular direction, such as a forward direction or a backward direction. Operations also include translating 606 the calculated CRC data, for example, the data calculated from the segment may be translated to a location associated with the data block payload (e.g., one end of the payload). Upon translating the data, operations may include determining 608 if additional payload segments need corresponding CRC data calculated and translated. If at least one additional payload segment is present, operations include returning to calculate 604 and translate 606 the appropriate CRC data. If CRC data has been calculated and translated for each payload segment, operations may include combining 610 the translated CRC data (e.g., translated to one end of the data block payload). Upon combining the data, the CRC checker may perform additional operations, for example, the combined data may be checked 612 to determine if one or more data errors have been detected by the checker. Such an operation may also be provided by another processing stage (e.g., after being provided the combined CRC data by the CRC checker).
Referring to
As mentioned above, CRC checking and operations associated with CRC checking (e.g., illustrated with flowcharts 600 and 700) may be executed by a computing device. For example a computing device may be a computer system that performs computer-implemented methods for executing instructions associated CRC checking of data blocks. The computing device may include a processor, a memory, a storage device, and an input/output device. Each of the components may be interconnected using a system bus or other similar structure. The processor may be capable of processing instructions for execution within the computing device. In one implementation, the processor is a single-threaded processor. In another implementation, the processor is a multi-threaded processor. The processor is capable of processing instructions stored in the memory or on the storage device to display graphical information for a user interface on the input/output device.
The memory stores information within the computing device. In one implementation, the memory is a computer-readable medium. In one implementation, the memory is a volatile memory unit. In another implementation, the memory is a non-volatile memory unit.
The storage device is capable of providing mass storage for the computing device. In one implementation, the storage device is a computer-readable medium. In various different implementations, the storage device may be a floppy disk device, a hard disk device, an optical disk device, or a tape device.
The input/output device provides input/output operations for the computing device. In one implementation, the input/output device includes a keyboard and/or pointing device. In another implementation, the input/output device includes a display unit for displaying graphical user interfaces.
The features described can be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. The apparatus can be implemented in a computer program product tangibly embodied in an information carrier, e.g., in a machine-readable storage device or in a propagated signal, for execution by a programmable processor; and method steps can be performed by a programmable processor executing a program of instructions to perform functions of the described implementations by operating on input data and generating output. The described features can be implemented advantageously in one or more computer programs that are executable on a programmable system including at least one programmable processor coupled to receive data and instructions from, and to transmit data and instructions to, a data storage system, at least one input device, and at least one output device. In some arrangements the operations associated with the instructions may be implemented in circuitry or other type of hardware. A computer program is a set of instructions that can be used, directly or indirectly, in a computer to perform a certain activity or bring about a certain result. A computer program can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
Suitable processors for the execution of a program of instructions include, by way of example, both general and special purpose microprocessors, and the sole processor or one of multiple processors of any kind of computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for executing instructions and one or more memories for storing instructions and data. Generally, a computer will also include, or be operatively coupled to communicate with, one or more mass storage devices for storing data files; such devices include magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and optical disks. Storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including by way of example semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, ASICs (application-specific integrated circuits).
The features can be implemented in a computer system that includes a back-end component, such as a data server, or that includes a middleware component, such as an application server or an Internet server, or that includes a front-end component, such as a client computer having a graphical user interface or an Internet browser, or any combination of them. The components of the system can be connected by any form or medium of digital data communication such as a communication network. Examples of communication networks include, e.g., a LAN, a WAN, and the computers and networks forming the Internet.
The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a network, such as the described one. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
Other embodiments are within the scope of the following claims. The techniques described herein can be performed in a different order and still achieve desirable results.