CN111064546A - Method for realizing information bit and redundancy code safety conversion based on CRC - Google Patents
Method for realizing information bit and redundancy code safety conversion based on CRC Download PDFInfo
- Publication number
- CN111064546A CN111064546A CN201911260920.6A CN201911260920A CN111064546A CN 111064546 A CN111064546 A CN 111064546A CN 201911260920 A CN201911260920 A CN 201911260920A CN 111064546 A CN111064546 A CN 111064546A
- Authority
- CN
- China
- Prior art keywords
- crc
- message
- compensation value
- bits
- bit
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/22—Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0056—Systems characterized by the type of code used
- H04L1/0061—Error detection codes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Error Detection And Correction (AREA)
- Detection And Prevention Of Errors In Transmission (AREA)
- Detection And Correction Of Errors (AREA)
Abstract
The invention relates to a method for realizing safe conversion of information bits and redundant codes based on CRC, which utilizes the combinability principle of CRC and combines with offline configuration data, wherein the offline configuration data is a compensation value from CRC to redundant codes or a compensation value from redundant codes to CRC; and calculating a redundancy code through the CRC and the compensation value, or calculating the CRC from the redundancy code and the compensation value, thereby realizing the safe mutual conversion between the redundancy code and the compensation value. Compared with the prior art, the method has the advantages of improving the safety of the message and the like.
Description
Technical Field
The invention relates to the technical field of safety of railway signal systems, in particular to a method for realizing safe conversion of information bits and redundant codes based on CRC (Cyclic redundancy check).
Background
The RSSP-I protocol (railway signal safety communication protocol-type I protocol) is a safety communication protocol based on a closed system, and can ensure protection such as repetition, deletion, insertion, misordering, damage, delay and the like in the communication process. At present, in a large iron system, communication between an interlocking-train control system, an interlocking-interlocking system and a train control-train control system mainly adopts an RSSP-I protocol.
The existing iLOCK-IPS system is a "2 by 2" security system based on redundant coding (NISAL coding) technology. For a system adopting a redundant coding technology, how to convert information bits of a Safety data part in the receiving process in an RSSP-I protocol into redundant codes and convert redundant code bits in the sending process into information bits is the work to be processed by an RSSP-I application layer, wherein NISAL (numerical Integrated Safety Access logic) is a redundant coding system of digital Integrated Safety guarantee logic.
In the existing scheme, conversion is carried out based on a table look-up method and inverse verification is carried out, and the method is complex in design and poor in safety.
Disclosure of Invention
The present invention is directed to overcome the above-mentioned drawbacks of the prior art, and provides a method for safely converting information bits and redundant codes based on CRC.
The purpose of the invention can be realized by the following technical scheme:
a method for realizing information bit and redundancy code safety conversion based on CRC utilizes the combinability principle of CRC and combines with off-line configuration data, wherein the off-line configuration data is the compensation value from CRC to redundancy code or the compensation value from redundancy code to CRC;
and calculating a redundancy code through the CRC and the compensation value, or calculating the CRC from the redundancy code and the compensation value, thereby realizing the safe mutual conversion between the redundancy code and the compensation value.
Preferably, the process of converting the redundancy code into the information bit to the redundancy code bit is calculated by the CRC and the compensation value.
Preferably, the information bit is converted into the redundancy code bit by a message conversion mode.
Preferably, the specific process of converting the information bits into the redundancy code bits is as follows:
and removing all information bits except the target information bit in a message conversion mode to enable the message to be converted into a conversion message only containing the srCID (serial number) for displaying the message source and the target information bit, obtaining the CRC of the message through the basic principle and the combinability principle of the CRC, and obtaining the redundant code bit corresponding to the information bit by combining the compensation value calculated off line.
Preferably, the process of converting the CRC into the information bits for the redundant code bits is calculated from the redundant code and the compensation value.
Preferably, the redundant code bits are converted into the information bits by splicing.
Preferably, the specific process of converting the redundant code bits into the information bits is as follows:
firstly, splicing all information bits to corresponding messages in a splicing mode;
secondly, splicing the CRC corresponding to the information bit to the CRC of the message by using the compensation value calculated off line and the corresponding redundant code bit;
and finally, each step of splicing is overlapped to calculate a compensation value for splicing the srcID finally, so that the integrity and the sequence of the whole process are ensured.
Preferably, the redundant code bit-to-information bit portion utilizes two CRCs in the message, where CRC1 implements a unique correspondence between the rest of the message header and the srcID, and CRC2 implements a unique correspondence between the srcID and the message body.
Compared with the prior art, the invention has the following advantages:
(1) the information bit is converted into the redundancy code bit part, the key part srcID of the message is reserved in the whole analysis process, and the safety of the message is improved.
(2) The redundant code bits are transferred to the information bit portion, making full use of the two CRCs (different polynomials) in the message. CRC1 provides a unique correspondence of the rest of the header to the srcID and CRC2 provides a unique correspondence of the srcID to the body of the message. The two CRCs cooperate to ensure the integrity of the entire message.
(3) The invention improves the safety of conversion between the information bits and the redundant code bits from the aspect of coding, does not depend on hardware and environment, and has certain transportability and universality.
Drawings
FIG. 1 is a schematic diagram of a message structure;
FIG. 2 is a diagram of the information bit to redundancy bit portion;
FIG. 3 is a diagram of a portion of a redundancy code bit to an information bit;
fig. 4 is another diagram of the redundant bits to information bits portion.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
The scheme described in the invention mainly utilizes the combinability principle of CRC, combines off-line configuration data (the off-line configuration data is the compensation value from CRC to redundancy coding or the compensation value from redundancy coding to CRC), and calculates the redundancy coding through the CRC and the compensation value, or calculates the CRC from the redundancy coding and the compensation value, thereby realizing the safe mutual conversion between the CRC and the redundancy coding.
The CRC combinatorial principle refers to: if there are two messages A and B, the respective CRCs are CRC _ A and CRC _ B, then the CRC for message A ^ B is CRC _ A ^ CRC _ B. The invention derives from this and the basic principle of CRC.
The invention relates to a safe mutual conversion method of an information bit and a redundant code bit, which comprises the steps of converting the information bit into the redundant code bit and converting the redundant code bit into the information bit.
Structurally, this technique can be divided into a discrete line portion and an online computation portion. The off-line part is a data preparation part, and the correctness of the prepared data can be verified off-line; the online computing section uses the preparation data of the offline computing section.
The information bit to redundant code bit is to remove all information bits except the target information bit by means of message conversion, so that the message is changed into a conversion message only containing srcID for displaying the message source and the target information, and the CRC is obtained by the basic principle and the combinability principle of the CRC, and the redundant code bit corresponding to the information bit is obtained by combining the compensation value calculated off line.
The redundant code bit to information bit is formed by splicing all information bits to corresponding messages; splicing the CRC corresponding to the information bit to the CRC of the message by using the compensation value calculated off line and the corresponding redundant code bit; and finally, each step of splicing is overlapped to calculate a compensation value for splicing the srcID finally, so that the integrity and the sequence of the whole process are ensured.
Assume that the message structure is as shown in fig. 1, where: head is the message header, srcID is the sender's identification in Head (when the redundancy code bit is converted into the message bit, this part is dstID), Msg is the message body, ParaN is the information bit (N stands for variable number), CRC1, CRC2 are two CRCs (different polynomials, not including CRC itself) of the message. Take a CRC of a message as an example.
The process of converting the information bits into the redundancy code bits is shown in fig. 2, where CRC-N is a CRC corresponding to each step of the changed message, and the converting part specifically includes the following steps:
1. if the CRC of the original message Msg1 is CRC-11;
2. setting the srCID representing the message source in the Msg1 as 0 and setting the target information position as 0 to obtain a message Msg2, and calculating to obtain CRC: CRC-12;
msg1 Msg2 get a message Msg3 that only retains srcID and target information bits; CRC-1^ CRC-2 gives the CRC of Msg 3: CRC-13;
4. by means of reverse CRC, a CRC of message Msg4 is obtained with only srcID and target information bits, and the rest removed completely: CRC-14;
5. calculating to obtain redundant code bits corresponding to the information bits through the compensation values corresponding to the offline calculated information bits and CRC-14;
6. and repeating the steps to obtain the redundant code bits of all the message bits.
The method for converting the redundant code bit into the information bit part comprises the following steps:
firstly, directly calculating CRC of a message header, then splicing information bits and corresponding CRC to finally obtain complete messages and CRC 1;
taking a CRC of a message as an example, the process is shown in fig. 3, which can be specifically described as:
1. directly calculating CRC, CRC-21, of the message Msg1 with the message header part reserved and the rest of the message zero;
2. obtaining a message Msg2 only containing information bits and the rest of the message being 0 according to the comparison result of the redundant code bits and the offline configured redundant code bits;
3. calculating CRC (cyclic redundancy check) and CRC-22 corresponding to the information bit by combining the redundancy code bit and the compensation value configured offline;
4. concatenating the message and the CRC into the message: msg1 Msg2 and CRC-21 CRC-22 to obtain a message containing a message header and corresponding information bits and the corresponding CRC thereof;
5. repeating the steps 2, 3 and 4 according to the number of the information bits to obtain a final complete message and a corresponding CRC 1;
directly calculating the dstID representing the message destination in the message header to be 0, reserving the rest part in the message header, setting the rest part except the message header to be CRC of 0, then splicing the CRC corresponding to the information bit, and finally splicing the CRC corresponding to the corresponding dstID, thereby obtaining complete CRC 2;
the process is shown in fig. 4, and can be specifically described as follows:
1. calculate the CRC for message Msg1 with the rest of the message set to 0, the dstID in the header representing the message destination also set to 0: CRC-31;
2. obtaining a message Msg2 only containing information bits and setting all the rest parts of the message as 0 according to the comparison result of the redundant code bits and the offline configured redundant code bits;
3. and calculating CRC corresponding to the message bit by combining the redundancy code bit and the off-line configured compensation value: CRC-32;
4. overlapping the redundant code bit corresponding to the message bit into a redundant code bit Sum (Sum);
5. concatenating the message and the CRC into the message: msg1 Msg2 and CRC-31 CRC-32 to obtain CRC of the message containing the message header and the corresponding information bits;
6. repeating steps 2-5 to obtain a CRC of message Msg3 with the remaining parts intact except for dstID: CRC-33, and the redundancy code bits and Sum;
sum, in combination with the offline offset of dstID, calculates the corresponding CRC-34, and after XOR operation with CRC-33, obtains CRC2 of the complete message.
And thirdly, the CRC2 is put at the position of the second CRC in the message, and the final complete message can be obtained.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (8)
1. A method for realizing safe conversion between information bits and redundancy codes based on CRC is characterized in that the method utilizes the combinability principle of CRC and combines offline configuration data, wherein the offline configuration data is a compensation value from CRC to redundancy codes or a compensation value from redundancy codes to CRC;
and calculating a redundancy code through the CRC and the compensation value, or calculating the CRC from the redundancy code and the compensation value, thereby realizing the safe mutual conversion between the redundancy code and the compensation value.
2. The method of claim 1, wherein the CRC and the offset value are used to calculate the process of converting the redundant code into the information bit to the redundant code bit.
3. The method of claim 2, wherein the information bits are converted to the redundancy code bits by converting a message.
4. The method for safely converting information bits into redundancy codes based on CRC as claimed in claim 2, wherein the specific process of converting information bits into redundancy code bits is as follows:
and removing all information bits except the target information bit in a message conversion mode to enable the message to be converted into a conversion message only containing the srCID (serial number) for displaying the message source and the target information bit, obtaining the CRC of the message through the basic principle and the combinability principle of the CRC, and obtaining the redundant code bit corresponding to the information bit by combining the compensation value calculated off line.
5. The method as claimed in claim 1, wherein the process of converting the CRC into the information bits for the redundant code bits is calculated from the redundant code and the compensation value.
6. The method as claimed in claim 5, wherein the redundant code bits are converted into the information bits by splicing.
7. The method as claimed in claim 5, wherein the process of converting the redundant code bits into the information bits is as follows:
firstly, splicing all information bits to corresponding messages in a splicing mode;
secondly, splicing the CRC corresponding to the information bit to the CRC of the message by using the compensation value calculated off line and the corresponding redundant code bit;
and finally, each step of splicing is overlapped to calculate a compensation value for splicing the srcID finally, so that the integrity and the sequence of the whole process are ensured.
8. The method of claim 7, wherein the converting of the redundant code bits to the information bits uses two CRCs in the message, wherein the CRC1 implements a unique correspondence between the rest of the message header and the srcID, and the CRC2 implements a unique correspondence between the srcID and the message body.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911260920.6A CN111064546B (en) | 2019-12-10 | 2019-12-10 | Method for realizing information bit and redundancy code safety conversion based on CRC |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911260920.6A CN111064546B (en) | 2019-12-10 | 2019-12-10 | Method for realizing information bit and redundancy code safety conversion based on CRC |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111064546A true CN111064546A (en) | 2020-04-24 |
CN111064546B CN111064546B (en) | 2022-05-31 |
Family
ID=70300375
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911260920.6A Active CN111064546B (en) | 2019-12-10 | 2019-12-10 | Method for realizing information bit and redundancy code safety conversion based on CRC |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111064546B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0276991A1 (en) * | 1987-01-30 | 1988-08-03 | Sony Corporation | Encoding method and apparatus for recording data with an identification code and an error check code |
EP0556805A2 (en) * | 1992-02-20 | 1993-08-25 | Hitachi, Ltd. | Fail-safe information processing system |
GB0212978D0 (en) * | 2002-06-06 | 2002-07-17 | Motorola Inc | System, transmitter, receiver, and methods for use with timeslot identifiers in a timeslot-based protocol |
US20080288845A1 (en) * | 2007-05-15 | 2008-11-20 | Texas Instruments Incorporated | Range Extension and Noise Mitigation For Wireless Communication Links Utilizing a CRC Based Single and Multiple Bit Error Correction Mechanism |
US20100153828A1 (en) * | 2008-11-04 | 2010-06-17 | De Lind Van Wijngaarden Adriaan J | Method and apparatus for error detection in a communication system |
JP2010182287A (en) * | 2008-07-17 | 2010-08-19 | Steven C Kays | Intelligent adaptive design |
CN103795502A (en) * | 2014-02-28 | 2014-05-14 | 杭州华三通信技术有限公司 | Data frame check code generating method and device |
WO2016162320A1 (en) * | 2015-04-08 | 2016-10-13 | Telefonaktiebolaget Lm Ericsson (Publ) | Decoding of messages with known or hypothesized difference |
-
2019
- 2019-12-10 CN CN201911260920.6A patent/CN111064546B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0276991A1 (en) * | 1987-01-30 | 1988-08-03 | Sony Corporation | Encoding method and apparatus for recording data with an identification code and an error check code |
EP0556805A2 (en) * | 1992-02-20 | 1993-08-25 | Hitachi, Ltd. | Fail-safe information processing system |
GB0212978D0 (en) * | 2002-06-06 | 2002-07-17 | Motorola Inc | System, transmitter, receiver, and methods for use with timeslot identifiers in a timeslot-based protocol |
US20080288845A1 (en) * | 2007-05-15 | 2008-11-20 | Texas Instruments Incorporated | Range Extension and Noise Mitigation For Wireless Communication Links Utilizing a CRC Based Single and Multiple Bit Error Correction Mechanism |
JP2010182287A (en) * | 2008-07-17 | 2010-08-19 | Steven C Kays | Intelligent adaptive design |
US20100153828A1 (en) * | 2008-11-04 | 2010-06-17 | De Lind Van Wijngaarden Adriaan J | Method and apparatus for error detection in a communication system |
CN103795502A (en) * | 2014-02-28 | 2014-05-14 | 杭州华三通信技术有限公司 | Data frame check code generating method and device |
WO2016162320A1 (en) * | 2015-04-08 | 2016-10-13 | Telefonaktiebolaget Lm Ericsson (Publ) | Decoding of messages with known or hypothesized difference |
Non-Patent Citations (2)
Title |
---|
ALICE_COCO: "RSSP-I铁路信号安全通信协议", 《豆丁网》 * |
李谦等: "企业铁路调度集中底层通信协议研究", 《2008全国第十三届自动化应用技术学术交流会论文集》 * |
Also Published As
Publication number | Publication date |
---|---|
CN111064546B (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101841388B (en) | Information security transmission method for numerical control bus | |
CN107911198B (en) | Interface implementation method based on safety code and railway signal safety protocol RSSP-II | |
AU2003251388A1 (en) | Forward error correction method and system for reliable transmission of real time data over a packet based networks | |
CN102571259B (en) | Safe and controllable communication method used for numerical control bus | |
CN104158624B (en) | A kind of redundancy two for BTM systems takes two decoding controllers and coding/decoding method | |
AU6753000A (en) | System and method for detecting double-bit errors and for correcting errors due to component failures | |
CN105228157A (en) | A kind of wireless sensor network security light weight reprogramming method | |
CN116094731A (en) | Signature authentication method and system based on Wen Haxi chain | |
CN111064546B (en) | Method for realizing information bit and redundancy code safety conversion based on CRC | |
CN101647229A (en) | Compressed ECDSA signatures | |
EP3131219B1 (en) | Puncturing of ldpc codes | |
CN107835066A (en) | A kind of RSSP I safety communicating methods | |
CN102795246B (en) | A kind of high safe LEU and improve the method for its fail safe | |
CN111010258B (en) | Computer interlocking system communication method based on coding | |
KR20130099023A (en) | Communication method with echo | |
WO2001011818A3 (en) | Method and apparatus for generating a message authentication code | |
CN103152123B (en) | Based on digital control system double loop field bus from error detection with from the transmission method of error correction | |
JP2010199651A (en) | Duplicated address detection system, transmission device, and receiving device | |
CN111402108A (en) | Equipment coding method and device for railway station equipment monitoring platform | |
CN104954212B (en) | A kind of data transmission method, communication equipment and data transmission system | |
JP3613871B2 (en) | Code correction device | |
CN110933024A (en) | Method, system, receiving end and sending end applied to data transmission of switch | |
CN104917592A (en) | Error detection and error correction circuit for data with 10-bit wide | |
CN107124248A (en) | A kind of communication means, apparatus and system | |
JP2896442B2 (en) | Signal transmission verification system and signal transmission system |
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 |