CN110213018A - Data communications method, device and the vehicle of vehicle bus - Google Patents

Data communications method, device and the vehicle of vehicle bus Download PDF

Info

Publication number
CN110213018A
CN110213018A CN201910384383.XA CN201910384383A CN110213018A CN 110213018 A CN110213018 A CN 110213018A CN 201910384383 A CN201910384383 A CN 201910384383A CN 110213018 A CN110213018 A CN 110213018A
Authority
CN
China
Prior art keywords
data
value
redundancy check
cyclic redundancy
check value
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
CN201910384383.XA
Other languages
Chinese (zh)
Other versions
CN110213018B (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.)
BAIC Motor Co Ltd
Original Assignee
BAIC Motor 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 BAIC Motor Co Ltd filed Critical BAIC Motor Co Ltd
Priority to CN201910384383.XA priority Critical patent/CN110213018B/en
Publication of CN110213018A publication Critical patent/CN110213018A/en
Application granted granted Critical
Publication of CN110213018B publication Critical patent/CN110213018B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L2001/0092Error control systems characterised by the topology of the transmission link
    • H04L2001/0094Bus
    • 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/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40241Flexray
    • 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

Abstract

The invention proposes a kind of data communications method of vehicle bus, device and vehicles, the data communications method includes: that transmitting terminal sends message, it include using data and control numeric field data in message, control domain data include packet counting value and/or transmitting terminal cyclic redundancy check value, packet counting value adds 1 before sending message, transmitting terminal cyclic redundancy check value is calculated according to application data and the pre-stored Data Identification value of transmitting terminal, and Data Identification value is used for unique identification message;Receiving end receives message, and the continuity of data communication is judged according to packet counting value, receiving end cyclic redundancy check value is calculated according to application data and the pre-stored Data Identification value in receiving end, the encryption and integrality of data communication are judged according to transmitting terminal cyclic redundancy check value and receiving end cyclic redundancy check value.Data communications method, device and the vehicle of vehicle bus of the invention, it is ensured that the continuity of data communication, integrality and encryption end to end.

Description

Data communications method, device and the vehicle of vehicle bus
Technical field
The present invention relates to field of communication technology more particularly to a kind of data communications methods of vehicle bus, device and vehicle.
Background technique
The transmitting terminal of vehicle-mounted electronic control unit (Electronic Control Unit, abbreviation ECU) and receiving end into In row information exchange process, since there are a variety of risk of error for the factors such as software, hardware and environment, by taking CAN bus communicates as an example, The mistake that may occur has message to be repeated, message loss, mistake address and postpone etc., not can guarantee data end to end Continuity, integrality and the encryption of communication.
Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.
For this purpose, the first purpose of this invention is to propose that a kind of data communications method of vehicle bus, transmitting terminal are sent It include using data and control numeric field data in the message of message, control domain data include packet counting value and/or transmitting terminal circulation Redundancy check value, receiving end judge the continuity of data communication according to packet counting value, preparatory according to application data and receiving end Receiving end cyclic redundancy check value is calculated in the Data Identification value of storage, according to transmitting terminal cyclic redundancy check value and receiving end Cyclic redundancy check value judges the encryption and integrality of data communication, it is ensured that the continuity of data communication, complete end to end Whole property and encryption.
Second object of the present invention is to propose a kind of data communication equipment of vehicle bus.
Third object of the present invention is to propose a kind of vehicle.
In order to achieve the above object, first aspect present invention embodiment proposes a kind of data communications method of vehicle bus, packet It includes:
Transmitting terminal sends message, includes using data and control numeric field data in the message, the control domain data include Packet counting value and/or transmitting terminal cyclic redundancy check value, the packet counting value add 1 before sending the message, the hair Sending end cyclic redundancy check value is calculated according to the application data and the pre-stored Data Identification value of the transmitting terminal, institute Data Identification value is stated for message described in unique identification;
Receiving end receives the message, and the continuity of data communication is judged according to the packet counting value, according to described Receiving end cyclic redundancy check value is calculated using the pre-stored Data Identification value of data and the receiving end, according to described Transmitting terminal cyclic redundancy check value and the receiving end cyclic redundancy check value judge the encryption and integrality of data communication.
The data communications method of the vehicle bus proposed according to embodiments of the present invention, transmitting terminal send message, wrap in message It includes using data and control numeric field data, control domain data include packet counting value and/or transmitting terminal cyclic redundancy check value, message Count value adds 1 before sending message, and transmitting terminal cyclic redundancy check value is according to using data and the pre-stored data of transmitting terminal Ident value is calculated, and Data Identification value is used for unique identification message;Receiving end receives message, and is judged according to packet counting value It is superfluous that receiving end circulation is calculated according to application data and the pre-stored Data Identification value in receiving end in the continuity of data communication Remaining check value, according to transmitting terminal cyclic redundancy check value and receiving end cyclic redundancy check value judge data communication encryption and Integrality, it is ensured that the continuity of data communication, integrality and encryption end to end.
According to one embodiment of present invention, the continuity that data communication is judged according to the packet counting value, packet It includes: calculating the packet counting value and the difference of the packet counting value of message that last time receives;If the difference is equal to 0, Judge that outgoing packet repeats to receive;If the difference is equal to 1, judge that outgoing packet is properly received according to normal sequence;If the difference Value is greater than 1 and is equal to or less than preset difference threshold, then judges message loss;If the difference is greater than the difference threshold It is serious then to judge that outgoing packet sends sequence error for value.
According to one embodiment of present invention, described to be followed according to the transmitting terminal cyclic redundancy check value and the receiving end Ring redundancy check value judges the encryption and integrality of data communication, comprising: if the transmitting terminal cyclic redundancy check value and institute It is identical to state receiving end cyclic redundancy check value, then judges data communication encryption and completeness check success.
According to one embodiment of present invention, the hair is calculated according to the application data and the Data Identification value Sending end cyclic redundancy check value or the receiving end cyclic redundancy check value, comprising: according to the application data and the data The transmitting terminal cyclic redundancy check value or receiving end circulation is calculated using CRC8-SAE1850 algorithm in ident value Redundancy check value.
According to one embodiment of present invention, the hair is calculated according to the application data and the Data Identification value Sending end cyclic redundancy check value or the receiving end cyclic redundancy check value, comprising: according to the Data Identification value and preset First circulation redundancy check value is calculated in initial value;The initial value is revised as the first circulation redundancy check value;According to institute It states and second circulation redundancy check value is calculated using data and the modified initial value;According to preset final exclusive or value pair The second circulation redundancy check value carries out exclusive or and negates processing, obtains the transmitting terminal cyclic redundancy check value or the reception Hold cyclic redundancy check value.
According to one embodiment of present invention, data communications method further include: if the application data length is greater than 1 Byte, then low byte data are preceding, and high byte data are rear;If the application data length is equal to or less than 1 byte, The application data are placed in 1 byte, and high position data, preceding, low data is rear.
According to one embodiment of present invention, data communications method further include: calculate transmitting terminal cyclic redundancy school When testing value or the receiving end cyclic redundancy check value, the position using null byte in data is uniformly filled with default Value.
According to one embodiment of present invention, the vehicle bus includes any one in following bus: control general ability Domain network C AN bus, FlexRay bus and Ethernet.
In order to achieve the above object, second aspect of the present invention embodiment proposes a kind of data communication equipment of vehicle bus, packet It includes:
Transmitting terminal includes using data and control numeric field data, the control numeric field data for sending message, in the message Including packet counting value and/or transmitting terminal cyclic redundancy check value, the packet counting value adds 1 before sending the message, institute Transmitting terminal cyclic redundancy check value is stated to be calculated according to the application data and the pre-stored Data Identification value of the transmitting terminal It arrives, the Data Identification value is for message described in unique identification;
Receiving end for receiving the message, and judges according to the packet counting value continuity of data communication, according to Receiving end cyclic redundancy check value is calculated in the pre-stored Data Identification value of the application data and the receiving end, according to The transmitting terminal cyclic redundancy check value and the receiving end cyclic redundancy check value judge the encryption of data communication and complete Property.
The data communication equipment of the vehicle bus proposed according to embodiments of the present invention, transmitting terminal send message, wrap in message It includes using data and control numeric field data, control domain data include packet counting value and/or transmitting terminal cyclic redundancy check value, message Count value adds 1 before sending message, and transmitting terminal cyclic redundancy check value is according to using data and the pre-stored data of transmitting terminal Ident value is calculated, and Data Identification value is used for unique identification message;Receiving end receives message, and is judged according to packet counting value It is superfluous that receiving end circulation is calculated according to application data and the pre-stored Data Identification value in receiving end in the continuity of data communication Remaining check value, according to transmitting terminal cyclic redundancy check value and receiving end cyclic redundancy check value judge data communication encryption and Integrality, it is ensured that the continuity of data communication, integrality and encryption end to end.
In order to achieve the above object, third aspect present invention embodiment proposes a kind of vehicle, comprising: such as second aspect of the present invention The data communication equipment of vehicle bus described in embodiment.
Detailed description of the invention
Fig. 1 is the flow chart of the data communications method of vehicle bus according to an embodiment of the invention;
Fig. 2 is to include using data and the message data format for controlling numeric field data;
Fig. 3 is the flow chart of the data communications method of vehicle bus in accordance with another embodiment of the present invention;
Fig. 4 is the flow chart of the data communications method of vehicle bus in accordance with another embodiment of the present invention;
Fig. 5 is the structure chart of the data communication equipment of vehicle bus according to an embodiment of the invention;
Fig. 6 is the structure chart of vehicle according to an embodiment of the invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
With reference to the accompanying drawing come describe the embodiment of the present invention vehicle bus data communications method, device and vehicle.
Fig. 1 is the flow chart of the data communications method of vehicle bus according to an embodiment of the invention, as shown in Figure 1, The data communications method includes:
S101, transmitting terminal send message, include using data and control numeric field data in message, control domain data include message Count value Counter and/or transmitting terminal cyclic redundancy check value CRC, packet counting value counter add 1 before sending message, hair Sending end cyclic redundancy check value CRC is calculated according to application data and the pre-stored Data Identification value DataID of transmitting terminal, Data Identification value DataID is used for unique identification message.
In the embodiment of the present invention, Data Identification value DataID, Data Identification value can locally be stored in advance in transmitting terminal DataID is used for unique identification message, and length can be 8 (bit).Transmitting terminal send message, message data format as shown in Fig. 2, Including application data and control numeric field data, using the i.e. pre- protection data of data, control domain data include packet counting value Counter And/or transmitting terminal cyclic redundancy check value CRC, wherein the length of packet counting value Counter can be 4bit, range be 0~ 15, transmitting terminal cyclic redundancy check value CRC can be counted according to application data and the pre-stored Data Identification value DataID of transmitting terminal It obtains.For transmitting terminal before sending message, packet counting value Counter adds 1.
S102, receiving end receive message, and the continuity of data communication is judged according to packet counting value Counter, according to Receiving end cyclic redundancy check value CRC1, root is calculated using data and the pre-stored Data Identification value DataID in receiving end The encryption of data communication and complete is judged according to transmitting terminal cyclic redundancy check value CRC and receiving end cyclic redundancy check value CRC1 Property.
In the embodiment of the present invention, Data Identification value DataID, Data Identification value can be stored in advance in receiving end DataID is used for unique identification message, and length can be 8bit.Receiving end receives message, and is sentenced according to packet counting value Counter Reception is calculated according to application data and the pre-stored Data Identification value DataID in receiving end in the continuity of disconnected data communication Cyclic redundancy check value CRC1 is held, is sentenced according to transmitting terminal cyclic redundancy check value CRC and receiving end cyclic redundancy check value CRC1 The encryption and integrality of disconnected data communication.
As a kind of feasible embodiment, the vehicle bus of the embodiment of the present invention may include controller local area network CAN Any one in bus, FlexRay bus and Ethernet can be followed by modification transmitting terminal cyclic redundancy check value or receiving end The digit of the calculation method of ring redundancy check value, packet counting value Counter and Data Identification value DataID is realized different vehicle-mounted The matching of bus.
The data communications method of the vehicle bus proposed according to embodiments of the present invention, transmitting terminal send message, wrap in message It includes using data and control numeric field data, control domain data include packet counting value and/or transmitting terminal cyclic redundancy check value, message Count value adds 1 before sending message, and transmitting terminal cyclic redundancy check value is according to using data and the pre-stored data of transmitting terminal Ident value is calculated, and Data Identification value is used for unique identification message;Receiving end receives message, and is judged according to packet counting value It is superfluous that receiving end circulation is calculated according to application data and the pre-stored Data Identification value in receiving end in the continuity of data communication Remaining check value, according to transmitting terminal cyclic redundancy check value and receiving end cyclic redundancy check value judge data communication encryption and Integrality, it is ensured that the continuity of data communication, integrality and encryption end to end.
Further, as shown in figure 3, Fig. 3 is the data communication side of vehicle bus in accordance with another embodiment of the present invention The flow chart of method, " continuity that data communication is judged according to packet counting value " can specifically wrap in above-described embodiment S102 step It includes:
The difference of the packet counting value Counter0 for the message that S201, calculating packet counting value Counter and last time receive It is worth Δ Counter.
In the embodiment of the present invention, the packet counting value for the message that packet counting value Counter and last time receive is calculated The difference DELTA Counter=Counter-Counter0 of Counter0.
S202 judges that outgoing packet repeats to receive if difference DELTA Counter is equal to 0.
In the embodiment of the present invention, if Δ Counter=0, message that packet counting value Counter and last time receive Packet counting value Counter0 is identical, judges that outgoing packet repeats to receive.
S203 judges that outgoing packet is properly received according to normal sequence if difference DELTA Counter is equal to 1.
In the embodiment of the present invention, if Δ Counter=1, this reception message of receiving end and last time reception message are continuous, Judge that outgoing packet is properly received according to normal sequence.
S204, if difference DELTA Counter is greater than 1 and is equal to or less than preset difference threshold Max Δ Counter, Judge message loss.
In the embodiment of the present invention, difference threshold Max Δ Counter, Max Δ Counter, which can be preset, to be sent out for message Send sequence error serious critical value.If 1 < Δ Counter < Max Δ Counter, judges message loss.
S205 judges that outgoing packet sends sequence error if difference DELTA Counter is greater than difference threshold Max Δ Counter Seriously.
In the embodiment of the present invention, if Δ Counter > Max Δ Counter, it is tight to judge that outgoing packet sends sequence error Weight.
The data communications method of the vehicle bus proposed according to embodiments of the present invention is received according to packet counting value and last time The difference of the packet counting value of the message arrived can determine whether message is continuous.
Further, " according to transmitting terminal cyclic redundancy check value CRC and receiving end in embodiment illustrated in fig. 1 S102 step Cyclic redundancy check value CRC1 judges the encryption and integrality of data communication " it is specific can include:
If transmitting terminal cyclic redundancy check value CRC is identical with receiving end cyclic redundancy check value CRC1, data are judged Communication encryption and completeness check success.
In the embodiment of the present invention, only transmitting terminal and receiving end are directed to certain message Data Identification having the same DataID could calculate identical cyclic redundancy check value to same message data.If transmitting terminal cyclic redundancy check Value CRC is identical with receiving end cyclic redundancy check value CRC1, then judges data communication encryption and completeness check success;Such as Fruit transmitting terminal cyclic redundancy check value CRC and receiving end cyclic redundancy check value CRC1 is different, then judges that data communication encrypts Property and completeness check are unsuccessful.
The data communications method of the vehicle bus proposed according to embodiments of the present invention, by comparing transmitting terminal cyclic redundancy school Test value and whether receiving end cyclic redundancy check value identical, can determine whether data communication whether encryption and completeness check success.
Further, in embodiment illustrated in fig. 1, " transmitting terminal circulation is calculated according to application data and data ident value Redundancy check value or receiving end cyclic redundancy check value " is specific can include:
Transmitting terminal is calculated and follows using CRC8-SAE1850 algorithm according to application data and data ident value DataID Ring redundancy check value CRC or receiving end cyclic redundancy check value CRC1.
In the embodiment of the present invention, according to data and data ident value DataID is applied, using CRC8-SAE1850 algorithm, meter Calculation obtains transmitting terminal cyclic redundancy check value CRC or receiving end cyclic redundancy check value CRC1, to guarantee transmitting terminal and receiving end For the operational consistency of communication data, it can be uniformly filled with preset value using the position of null byte in data, preset value is specific It can be 0xFF.
Specifically, calculation method can be as shown in Figure 4, comprising:
First circulation redundancy check value is calculated according to Data Identification value DataID and preset initial value in S301.
In the embodiment of the present invention, first circulation redundancy school is calculated according to Data Identification value DataID and preset initial value Test value, wherein preset initial value concretely 0xFF.
Initial value is revised as first circulation redundancy check value by S302.
In the embodiment of the present invention, initial value is revised as the first circulation redundancy check value that S301 step is calculated.
Second circulation redundancy check value is calculated according to application data and modified initial value in S303.
In the embodiment of the present invention, according to data and the modified initial value of S302 step is applied, it is superfluous that second circulation is calculated Remaining check value.
S304 carries out exclusive or to second circulation redundancy check value according to preset final exclusive or value and negates processing, sent out Sending end cyclic redundancy check value CRC or receiving end cyclic redundancy check value CRC1.
In the embodiment of the present invention, exclusive or is carried out to second circulation redundancy check value according to preset final exclusive or value and negates place Reason, obtains transmitting terminal cyclic redundancy check value CRC or receiving end cyclic redundancy check value CRC1, wherein preset final exclusive or It is worth concretely 0xFF.
In the embodiment of the present invention, the prototype of the CRC interface function of the use of cyclic redundancy check value is calculated are as follows:
Crc_CalculateCRC8(
const uint8*DataPtr,
uint32 Length,
uint8 StartValue8,
booleanIsFirstCall);
It should be noted that the embodiment of the present invention twice CRC function calling (i.e. calculating first circulation redundancy check value and Second circulation redundancy check value), passing ginseng for IsFirstCall parameter is FALSE, i.e., to actually incoming inside CRC function Initial value has done exclusive or and has negated, for example, actually incoming initial value is 0xFF when calculating the crc value of DataID, and in CRC function Before portion's cycle calculations, initial value 0xFF^0xFF=0x00.
The data communications method of the vehicle bus proposed according to embodiments of the present invention, according to using data and data ident value DataID, using CRC8-SAE1850 algorithm, can be accurate and effective transmitting terminal cyclic redundancy check value CRC be calculated or connect Receiving end cyclic redundancy check value CRC1.
Further, the operational consistency for guarantee transmitting terminal and receiving end for communication data, embodiment shown in Fig. 1 On the basis of, this method may also include that
If being greater than 1 byte using data length, low byte data are preceding, and high byte data are rear;If using data Length is equal to or less than 1 byte, then will be placed in 1 byte using data, and high position data, preceding, low data exists Afterwards.
In the embodiment of the present invention, the length for applying data is obtained first, if being greater than 1 byte using data length, For low byte data preceding, high byte data use Intel format rear;If being equal to or less than 1 word using data length Section will be then placed in 1 byte using data, and high position data is preceding, low data uses most significant bit rear (Most Significant Bit, abbreviation MSB) arrangement.
The data communications method of the vehicle bus proposed according to embodiments of the present invention, according to application data length to data into Row arrangement, it is ensured that the operational consistency of transmitting terminal and receiving end for communication data.
Fig. 5 is the structure chart of the data communication equipment of vehicle bus according to an embodiment of the invention, as shown in figure 5, The data communication equipment includes:
Transmitting terminal 21 includes using data and control numeric field data for sending message, in message, and control domain data include report Literary count value and/or transmitting terminal cyclic redundancy check value, packet counting value add 1 before sending message, transmitting terminal cyclic redundancy school It tests value to be calculated according to application data and the pre-stored Data Identification value of transmitting terminal, Data Identification value is used for unique identification report Text;
Receiving end 22 for receiving message, and judges according to packet counting value the continuity of data communication, according to applying number Receiving end cyclic redundancy check value is calculated according to the pre-stored Data Identification value in receiving end, according to transmitting terminal cyclic redundancy Check value and receiving end cyclic redundancy check value judge the encryption and integrality of data communication.
It should be noted that the explanation of the aforementioned data communications method to vehicle bus is also applied for the embodiment The data communication equipment of vehicle bus, details are not described herein again.
The data communication equipment of the vehicle bus proposed according to embodiments of the present invention, transmitting terminal send message, wrap in message It includes using data and control numeric field data, control domain data include packet counting value and/or transmitting terminal cyclic redundancy check value, message Count value adds 1 before sending message, and transmitting terminal cyclic redundancy check value is according to using data and the pre-stored data of transmitting terminal Ident value is calculated, and Data Identification value is used for unique identification message;Receiving end receives message, and is judged according to packet counting value It is superfluous that receiving end circulation is calculated according to application data and the pre-stored Data Identification value in receiving end in the continuity of data communication Remaining check value, according to transmitting terminal cyclic redundancy check value and receiving end cyclic redundancy check value judge data communication encryption and Integrality, it is ensured that the continuity of data communication, integrality and encryption end to end.
To realize above-described embodiment, the invention also provides a kind of vehicles 30, as shown in Figure 6, comprising: as above state embodiment Shown in vehicle bus data communication equipment 31.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any It can be combined in any suitable manner in a or multiple embodiment or examples.In addition, without conflicting with each other, the technology of this field The feature of different embodiments or examples described in this specification and different embodiments or examples can be combined by personnel And combination.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned Embodiment is changed, modifies, replacement and variant.

Claims (10)

1. a kind of data communications method of vehicle bus characterized by comprising
Transmitting terminal sends message, includes using data and control numeric field data in the message, the control domain data include message Count value and/or transmitting terminal cyclic redundancy check value, the packet counting value add 1 before sending the message, the transmitting terminal Cyclic redundancy check value is calculated according to the application data and the pre-stored Data Identification value of the transmitting terminal, the number According to ident value for message described in unique identification;
Receiving end receives the message, and the continuity of data communication is judged according to the packet counting value, according to the application Receiving end cyclic redundancy check value is calculated in the pre-stored Data Identification value of data and the receiving end, according to the transmission End cyclic redundancy check value and the receiving end cyclic redundancy check value judge the encryption and integrality of data communication.
2. data communications method according to claim 1, which is characterized in that described to judge number according to the packet counting value According to the continuity of communication, comprising:
Calculate the packet counting value and the difference of the packet counting value of message that last time receives;
If the difference is equal to 0, judge that outgoing packet repeats to receive;
If the difference is equal to 1, judge that outgoing packet is properly received according to normal sequence;
If the difference is greater than 1 and is equal to or less than preset difference threshold, message loss is judged;
If the difference is greater than the difference threshold, it is serious to judge that outgoing packet sends sequence error.
3. data communications method according to claim 1, which is characterized in that described according to transmitting terminal cyclic redundancy school It tests value and the receiving end cyclic redundancy check value judges the encryption and integrality of data communication, comprising:
If the transmitting terminal cyclic redundancy check value is identical with the receiving end cyclic redundancy check value, data communication is judged Encryption and completeness check success.
4. data communications method according to claim 1, which is characterized in that according to the application data and the data mark The transmitting terminal cyclic redundancy check value or the receiving end cyclic redundancy check value is calculated in knowledge value, comprising:
The transmitting terminal is calculated using CRC8-SAE1850 algorithm according to the application data and the Data Identification value Cyclic redundancy check value or the receiving end cyclic redundancy check value.
5. data communications method according to claim 4, which is characterized in that according to the application data and the data mark The transmitting terminal cyclic redundancy check value or the receiving end cyclic redundancy check value is calculated in knowledge value, comprising:
First circulation redundancy check value is calculated according to the Data Identification value and preset initial value;
The initial value is revised as the first circulation redundancy check value;
Second circulation redundancy check value is calculated according to the application data and the modified initial value;
Exclusive or is carried out to the second circulation redundancy check value according to preset final exclusive or value and negates processing, obtains the transmission Hold cyclic redundancy check value or the receiving end cyclic redundancy check value.
6. data communications method according to claim 1, which is characterized in that further include:
If the application data length is greater than 1 byte, low byte data are preceding, and high byte data are rear;
If the application data length is equal to or less than 1 byte, the application data are placed in 1 byte, and High position data is preceding, and low data is rear.
7. data communications method according to claim 1, which is characterized in that further include:
It, will be in the application data when calculating the transmitting terminal cyclic redundancy check value or the receiving end cyclic redundancy check value The position of null byte is uniformly filled with preset value.
8. data communications method according to claim 1, which is characterized in that the vehicle bus includes in following bus Any one:
Controller local area network's CAN bus, FlexRay bus and Ethernet.
9. a kind of data communication equipment of vehicle bus characterized by comprising
Transmitting terminal includes using data and control numeric field data for sending message, in the message, and the control domain data include Packet counting value and/or transmitting terminal cyclic redundancy check value, the packet counting value add 1 before sending the message, the hair Sending end cyclic redundancy check value is calculated according to the application data and the pre-stored Data Identification value of the transmitting terminal, institute Data Identification value is stated for message described in unique identification;
Receiving end for receiving the message, and judges according to the packet counting value continuity of data communication, according to described Receiving end cyclic redundancy check value is calculated using the pre-stored Data Identification value of data and the receiving end, according to described Transmitting terminal cyclic redundancy check value and the receiving end cyclic redundancy check value judge the encryption and integrality of data communication.
10. a kind of vehicle characterized by comprising the data communication equipment of vehicle bus as claimed in claim 9.
CN201910384383.XA 2019-05-09 2019-05-09 Data communication method and device of vehicle-mounted bus and vehicle Active CN110213018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910384383.XA CN110213018B (en) 2019-05-09 2019-05-09 Data communication method and device of vehicle-mounted bus and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910384383.XA CN110213018B (en) 2019-05-09 2019-05-09 Data communication method and device of vehicle-mounted bus and vehicle

Publications (2)

Publication Number Publication Date
CN110213018A true CN110213018A (en) 2019-09-06
CN110213018B CN110213018B (en) 2022-07-15

Family

ID=67785636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910384383.XA Active CN110213018B (en) 2019-05-09 2019-05-09 Data communication method and device of vehicle-mounted bus and vehicle

Country Status (1)

Country Link
CN (1) CN110213018B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865901A (en) * 2020-06-03 2020-10-30 一汽奔腾轿车有限公司 Information encryption transmission method based on CAN bus
CN112947371A (en) * 2021-02-05 2021-06-11 北京经纬恒润科技股份有限公司 Simulation test method and device for test message and simulation test equipment
CN113064047A (en) * 2021-03-05 2021-07-02 万向一二三股份公司 Testing device and testing method for end-to-end protection between electronic control units
CN114448565A (en) * 2021-12-30 2022-05-06 北京奕斯伟计算技术有限公司 Cyclic redundancy check calculation method and device, electronic equipment and storage medium
CN114928465A (en) * 2022-03-22 2022-08-19 广州汽车集团股份有限公司 Message checking method and device, vehicle and storage medium
CN115410285A (en) * 2022-07-15 2022-11-29 广西添亿友科技有限公司 Vehicle entering and exiting high-speed processing method, high-speed terminal and cloud server

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1022879A1 (en) * 1993-02-15 2000-07-26 Honda Giken Kogyo Kabushiki Kaisha Data transmission method and system therefor
CN103514128A (en) * 2012-06-15 2014-01-15 广州汽车集团股份有限公司 Method and device for bus signal transmission and receiving
CN103856288A (en) * 2012-12-04 2014-06-11 北汽福田汽车股份有限公司 CAN communication signal verification and transmission method and system for automobile
CN104954374A (en) * 2015-06-15 2015-09-30 上海网车科技有限公司 IOV (Internet of Vehicles) communication protocol design method
CN105721268A (en) * 2016-01-29 2016-06-29 北京汽车研究总院有限公司 Method and device for sending controller area network (CAN) bus message
CN108011708A (en) * 2016-10-28 2018-05-08 长城汽车股份有限公司 The controller and vehicle of message encryption method, vehicle based on automobile bus
CN108494725A (en) * 2018-01-30 2018-09-04 惠州市德赛西威汽车电子股份有限公司 A kind of encryption communication method of vehicle-mounted CAN bus message
CN109274636A (en) * 2017-07-18 2019-01-25 比亚迪股份有限公司 Data safe transmission method and its device, system, train

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1022879A1 (en) * 1993-02-15 2000-07-26 Honda Giken Kogyo Kabushiki Kaisha Data transmission method and system therefor
CN103514128A (en) * 2012-06-15 2014-01-15 广州汽车集团股份有限公司 Method and device for bus signal transmission and receiving
CN103856288A (en) * 2012-12-04 2014-06-11 北汽福田汽车股份有限公司 CAN communication signal verification and transmission method and system for automobile
CN104954374A (en) * 2015-06-15 2015-09-30 上海网车科技有限公司 IOV (Internet of Vehicles) communication protocol design method
CN105721268A (en) * 2016-01-29 2016-06-29 北京汽车研究总院有限公司 Method and device for sending controller area network (CAN) bus message
CN108011708A (en) * 2016-10-28 2018-05-08 长城汽车股份有限公司 The controller and vehicle of message encryption method, vehicle based on automobile bus
CN109274636A (en) * 2017-07-18 2019-01-25 比亚迪股份有限公司 Data safe transmission method and its device, system, train
CN108494725A (en) * 2018-01-30 2018-09-04 惠州市德赛西威汽车电子股份有限公司 A kind of encryption communication method of vehicle-mounted CAN bus message

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865901A (en) * 2020-06-03 2020-10-30 一汽奔腾轿车有限公司 Information encryption transmission method based on CAN bus
CN112947371A (en) * 2021-02-05 2021-06-11 北京经纬恒润科技股份有限公司 Simulation test method and device for test message and simulation test equipment
CN112947371B (en) * 2021-02-05 2022-08-19 北京经纬恒润科技股份有限公司 Simulation test method and device for test message and simulation test equipment
CN113064047A (en) * 2021-03-05 2021-07-02 万向一二三股份公司 Testing device and testing method for end-to-end protection between electronic control units
CN113064047B (en) * 2021-03-05 2024-03-08 万向一二三股份公司 Testing device and testing method for end-to-end protection between electronic control units
CN114448565A (en) * 2021-12-30 2022-05-06 北京奕斯伟计算技术有限公司 Cyclic redundancy check calculation method and device, electronic equipment and storage medium
CN114928465A (en) * 2022-03-22 2022-08-19 广州汽车集团股份有限公司 Message checking method and device, vehicle and storage medium
CN114928465B (en) * 2022-03-22 2023-08-29 广州汽车集团股份有限公司 Message verification method, device, vehicle and storage medium
CN115410285A (en) * 2022-07-15 2022-11-29 广西添亿友科技有限公司 Vehicle entering and exiting high-speed processing method, high-speed terminal and cloud server

Also Published As

Publication number Publication date
CN110213018B (en) 2022-07-15

Similar Documents

Publication Publication Date Title
CN110213018A (en) Data communications method, device and the vehicle of vehicle bus
EP3522448A1 (en) Error code detection method, device and system and computer-readable storage medium
CN110545257B (en) Automobile CAN bus encryption method
US20170262400A1 (en) Method for Serially Transmitting a Frame from a Transmitter to at Least One Receiver and Participants of a Bus System via a Bus System
EP2454864B1 (en) Prevention of masquerade by using identification sequences
CN114144997B (en) Error detection test device for subscriber stations of a serial bus system and method for detecting a mechanism for error detection in a communication in a serial bus system
EP3772839B1 (en) Security module for a serial communications device
US11888866B2 (en) Security module for a CAN node
US11729021B2 (en) User station for a serial bus system and method for communication in a serial bus system
CN105471648A (en) Zigbee network system and standby assistance method therefor
CN110380842B (en) CAN bus message signature method, device and system suitable for intelligent network-connected automobile
Wu et al. Security protocol for controller area network using ECANDC compression algorithm
US9045095B2 (en) Security for a wireless ECU vehicle system
CN101420770A (en) Fault connection processing method and system in wireless transmission
CN108055172A (en) A kind of bidirectional forwarding detection (BFD) method and device
CN107426251A (en) Terminal security detection method and device
CN110557446A (en) communication method and system adapted by ATT and data segmentation and recombination
US7590124B2 (en) Encapsulation technique
US20040228366A1 (en) Bus system and method and device for transmitting communications on a bus system
US20180034851A1 (en) Electronic control apparatus
CN110995612B (en) Message processing method, system and communication equipment
CN111082957B (en) Port configuration detection method, terminal and computer-readable storage medium
CN104836659A (en) Control method of Bluetooth communication interaction
CN106471785A (en) A kind of virtual carrier sensing method and device
CN107078856B (en) Radio control system and method for monitoring radio link errors

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