CN115833996B - Dual-chip communication data interaction method based on intelligent cockpit - Google Patents
Dual-chip communication data interaction method based on intelligent cockpit Download PDFInfo
- Publication number
- CN115833996B CN115833996B CN202211502569.9A CN202211502569A CN115833996B CN 115833996 B CN115833996 B CN 115833996B CN 202211502569 A CN202211502569 A CN 202211502569A CN 115833996 B CN115833996 B CN 115833996B
- Authority
- CN
- China
- Prior art keywords
- data
- message
- length
- check value
- offset
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000004891 communication Methods 0.000 title claims abstract description 20
- 230000003993 interaction Effects 0.000 title claims abstract description 20
- 230000005540 biological transmission Effects 0.000 claims abstract description 23
- 230000009977 dual effect Effects 0.000 claims description 9
- 230000008859 change Effects 0.000 claims description 6
- 238000012795 verification Methods 0.000 claims description 4
- 230000002159 abnormal effect Effects 0.000 claims description 3
- 238000001514 detection method Methods 0.000 claims description 3
- 238000000926 separation method Methods 0.000 claims 1
- 238000012937 correction Methods 0.000 abstract description 3
- 230000008569 process Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000005059 dormancy Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000013524 data verification Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Landscapes
- Communication Control (AREA)
Abstract
The invention discloses a double-chip communication data interaction method based on an intelligent cockpit, which comprises the following steps: combining the data interacted between the double chips to synthesize offset message data; when the length of the offset message data packet is greater than or equal to the length of the data packet to be transmitted, transmitting a common data packet to be transmitted, otherwise, transmitting the offset message data packet; correcting errors of the data, checking the content of the data and detecting the validity of the connection, and discarding the message data with unqualified checking and validity; the invention can establish effective connection between the double chips, realize the transmission of functional signals such as indicator lights, text alarm, driving information, fault codes, menu setting and the like, and reduce the occupation of transmission bandwidth and improve the transmission efficiency by combining and offset processing the data. Meanwhile, the method provides a certain error correction function, and ensures the stability and reliability of transmission.
Description
Technical Field
The invention relates to the technical field of intelligent cabins, in particular to a double-chip communication data interaction method based on an intelligent cabin.
Background
With the development of technology, the performance of the chip is gradually enhanced, and the automobile instrument and the central control are combined into an intelligent cockpit, and one chip is adopted to drive the instrument and the central control. However, high performance chips have superior computing power, but generally rely on an operating system, and real-time performance cannot be guaranteed. An auxiliary MCU chip is often needed to process dormancy awakening, CAN message receiving and transmitting and the like, quick response is needed, and high real-time performance is required. The MCU chip and the main chip are connected through UART, CAN bus and other modes, and a double-chip communication data interaction method is needed in order to enable data interaction of the two chips to be more reliable and efficient.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provides a dual-chip communication data interaction method based on an intelligent cockpit, which can quickly respond and stably interact.
The aim of the invention is realized by the following technical scheme:
A dual-chip communication data interaction method based on an intelligent cockpit comprises the following steps:
Data combination is carried out on the data interacted between the double chips, and the data are arranged and combined into a message; when the intelligent cockpit works, the information is retransmitted each time data change occurs, the transmitted information data is stored after each time information is transmitted, when the information is transmitted, the current transmitted data is compared with the previous data to obtain difference data, and the difference data is recombined into offset information data; when the length of the offset message data packet is more than or equal to the length of the data packet to be transmitted, transmitting a common data packet to be transmitted, otherwise, transmitting the offset message data packet; the offset message data packet is in the form of index plus data, the index is the signal of which number the data has changes in the message, the data is the data content corresponding to the changes, all the changed signals in the message are orderly arranged from front to back to obtain the final offset message data packet, the receiving end needs to store the last received data message, and when the offset message is received, the corresponding signal data value is replaced by the offset data according to the index; correcting errors of the data, checking the content of the data and detecting the validity of the connection, and discarding the message data with unqualified checking and validity; and transmitting the data with qualified validity between the double chips.
Further, the message includes a data header, a data type, a data length, a data packet, a check value, and a data separator, the message data adopts an ascii code format, the data length is used to identify the byte number of the data packet, the data length is converted, the length after actual conversion is 2 multiple data length, the check value is used to check the values except the check value itself and the data separator in the message, the CRC8 check analysis is adopted here, and the lengths of the information field and the check field can be arbitrarily selected. The data separator adopts control characters to distinguish other message data for the program to separate the data flow into data messages, and the other message data is expressed by English letters or Arabic numerals.
Further, the data content verification is to separate the data streams according to the data separator and convert the ascii data into 16-system data.
Further, checking the converted data for the data type, the data length, the data packet and the check value, acquiring the first byte data for the converted data for the data type, looking up the table according to the data type to acquire the correct data length, then acquiring the second byte data for the data length acquired by the message, wherein the acquired data length is equal to the data length acquired by looking up the table, discarding the message data if the lengths are not matched, and calculating the total length of the message if the lengths are matched.
Further, the data type, the data length and the check value length are 1 byte, the total length of the converted message data is equal to the data length+3, if the lengths are not matched, the message data is discarded, if the lengths are not matched, the check value is calculated, the last byte data is obtained as the check value obtained by the message, the MCU chip end is used as a transmitting end, the main chip end is used as a receiving end, if the check value calculated by the receiving end by itself is consistent with the check value sent by the transmitting end, the message data transmission is judged to be correct, if the check value calculated by the receiving end by itself is inconsistent with the check value sent by the transmitting end, the message data transmission error is judged, the message data is discarded, the bandwidth occupation of the data transmission is effectively reduced, and the functions of dormancy, CAN message receiving and the like which need quick response are processed in real time.
Further, each time the transmitting end transmits a message, the receiving end needs to reply a message if receiving is successful, so as to check the transmission accuracy between the two chips.
Further, the reply content of the receiving end further includes a corresponding type of the sending message, which is used for matching the sending message, when the sending end does not receive the feedback message of the receiving end in more than 5 sending periods, the sending end considers that the sending of the message fails, and the sending end needs to resend the message of the type.
Furthermore, the connection validity detection is to send heartbeat messages at regular time through the sending end, the type of the heartbeat messages is heartbeat, the data content is accumulated from 0, 1 is added to each time the heartbeat messages are sent, the overflow is accumulated again from 0, and when the double-chip communication is abnormal, if the receiving end cannot receive the heartbeat messages of the sending end, or the heartbeat message sending data is always unchanged, or the sending end cannot receive the reply of the receiving end, and after a certain time is reached, the error chip is reset.
Compared with the prior art, the invention has the following advantages:
The invention can establish effective connection between the double chips, realize the transmission of functional signals such as indicator lights, text alarm, driving information, fault codes, menu setting and the like, and reduce the occupation of transmission bandwidth and improve the transmission efficiency by combining and shifting data. Meanwhile, the method provides a certain error correction function, and ensures the stability and reliability of transmission.
Drawings
FIG. 1 is a flow chart of a dual chip communication data interaction method based on an intelligent cockpit;
FIG. 2 is a transmission flow chart;
FIG. 3 is a data verification flow diagram;
FIG. 4 is a message structure diagram;
Fig. 5 is a block diagram of an offset message packet.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The technical solutions of 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 apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It is noted that the terms "comprising," "including," and "having," and any variations thereof, in the description and claims of the invention and in the foregoing figures, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. In the claims, specification, and drawings of the present invention, relational terms such as "first" and "second", and the like are used solely to distinguish one entity/operation/object from another entity/operation/object without necessarily requiring or implying any actual such relationship or order between such entities/operations/objects.
As shown in fig. 1, the invention provides a dual-chip communication data interaction method based on an intelligent cockpit aiming at a full liquid crystal instrument, wherein data interaction between dual chips is combined, and the data are arranged and combined into a message; in the development process of an actual project, when the intelligent cockpit works normally, the data change is not very large, such as an indicator light, when the left and right steering indication is carried out, all the indicator light data do not need to be sent, and the changed data only occupy a small part of all the data, so that when the intelligent cockpit works, the information is resent after each data change, the sent information data need to be stored after each message sending, the current sent data is compared with the previous data to obtain difference data, and the difference data are recombined into offset information data, so that the transmission bandwidth is reduced, and the transmission efficiency is improved; as shown in fig. 2, the data stream separates the message and converts the message into 16-system data, checks whether the data check passes, if not, replies to the timeout to resend the data to the data stream, if so, generates a sending data packet, checks whether to pick up the type of message, if not, generates an offset message data packet according to the last sending data, and when the length of the offset message data packet is less than the length of the data packet to be sent, sends the offset message data packet; when the length of the offset message data packet is more than or equal to the length of the data packet to be transmitted, transmitting the common data packet to be transmitted; as shown in fig. 5, the offset message data packet is in the form of index plus data, the index is the signal of which number the signal has change in the message, the data is the data content corresponding to the change, all the changed signals in the message are orderly arranged from front to back to obtain the final offset message data packet, the receiving end needs to store the last received data message, and when the offset message is received, the corresponding signal data value is replaced by the offset data according to the index; correcting errors of the data, checking the content of the data and detecting the validity of the connection, and discarding the message data with unqualified checking and validity; and data with qualified verification and validity are transmitted between the double chips, efficient and stable data link is established between the double chips, the bandwidth occupation of data transmission is effectively reduced, and meanwhile, the data transmission device has certain error correction capability and ensures the interaction stability.
As shown in fig. 4, the message in this case includes a data header, a data type, a data length, a data packet, a check value, and a data separator, where the message data adopts an ascii code format, the data length is used to identify the byte number of the data packet, the data length is converted, the length after actual conversion is 2 times of the data length, the check value is used to check the values except the check value itself and the data separator in the message, and the lengths of the information field and the check field can be arbitrarily selected by adopting CRC8 check analysis. The data separator adopts control characters to distinguish other message data for the program to separate the data flow into data messages, and the other message data is expressed by English letters or Arabic numerals. For example, if one byte of data is "0x1A", the ascii code, 0x31,0x41, is transferred. The data type represents the type of the message, such as speed, rotating speed, indicator light, text alarm and the like, and in order to reduce the interactive data quantity, a special type of data offset message is also provided; the data content verification is to separate the data streams according to the data separator and convert the ascii data into 16-system data; checking the converted data for data type, data length, data packet and check value, as shown in fig. 3, obtaining the first byte data for the converted data for data type, checking an ascii code table according to the data type to obtain correct data length, then obtaining the second byte data for the data length obtained by the message, wherein the obtained data length is equal to the data length obtained by looking up the table, discarding the message data if the lengths are not matched, and calculating the total length of the message if the lengths are matched; the data type, the data length and the check value length are 1 byte, the total length of the converted message data is equal to the data length+3, if the lengths are not matched, the message data is discarded, if the lengths are not matched, the check value is calculated, the last byte data is the check value obtained by the message, the MCU chip end is used as a transmitting end, the main chip end is used as a receiving end, if the check value calculated by the receiving end by itself is consistent with the check value sent by the transmitting end, the message data transmission is judged to be correct, if the check value calculated by the receiving end by itself is inconsistent with the check value sent by the transmitting end, the message data transmission error is judged, the message data is discarded, the bandwidth occupation of the data transmission is effectively reduced, and the functions of dormancy wakeup, CAN message receiving and the like which need quick response are processed in real time.
In one embodiment, each time the sending end sends a message, the receiving end needs to reply a message if the receiving end receives the message successfully, so as to check the transmission accuracy between the two chips; the receiving end reply content also comprises a corresponding message type for matching the message to be sent, and when the sending end does not receive the feedback message of the receiving end in more than 5 sending periods, the message is considered to be failed to be sent, and the sending end needs to resend the message of the type; the connection validity detection is to send heartbeat messages at regular time through a sending end, the type of the heartbeat messages is heartbeat, the data content is accumulated from 0, 1 is added to each time the heartbeat messages are sent, the overflow is accumulated again from 0, and when the double-chip communication is abnormal, if the receiving end cannot receive the heartbeat messages of the sending end, or the heartbeat message sending data is always unchanged, or the sending end cannot receive the reply of the receiving end, the error chip is reset after a certain time is reached.
It should be noted that the various forms of flow shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present application may be performed in parallel or sequentially or in a different order, provided that the desired results of the disclosed embodiments are achieved, and are not limited herein. The above embodiments are merely preferred examples of the present invention and the technical principles applied, and any changes, modifications, substitutions, combinations, and simplifications made by those skilled in the art without departing from the spirit and principles of the present invention should be considered as equivalent substitutions within the scope of the present invention.
Claims (8)
1. The double-chip communication data interaction method based on the intelligent cockpit is characterized by comprising the following steps of:
data combination is carried out on the data interacted between the double chips, and the data are arranged and combined into a message;
When the intelligent cockpit works, the information is retransmitted each time data change occurs, the transmitted information data is stored after each time information is transmitted, when the information is transmitted, the current transmitted data is compared with the previous data to obtain difference data, and the difference data is recombined into offset information data;
When the length of the offset message data packet is more than or equal to the length of the data packet to be transmitted, transmitting a common data packet to be transmitted, otherwise, transmitting the offset message data packet;
The offset message data packet is in the form of index plus data, the index is the signal of which number the data has changes in the message, the data is the data content corresponding to the changes, all the changed signals in the message are orderly arranged from front to back to obtain the final offset message data packet, the receiving end needs to store the last received data message, and when the offset message is received, the corresponding signal data value is replaced by the offset data according to the index;
Correcting errors of the data, checking the content of the data and detecting the validity of the connection, and discarding the message data with unqualified checking and validity; and transmitting the data with qualified validity between the double chips.
2. The intelligent cockpit-based dual chip communication data interaction method according to claim 1, wherein the method comprises the following steps: the message comprises a data head, a data type, a data length, a data packet, a check value and a data separator, wherein the data length is used for identifying the byte number of the data packet, the data length is in an escape mode, the length after actual escape is 2 times of the data length, the check value is used for checking the values except the check value and the data separation in the message, and the data separator adopts control characters to distinguish the data of other messages, so that a program separates the data flow into data messages.
3. The intelligent cockpit-based dual chip communication data interaction method according to claim 2, wherein the method comprises the following steps: the data content verification is to separate the data streams according to the data separators and convert the ascii data into 16-system data.
4. The intelligent cockpit-based dual chip communication data interaction method according to claim 3, wherein the method comprises the following steps: and checking the data type, the data length, the data packet and the check value of the converted data, acquiring the first byte data of the converted data into the data type, looking up a table according to the data type to acquire the correct data length, then acquiring the second byte data into the data length acquired by the message, wherein the acquired data length is equal to the data length acquired by looking up the table, discarding the message data if the lengths are not matched, and calculating the total length of the message if the lengths are matched.
5. The intelligent cockpit-based dual chip communication data interaction method according to claim 4, wherein the method comprises the following steps: the data type, the data length and the check value length are 1 byte, the total length of the converted message data is equal to the data length+3, if the lengths are not matched, the message data is discarded, if the lengths are not matched, the check value is calculated, the last byte data is obtained as the check value obtained by the message, the MCU chip end is used as a transmitting end, the main chip end is used as a receiving end, if the check value calculated by the receiving end by itself is consistent with the check value sent by the transmitting end, the message data transmission is judged to be correct, and if the check value calculated by the receiving end by itself is inconsistent with the check value sent by the transmitting end, the message data transmission is judged to be wrong, and the message data is discarded.
6. The intelligent cockpit-based dual chip communication data interaction method according to claim 5, wherein the method comprises the following steps: when the sending end sends a message, the receiving end needs to reply a message if the receiving end receives the message successfully.
7. The intelligent cockpit-based dual chip communication data interaction method according to claim 6, wherein the method comprises the following steps: the reply content of the receiving end also comprises a corresponding message type for matching the message, and when the sending end does not receive the feedback message of the receiving end in more than 5 sending periods, the message is considered to be failed to be sent, and the sending end needs to resend the message of the type.
8. The intelligent cockpit-based dual chip communication data interaction method according to claim 7, wherein the method comprises the following steps: the connection validity detection is to send heartbeat messages at regular time through a sending end, the type of the heartbeat messages is heartbeat, the data content is accumulated from 0,1 is added to each time the heartbeat messages are sent, the overflow is accumulated again from 0, and when the double-chip communication is abnormal, if the receiving end cannot receive the heartbeat messages of the sending end, or the heartbeat message sending data is always unchanged, or the sending end cannot receive the reply of the receiving end, the error chip is reset after a certain time is reached.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211502569.9A CN115833996B (en) | 2022-11-28 | 2022-11-28 | Dual-chip communication data interaction method based on intelligent cockpit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211502569.9A CN115833996B (en) | 2022-11-28 | 2022-11-28 | Dual-chip communication data interaction method based on intelligent cockpit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115833996A CN115833996A (en) | 2023-03-21 |
| CN115833996B true CN115833996B (en) | 2024-09-20 |
Family
ID=85532226
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211502569.9A Active CN115833996B (en) | 2022-11-28 | 2022-11-28 | Dual-chip communication data interaction method based on intelligent cockpit |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115833996B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108989301A (en) * | 2018-07-03 | 2018-12-11 | 成都深思科技有限公司 | A kind of network flow data index method, equipment and storage medium indexed more |
| CN112073372A (en) * | 2020-08-04 | 2020-12-11 | 南京国电南自维美德自动化有限公司 | Double encryption method and decryption method for communication messages of power system and message interaction system |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5319679A (en) * | 1992-12-09 | 1994-06-07 | Datum Systems | Method and apparatus for recovering data from a radio signal |
| CN103209489B (en) * | 2012-01-17 | 2017-04-12 | 华为技术有限公司 | Data transmission method, base station and user equipment |
-
2022
- 2022-11-28 CN CN202211502569.9A patent/CN115833996B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108989301A (en) * | 2018-07-03 | 2018-12-11 | 成都深思科技有限公司 | A kind of network flow data index method, equipment and storage medium indexed more |
| CN112073372A (en) * | 2020-08-04 | 2020-12-11 | 南京国电南自维美德自动化有限公司 | Double encryption method and decryption method for communication messages of power system and message interaction system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115833996A (en) | 2023-03-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110704356A (en) | Universal serial port data analyzing method | |
| WO2018171641A1 (en) | Method and device for transmitting and receiving network management information, transmitting apparatus and receiving apparatus | |
| WO2019062537A1 (en) | Vehicle data transmission method and receiving method, and corresponding system | |
| CN109412756A (en) | A kind of double-link backup method, system and storage medium based on optical fiber 4KHDR ultra high-definition transmission of video | |
| CN110554929B (en) | Data verification method, device, computer equipment and storage medium | |
| CN115833996B (en) | Dual-chip communication data interaction method based on intelligent cockpit | |
| CN117544676B (en) | Multi-terminal operation and maintenance data interactive transmission method and system | |
| JP3199420B2 (en) | Asynchronous time division multiplexing cell transmission link control information transmission method | |
| US5664075A (en) | Print job identification and synchronization between NetWare PServer and atlas RPrinter protocol gateway | |
| CN112000728B (en) | Business data processing method, readable storage medium and computer equipment | |
| CN112527612B (en) | System log preservation method, device, vehicle system and vehicle | |
| CN116582826A (en) | Method, electronic device and storage medium for message transmission | |
| CN114979298A (en) | Interactive protocol and flow specification between double master controllers | |
| CN115914426A (en) | Data transmission method, device, equipment and storage medium | |
| CN116346192B (en) | Automatic monitoring method for situation information processor data transmission faults | |
| US6597704B1 (en) | System for translating a message from a first transmission protocol to a second transmission protocol | |
| CN120343018B (en) | Efficient data acquisition, transmission and processing method in complex closed environment | |
| CN112596999A (en) | Diagnostic fault testing method for automobile instrument | |
| CN118042024B (en) | Multi-protocol self-adaptive central control system | |
| CN103684689A (en) | Self-check data transmission method | |
| CN110990452A (en) | Big data segmentation contrast fault screening system | |
| CN120416077A (en) | Data processing system and method | |
| CN120089081B (en) | Detection circuit, input device, chip and detection method for polarity of auxiliary channel of display interface | |
| CN112311637B (en) | MVB line redundancy switching method and system and vehicle | |
| CN113315955A (en) | ARINC818-2 receiving port error processing device and method |
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 |