Data communication method and system between double processors
By building multiple data transmission channels in a dual-processor system and selecting appropriate channels for transmission based on the importance and real-time data communication is solved, and the transmission stability of important data is improved.
Patent Information
- Application Number
- CN202311744668.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-06-24
AI Technical Summary
In systems using dual processors, the bandwidth and stability of data communication between processors are difficult to meet the needs of big data analysis, especially when important data and non-important data are transmitted in the same channel, resulting in insufficient processing between the sender and the receiver.
Build at least two data transmission channels, and set the real-timeness and importance according to the type of data, and select the corresponding channel for data transmission. Highly important data is used for bidirectional communication using channel 1, and lowly important and high real-time data is used for unidirectional transmission using channel 2.
By separating the transmission channels of important data and non-important data, the bandwidth usage and transmission delay of important data are avoided, and the stability of important data transmission is improved.
Smart Images

Figure CN120196584A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and particularly to a method and system for data communication between two processors. Background Art
[0002] In order to meet the requirements of big data analysis, vehicle driving recorders and TBOXs not only need to collect information that meets the standard functions of their own terminals, but some vehicle manufacturers or management systems also require real-time collection of all CAN information and other sensing information on the vehicle. For a system using two processors (a co-processor MCU and a main processor MPU), the communication bandwidth and stability requirements between the processors are becoming increasingly strict, and a method for ensuring stable and effective data transmission needs to be studied.
[0003] Currently, in system design on the market, a high-bandwidth data channel is used for communication, such as spi or a high-speed serial port, and an effective data communication protocol is formulated for data encapsulation and transmission. However, despite this, when the data volume is large and important data and unimportant data are transmitted in the same channel, it will still cause insufficient timely processing by both the sender and the receiver. Summary of the Invention
[0004] In order to solve the above problems, the present invention proposes a method and system for data communication between two processors.
[0005] The specific solutions are as follows:
[0006] A method for data communication between two processors includes the following steps:
[0007] Construct at least two data transmission channels between a first processor and a second processor;
[0008] When receiving data to be transmitted, set the real-time nature and importance of the data according to the type of the data;
[0009] Select a corresponding data transmission channel for data transmission according to the real-time nature and importance of the data.
[0010] Further, there are two data transmission channels, namely Channel 1 and Channel 2. Among them, Channel 1 is set to be capable of two-way communication and has an ACK response mechanism and a retransmission mechanism, and Channel 2 is set to only send data, and the link validity monitoring of Channel 2 is notified by Channel 1.
[0011] Further, it is set that when selecting a data transmission channel, the priority of importance is higher than the priority of real-time nature.
[0012] Further, it is set that data with high importance is transmitted using Channel 1.
[0013] Further, it is set that data with low importance is transmitted through a high - level selected number of transmission channels according to its real - time nature.
[0014] Further, it is set that data with low importance and high real - time nature uses Channel 2 for data transmission.
[0015] Further, it is set that data with low importance and low real - time nature is transmitted through either Channel 1 or Channel 2.
[0016] Further, the types of data transmission channels include serial ports and SPI interfaces.
[0017] A data communication system between two processors includes a first processor and a second processor, and the system implements the method described above in the embodiments of the present invention.
[0018] By adopting the above - mentioned technical solution, the present invention realizes that a large amount of periodic data or unimportant data is unidirectionally transmitted through a separate channel without being mixed with real - time important data and occupying bandwidth, thereby improving the stability of important data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 The flowchart of the method in Embodiment 1 of the present invention is shown.
[0020] Figure 2 The schematic diagram of the data transmission channel in Embodiment 1 of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] To further illustrate each embodiment, the present invention provides drawings. These drawings are part of the disclosure of the present invention, mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, those of ordinary skill in the art should be able to understand other possible implementation manners and the advantages of the present invention.
[0022] The present invention will be further described below in conjunction with the drawings and specific embodiments.
[0023] Embodiment 1:
[0024] The embodiment of the present invention provides a data communication method between two processors, as Figure 1 shown, the method includes the following steps:
[0025] S1: Construct at least two data transmission channels between a first processor (such as the main processor for processing data) and a second processor (such as the coprocessor for real - time data acquisition).
[0026] S2: When receiving data to be transmitted, set the real - time nature and importance of the data according to the type of the data.
[0027] S3: Select a corresponding data transmission channel according to the real-time nature and importance of the data for data transmission.
[0028] The types of data transmission channels can be existing common interfaces, such as serial ports (UART) and SPI interfaces. The types of all data transmission channels can be the same or different, such as multiple serial ports, multiple SPI, or UART + SPI, etc.
[0029] In this embodiment, in order to obtain accurate real-time nature and importance, it is necessary to strictly classify the data. The data types set in this embodiment mainly include: external periodic data, external data change data, internal service protocol data, CAN data, GPS data, sensing data, etc.
[0030] The real-time nature and importance corresponding to each data type need to be set in advance. When receiving data to be transmitted, the corresponding real-time nature and importance are found based on this setting.
[0031] For example, OTA data in internal service protocol data and vehicle key jump data in external data change data are all set as data with high real-time nature and high importance. GPS data and sensing data, etc. are all set as data with high real-time nature and low importance.
[0032] Such as Figure 2 As shown, in this embodiment, two data transmission channels are set, namely Channel 1 and Channel 2. Among them, Channel 1 is set to be able to conduct two-way communication (up and down) and has an ACK response mechanism and a retransmission mechanism; Channel 2 is set to only send data (upward), and the link validity monitoring of Channel 2 is notified by Channel 1 so that Channel 2 can perform abnormal management and recovery in a timely manner.
[0033] The ACK response mechanism is a common communication protocol, which is used to confirm that the receiving party has correctly received the data sent by the sending party. In network communication, the ACK response mechanism is very important. It can ensure the reliable transmission of data and avoid the occurrence of data loss or repeated transmission. The retransmission mechanism refers to whether the device will retransmit the data packet according to its own verification clock when the ACK times out during the process of the wireless device verifying the clock. Whether this retransmission has a great impact on the performance of the base station when the number of users carried by the base station reaches a certain amount.
[0034] The way for Channel 1 to monitor the link validity of Channel 2 can be that when data is transmitted by Channel 2 at the sender, if the data receiver does not receive the data for a long time, a notification of not receiving the data is sent to Channel 1 of the sender, and Channel 1 transmits this notification to the sender. After receiving the notification, the sender performs corresponding abnormal management and recovery on Channel 2.
[0035] In this embodiment, when selecting a data transmission channel, the priority of importance is higher than the priority of real-time performance.
[0036] Since Channel 1 has a bidirectional communication, ACK response mechanism, and retransmission mechanism, it ensures the stable transmission of important data. Therefore, in this embodiment, it is preferably set that data with high importance uses Channel 1 for data transmission, and data with low importance selects a transmission channel according to its real-time performance level.
[0037] Since Channel 2 can only send data, the data transmission efficiency is relatively high. Therefore, in this embodiment, it is preferably set that data with low importance and high real-time performance uses Channel 2 for data transmission, and data with low importance and low real-time performance can use either Channel 1 or Channel 2 for data transmission.
[0038] The embodiment of the present invention realizes that a large amount of periodic data or unimportant data uses a separate channel for unidirectional transmission, without being mixed with real-time important data and occupying bandwidth, thereby improving the stability of important data transmission.
[0039] Embodiment 2:
[0040] The present invention also provides a data communication system between two processors, including a first processor and a second processor, and the system implements the above method embodiment of Embodiment 1 of the present invention.
[0041] Although the present invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes can be made to the present invention in terms of form and details without departing from the spirit and scope of the present invention defined by the appended claims, and all such changes are within the protection scope of the present invention.
Claims
1. A data communication method between two processors, characterized in that, It includes the following steps: Construct at least two data transmission channels between the first processor and the second processor; When receiving the data to be transmitted, set the real-time nature and importance of the data according to the type of the data; Select the corresponding data transmission channel according to the real-time nature and importance of the data for data transmission.
2. The data communication method between dual processors according to claim 1, characterized in that: There are two data transmission channels, namely Channel 1 and Channel 2 respectively. Among them, Channel 1 is set to be able to conduct two-way communication and has an ACK response mechanism and a retransmission mechanism. Channel 2 is set to only send data, and the link validity monitoring of Channel 2 is notified by Channel 1.
3. The data communication method between dual processors according to claim 1, wherein: It is set that when selecting the data transmission channel, the priority of importance is higher than the priority of real-time nature.
4. The data communication method between dual processors according to claim 2, wherein: It is set that the data with high importance is transmitted through Channel 1.
5. The data communication method between dual processors according to claim 2, characterized in that: It is set that the data with low importance selects the data transmission channel according to its high real-time nature.
6. The data communication method between dual processors according to claim 2, wherein: It is set that the data with low importance and high real-time nature is transmitted through Channel 2.
7. The data communication method between dual processors according to claim 2, wherein: It is set that the data with low importance and low real-time nature is transmitted through either Channel 1 or Channel 2.
8. The data communication method between two processors according to claim 2, wherein: The types of the data transmission channels include serial ports and SPI interfaces.
9. A data communication system between two processors, characterized in that: It includes a first processor and a second processor, and the system implements the method described in any one of claims 1 to 8.