CN117528523A - Safety communication method of digital track vehicle-mounted navigation controller based on CAN - Google Patents

Safety communication method of digital track vehicle-mounted navigation controller based on CAN Download PDF

Info

Publication number
CN117528523A
CN117528523A CN202311440995.9A CN202311440995A CN117528523A CN 117528523 A CN117528523 A CN 117528523A CN 202311440995 A CN202311440995 A CN 202311440995A CN 117528523 A CN117528523 A CN 117528523A
Authority
CN
China
Prior art keywords
data
sequence number
communication
packet sequence
packet
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.)
Pending
Application number
CN202311440995.9A
Other languages
Chinese (zh)
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 Electric Group Intelligent Transportation Technology Co ltd
Original Assignee
Shanghai Electric Group Intelligent Transportation Technology 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 Electric Group Intelligent Transportation Technology Co ltd filed Critical Shanghai Electric Group Intelligent Transportation Technology Co ltd
Priority to CN202311440995.9A priority Critical patent/CN117528523A/en
Publication of CN117528523A publication Critical patent/CN117528523A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/10Integrity
    • H04W12/106Packet or message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/61Time-dependent
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/024Guidance services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/48Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for in-vehicle communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a safe communication method of a digital track vehicle-mounted navigation controller based on CAN, which defines a packet sequence number, a source address, a target address, a check code of a data section and a data transmission time stamp in a CAN communication protocol, wherein a transmitting end of the vehicle-mounted navigation controller unpacks a data message, and a receiving end of the vehicle-mounted navigation controller carries out packet splicing processing. The safety communication method of the digital track vehicle-mounted navigation controller based on the CAN CAN verify the content of the communication message in the vehicle-mounted CAN network, identify the abnormal information in communication, timely process the abnormality according to the error type and improve the safety of vehicle positioning and navigation control; although the number of the messages is increased, the vehicle-mounted CAN communication baud rate is 500K, the minimum communication period is 20ms, the CAN communication load is still very low, and the influence of the increase of the messages on the CAN communication load CAN be ignored.

Description

Safety communication method of digital track vehicle-mounted navigation controller based on CAN
Technical Field
The invention relates to a safe communication method of a digital track vehicle navigation controller based on CAN.
Background
Referring to fig. 1, a digital track vehicle-mounted navigation controller 1 includes a vehicle-mounted communication module 11 and a vehicle-mounted control module 12, and in order to realize accurate positioning and vehicle control of a vehicle, the digital track vehicle-mounted navigation controller 1 needs to communicate with a vehicle-mounted magnetic sensor 2 and a vehicle controller 3 in real time. The communication between the vehicle-mounted devices has higher requirements on real-time performance and reliability, and the CAN bus communication has the advantages of stable data transmission signals, small loss, difficult external interference and the like, so that the CAN bus communication is adopted between the vehicle-mounted navigation controller and other vehicle-mounted devices.
The vehicle navigation controller belongs to a core device of a vehicle, and owners and vehicle factories generally require that the vehicle navigation controller can meet the requirement of SIL2 at the lowest, so that a communication protocol of the vehicle navigation controller and external equipment needs to adopt a safe communication protocol, namely the communication protocol can protect six communication anomalies of repeated communication data, data loss, data insertion, data disorder, data damage and data delay. Because the length of a frame effective data field of a CAN standard frame is only 8 bytes, a single CAN communication message CAN not meet the requirement of safety communication, and therefore a CAN communication protocol needs to be expanded to develop a safety communication method based on CAN communication.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a safe communication method of a digital track vehicle-mounted navigation controller based on CAN, which CAN verify the content of communication messages in a vehicle-mounted CAN network, identify abnormal information in communication, timely process the abnormality according to the error type and improve the safety of vehicle positioning and navigation control.
The technical scheme for achieving the purpose is as follows: a safe communication method of a digital track vehicle navigation controller based on CAN comprises the following steps:
defining a packet sequence number, a source address, a target address, a check code of a data section and a data transmission time stamp in a CAN communication protocol, unpacking a data message by a transmitting end of a vehicle navigation controller, and splicing a packet by a receiving end of the vehicle navigation controller, wherein the data format is shown in Table 1:
table 1. Data format table:
wherein 8 bits, 1-6 bits in the packet sequence number byte are used for circularly identifying the packet sequence number, and the value range of the packet sequence number is 0-63 cycles; 7-8 bits are used for representing the sub-packet sequence number, the value range is 0-3, and a complete data packet is composed of 4 sub-packets at most;
8 bits in the address sequence number byte, the low order 1-4 bits represent the source address, the value range is 0-15, the high order 5-8 bits identify the destination address, and the value range is 0-15;
the time stamp is in 3-6 bytes of the first packet, the value of the time stamp is a millisecond value from the current time to 0 minute 0 second 0 millisecond of the current time to the current day, and the receiving end considers the time cross-day condition from the transmitting end to the receiving end when receiving the time stamp; the sending end and the receiving end perform clock synchronization in real time;
the communication content check code adopts CRC32, and is based on address serial number, time stamp and effective field W 1 -W N And (5) generating data.
The safe communication method of the digital track vehicle navigation controller based on the CAN comprises the following steps of:
s11, generating a global packet sequence number, and circularly acquiring a transmission packet sequence number, wherein the value range of the packet sequence number is 0-63 cycles;
s12, reading the source address and the destination address information loaded by initialization, generating first packet address serial number information according to defined equipment numbers, wherein 1-4 bits are the source address, namely the equipment number of a transmitting end, and 5-8 bits are the destination address, namely the address number of a receiving end;
s13, acquiring a current time stamp, wherein the value is a millisecond value from the current time to 0 minute, 0 second and 0 millisecond of the current time, and the lower position is in front;
s14, packaging the effective field into each sub-packet, and setting bit7-8 of the first byte of each packet as a corresponding sub-packet sequence number to support 4 sub-packets at most;
s15, according to the address serial number, the time stamp and the effective field W in the communication content 1 -W N And generating CRC32 codes by the data, and sending CAN communication messages, wherein the CRC32 codes are positioned in byte 5-8 of the last subpacket, and the lower order is in front.
The safe communication method of the digital track vehicle navigation controller based on the CAN comprises the following steps of:
s21, receiving a CAN communication message, and judging the type of the message attribution of the current message according to the message ID;
s22, analyzing the current message, judging whether the current message is received completely, and storing the current packet into a memory for temporary processing to form cache data if the current message is not received completely; if the message is received completely, analyzing the complete information, and combining the information according to the sub-packet sequence numbers to obtain a source address, a destination address, a time stamp, a CRC32 and effective message contents;
s23, judging whether the current message and the last message packet sequence number are continuous, if the current packet sequence number is 0, the last packet sequence number is 63; if the current packet sequence number is the previous packet of the previous packet sequence number, the data is disordered; repeating the data if the current packet sequence number is the same as the previous packet sequence number;
if the current packet sequence number is different from the incomplete packet sequence number in the cache data, the data packet data in the cache data is considered to be lost;
s24, judging that the source address or the destination address of the current packet is not matched with the configuration, and considering that the data is inserted;
s25, locally acquiring a time stamp, and considering data delay if the current local time stamp and the time stamp in the CAN communication message content are larger than 3 communication periods;
s26, calculating CRC32 according to the received information, comparing with CRC32 in the CAN communication message content, and if the calculated check codes are different, considering that the data is damaged, and ignoring the information;
s27, the receiving end of the vehicle navigation controller receives normal information, records error information and reports communication fault information.
The safety communication method of the digital track vehicle-mounted navigation controller based on the CAN CAN verify the content of the communication message in the vehicle-mounted CAN network, identify the abnormal information in the communication, timely process the abnormality according to the error type and improve the safety of vehicle positioning and navigation control.
Drawings
FIG. 1 is a block diagram of a digital track car navigation controller;
FIG. 2 is a data transmission flow chart of the secure communication method of the CAN-based digital track vehicle navigation controller of the present invention;
fig. 3 is a data receiving flow chart of the secure communication method of the CAN-based digital track car navigation controller of the present invention.
Detailed Description
In order to enable those skilled in the art to better understand the technical scheme of the present invention, the following detailed description is provided with reference to the accompanying drawings:
referring to fig. 2 and 3, in an embodiment of the present invention, a secure communication method of a digital track vehicle navigation controller based on CAN includes the following steps:
in order to meet the requirements of secure communication, protection is required for data repetition, data loss, data insertion, data disorder, data damage and data delay, a packet sequence number, a source address, a destination address, a check code of a data segment and a data transmission time stamp are required to be defined in a CAN communication protocol, but 8 bytes of an original CAN communication message are insufficient to accommodate so much content, so that a data message is unpacked at a transmitting end of a vehicle navigation controller, a receiving end of the vehicle navigation controller is subjected to packet splicing processing, and the data format is shown in table 1:
table 1. Data format table:
wherein 8 bits, 1-6 bits in the packet sequence number byte are used for circularly identifying the packet sequence number, and the value range of the packet sequence number is 0-63 cycles; 7-8 bits are used for representing the sub-packet sequence number, the value range is 0-3, and a complete data packet is composed of 4 sub-packets at most;
8 bits in the address sequence number byte, the low order 1-4 bits represent the source address, the value range is 0-15, the high order 5-8 bits identify the destination address, and the value range is 0-15;
the time stamp is in 3-6 bytes of the first packet, the value of the time stamp is a millisecond value from the current time to 0 minute 0 second 0 millisecond of the current time to the current day, and the receiving end considers the time cross-day condition from the transmitting end to the receiving end when receiving the time stamp; the sending end and the receiving end perform clock synchronization in real time;
the communication content check code adopts CRC32, and is based on address serial number, time stamp and effective field W 1 -W N And (5) generating data.
The data transmission flow of the transmitting end of the vehicle navigation controller comprises the following steps:
s11, generating a global packet sequence number, and circularly acquiring a transmission packet sequence number, wherein the value range of the packet sequence number is 0-63 cycles;
s12, reading the source address and the destination address information loaded by initialization, generating first packet address serial number information according to defined equipment numbers, wherein 1-4 bits are the source address, namely the equipment number of a transmitting end, and 5-8 bits are the destination address, namely the address number of a receiving end;
s13, acquiring a current time stamp, wherein the value is a millisecond value from the current time to 0 minute, 0 second and 0 millisecond of the current time, and the lower position is in front;
s14, packaging the effective field into each sub-packet, and setting bit7-8 of the first byte of each packet as a corresponding sub-packet sequence number to support 4 sub-packets at most;
s15, according to the address serial number, the time stamp and the effective field W in the communication content 1 -W N And generating CRC32 codes by the data, and sending CAN communication messages, wherein the CRC32 codes are positioned in byte 5-8 of the last subpacket, and the lower order is in front.
The data receiving flow of the receiving end of the vehicle navigation controller comprises the following steps:
s21, receiving a CAN communication message, and judging the type of the message attribution of the current message according to the message ID;
s22, analyzing the current message, judging whether the current message is received completely, and storing the current packet into a memory for temporary processing to form cache data if the current message is not received completely; if the message is received completely, analyzing the complete information, and combining the information according to the sub-packet sequence numbers to obtain a source address, a destination address, a time stamp, a CRC32 and effective message contents;
s23, judging whether the current message and the last message packet sequence number are continuous, if the current packet sequence number is 0, the last packet sequence number is 63; if the current packet sequence number is the previous packet of the previous packet sequence number, the data is disordered; repeating the data if the current packet sequence number is the same as the previous packet sequence number;
if the current packet sequence number is different from the incomplete packet sequence number in the cache data, the data packet data in the cache data is considered to be lost;
s24, judging that the source address or the destination address of the current packet is not matched with the configuration, and considering that the data is inserted;
s25, locally acquiring a time stamp, and considering data delay if the current local time stamp and the time stamp in the CAN communication message content are larger than 3 communication periods;
s26, calculating CRC32 according to the received information, comparing with CRC32 in the CAN communication message content, and if the calculated check codes are different, considering that the data is damaged, and ignoring the information;
s27, the receiving end of the vehicle navigation controller receives normal information, records error information and reports communication fault information.
In summary, the general CAN communication protocol cannot carry out safety protection on communication content, and after the safety communication method of the digital track vehicle navigation controller based on the CAN is used, the communication message content in the vehicle CAN network CAN be checked, abnormal information in communication CAN be identified, and the abnormality CAN be processed in time according to the error type, so that the safety of vehicle positioning and navigation control is improved; although the number of the messages is increased, the vehicle-mounted CAN communication baud rate is 500K, the minimum communication period is 20ms, the CAN communication load is still very low, and the influence of the increase of the messages on the CAN communication load CAN be ignored.
It will be appreciated by persons skilled in the art that the above embodiments are provided for illustration only and not for limitation of the invention, and that variations and modifications of the above described embodiments are intended to fall within the scope of the claims of the invention as long as they fall within the true spirit of the invention.

Claims (3)

1. The safe communication method of the digital track vehicle navigation controller based on the CAN is characterized by comprising the following steps of:
defining a packet sequence number, a source address, a target address, a check code of a data section and a data transmission time stamp in a CAN communication protocol, unpacking a data message by a transmitting end of a vehicle navigation controller, and splicing a packet by a receiving end of the vehicle navigation controller, wherein the data format is shown in Table 1:
table 1. Data format table:
wherein 8 bits, 1-6 bits in the packet sequence number byte are used for circularly identifying the packet sequence number, and the value range of the packet sequence number is 0-63 cycles; 7-8 bits are used for representing the sub-packet sequence number, the value range is 0-3, and a complete data packet is composed of 4 sub-packets at most;
8 bits in the address sequence number byte, the low order 1-4 bits represent the source address, the value range is 0-15, the high order 5-8 bits identify the destination address, and the value range is 0-15;
the time stamp is in 3-6 bytes of the first packet, the value of the time stamp is a millisecond value from the current time to 0 minute 0 second 0 millisecond of the current time to the current day, and the receiving end considers the time cross-day condition from the transmitting end to the receiving end when receiving the time stamp; the sending end and the receiving end perform clock synchronization in real time;
the communication content check code adopts CRC32, and is based on address serial number, time stamp and effective field W 1 -W N And (5) generating data.
2. The secure communication method of a CAN-based digital track car navigation controller according to claim 1, wherein the data transmission procedure of the transmitting end of the car navigation controller comprises the steps of:
s11, generating a global packet sequence number, and circularly acquiring a transmission packet sequence number, wherein the value range of the packet sequence number is 0-63 cycles;
s12, reading the source address and the destination address information loaded by initialization, generating first packet address serial number information according to defined equipment numbers, wherein 1-4 bits are the source address, namely the equipment number of a transmitting end, and 5-8 bits are the destination address, namely the address number of a receiving end;
s13, acquiring a current time stamp, wherein the value is a millisecond value from the current time to 0 minute, 0 second and 0 millisecond of the current time, and the lower position is in front;
s14, packaging the effective field into each sub-packet, and setting bit7-8 of the first byte of each packet as a corresponding sub-packet sequence number to support 4 sub-packets at most;
s15, according to the address serial number, the time stamp and the effective field W in the communication content 1 -W N And generating CRC32 codes by the data, and sending CAN communication messages, wherein the CRC32 codes are positioned in byte 5-8 of the last subpacket, and the lower order is in front.
3. The secure communication method of a CAN-based digital track car navigation controller according to claim 1, wherein the data receiving flow of the receiving end of the car navigation controller comprises the steps of:
s21, receiving a CAN communication message, and judging the type of the message attribution of the current message according to the message ID;
s22, analyzing the current message, judging whether the current message is received completely, and storing the current packet into a memory for temporary processing to form cache data if the current message is not received completely; if the message is received completely, analyzing the complete information, and combining the information according to the sub-packet sequence numbers to obtain a source address, a destination address, a time stamp, a CRC32 and effective message contents;
s23, judging whether the current message and the last message packet sequence number are continuous, if the current packet sequence number is 0, the last packet sequence number is 63; if the current packet sequence number is the previous packet of the previous packet sequence number, the data is disordered; repeating the data if the current packet sequence number is the same as the previous packet sequence number;
if the current packet sequence number is different from the incomplete packet sequence number in the cache data, the data packet data in the cache data is considered to be lost;
s24, judging that the source address or the destination address of the current packet is not matched with the configuration, and considering that the data is inserted;
s25, locally acquiring a time stamp, and considering data delay if the current local time stamp and the time stamp in the CAN communication message content are larger than 3 communication periods;
s26, calculating CRC32 according to the received information, comparing with CRC32 in the CAN communication message content, and if the calculated check codes are different, considering that the data is damaged, and ignoring the information;
s27, the receiving end of the vehicle navigation controller receives normal information, records error information and reports communication fault information.
CN202311440995.9A 2023-11-01 2023-11-01 Safety communication method of digital track vehicle-mounted navigation controller based on CAN Pending CN117528523A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311440995.9A CN117528523A (en) 2023-11-01 2023-11-01 Safety communication method of digital track vehicle-mounted navigation controller based on CAN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311440995.9A CN117528523A (en) 2023-11-01 2023-11-01 Safety communication method of digital track vehicle-mounted navigation controller based on CAN

Publications (1)

Publication Number Publication Date
CN117528523A true CN117528523A (en) 2024-02-06

Family

ID=89750482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311440995.9A Pending CN117528523A (en) 2023-11-01 2023-11-01 Safety communication method of digital track vehicle-mounted navigation controller based on CAN

Country Status (1)

Country Link
CN (1) CN117528523A (en)

Similar Documents

Publication Publication Date Title
US6799235B2 (en) Daisy chain latency reduction
CN100336331C (en) Methodology for detecting lost packets
US20180103108A1 (en) Method of transmitting and receiving data in vehicle network and apparatus for the same
US6965571B2 (en) Precise error reporting
US6167057A (en) Data communication system and electronic control unit used therein
WO2002035761A3 (en) Method for superimposing a sequence number in an error detection code (crc) in a data network
CN102238055B (en) Downloading method and system based on MDIO (Management Data Input/Output) interface
CN117528523A (en) Safety communication method of digital track vehicle-mounted navigation controller based on CAN
CN1119884C (en) Error detection method for high speed data transmission
US20050114749A1 (en) Using error checking bits to communicate an address or other bits
US20040228366A1 (en) Bus system and method and device for transmitting communications on a bus system
US20220303362A1 (en) Method for compressing can-bus data
CN114614877A (en) Satellite communication data packaging system based on TDM/TDMA system and packaging method thereof
CN102835127B (en) The sending, receiving method of OTN expense and device
US6393595B1 (en) Method of communication with improved acknowledgement of reception
CN114339765B (en) Differential protection data interactive chain type verification method and system based on 5G communication
CN113824626B (en) Communication management method for preventing information interaction loss
CN113938294B (en) 1bit response data transmission isolation device
CN117632578A (en) Method and system for checking serial communication bus data
CN100334541C (en) Method and apparatus for buffer storage of data packets which are to be transmitted via a connection that has been set up
CN1697417B (en) Signal transmission method and device based on RPR medium access control
CN114205261B (en) Automatic test method for correctness of network communication data and storage medium
CN113905333B (en) CSBK transmission method, device and intercom equipment
CN111083665B (en) Method and equipment for double-master control interactive communication
CN114422082B (en) Transmission control method, system, device and medium based on linear network coding

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