Data communication method and device, electronic equipment, storage medium and product
By generating a combined frame, periodic and event-type vehicle data are combined with response information, solving the bandwidth waste problem in SPI communication between MCU and SoC chips and achieving efficient data transmission.
Patent Information
- Application Number
- CN202511015261.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-10-03
AI Technical Summary
In the prior art, in the SPI communication between the MCU and the SoC chip, no other data information is carried during the response process, resulting in a waste of bandwidth resources and causing a transmission delay when there is no response.
The sending end obtains periodic and event-type vehicle data and generates a combined frame, including a frame header, a static frame and a dynamic frame. The static frame is determined by the periodic data, and the dynamic frame is determined by the event-type data and the response information. A feedback data frame is generated at the receiving end.
This ensures data transmission reliability while improving bandwidth resource utilization and reducing bandwidth waste.
Smart Images

Figure CN120750488A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, and in particular to a data communication method, device, electronic equipment, storage medium and product. Background Art
[0002] A domain controller design typically consists of two core processors: a microcontroller unit (MCU) and a system-on-chip (SoC). The MCU features fast power-up, enabling rapid communication with the vehicle. The SoC, with its high processing power (computing power) and high power consumption, focuses on building a bridge for sensory interaction with the driver and passengers, enabling human interaction, such as instrument displays and the central control screen.
[0003] As the core of human interaction, the SoC chip relies on communication with the MCU chip. Communication between these two processors primarily relies on the Serial Peripheral Interface (SPI). Full-duplex SPI communication is used between the MCU and SoC chips, and both parties must adhere to specific communication protocols. Common communication protocols require the receiver to provide a response to each data transmission to ensure reliable information transmission. However, this response does not carry any other data, significantly wasting bandwidth resources. Furthermore, if no response is received from the other party, the next frame of data will be blocked, waiting for transmission, and unable to be sent, resulting in transmission delays and wasted bandwidth resources. Therefore, improving bandwidth resource utilization while ensuring communication reliability has become a pressing issue. Summary of the Invention
[0004] The present invention provides a data communication method, device, electronic device, storage medium and product to solve the problem in the prior art that other data information is not carried in the response reply process, thereby wasting bandwidth resources.
[0005] According to one aspect of the present invention, a data communication method is provided, wherein the method comprises:
[0006] The transmitting end obtains periodic vehicle data and event-type vehicle data, and generates response information based on the historical feedback data frame of the receiving end; wherein, when the transmitting end is a microcontroller unit, the receiving end is a system on a chip; when the transmitting end is a system on a chip, the receiving end is a microcontroller unit;
[0007] The transmitting end uses the periodic vehicle data and the event-type vehicle data as valid data and generates a combined frame based on the valid data and the response information; wherein the combined frame includes a frame header, a static frame, and a dynamic frame; the static frame is determined by the periodic vehicle data, and the dynamic frame is determined by the event-type vehicle data and the response information;
[0008] The receiving end receives the combined frame, determines the data information and response information of the combined frame, and generates a feedback data frame based on the data information and the response information and sends it to the transmitting end.
[0009] According to another aspect of the present invention, there is provided a data communication device, comprising: a transmitting end and a receiving end;
[0010] The transmitting end is used to obtain periodic vehicle data and event-type vehicle data, and generate response information based on the historical feedback data frame of the receiving end; wherein, when the transmitting end is a micro control unit, the receiving end is a system on a chip; when the transmitting end is a system on a chip, the receiving end is a micro control unit;
[0011] The transmitting end is configured to use the periodic vehicle data and the event-type vehicle data as valid data and generate a combined frame based on the valid data and the response information; wherein the combined frame includes a frame header, a static frame, and a dynamic frame; the static frame is determined by the periodic vehicle data, and the dynamic frame is determined by the event-type vehicle data and the response information;
[0012] The receiving end is configured to receive the combined frame, determine the data information and response information of the combined frame, and generate a feedback data frame based on the data information and the response information and send it to the transmitting end.
[0013] According to another aspect of the present invention, an electronic device is provided, comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform a data communication method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a data communication method according to any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, an embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements a data communication method according to any embodiment of the present invention.
[0019] The technical solution of the embodiment of the present invention is to obtain periodic vehicle data and event-type vehicle data through the sending end, generate response information according to the historical feedback data frame of the receiving end, use the periodic vehicle data and event-type vehicle data as valid data, generate a combined frame based on the valid data and the response information, receive the combined frame through the receiving end, determine the data information and response information of the combined frame, and generate a feedback data frame based on the data information and the response information and send it to the sending end, thereby realizing the data structure reorganization of the traditional data frame and the response frame. The amount of data transmitted each time after the combination is significantly more than that of the original data frame. Whether it is the sending end or the receiving end, the required data to be transmitted is also included in the response, which kills two birds with one stone, ensures the reliability of common data frame data transmission, and completes the response to the received information at the same time, fully utilizes the bandwidth resources of each data transmission, and reduces bandwidth waste.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of information interaction between a microcontroller unit and a system on a chip in the prior art;
[0023] Figure 2 This is a flowchart of data response and interaction in the prior art;
[0024] Figure 3 It is the data frame format in the prior art;
[0025] Figure 4 It is the response frame format in the prior art;
[0026] Figure 5 is a flow chart of a data communication method provided according to embodiment 1 of the present invention;
[0027] Figure 6This is a schematic diagram of the structure of a combined frame provided according to the first embodiment of the present invention;
[0028] Figure 7 is a flow chart of a data communication method provided according to a second embodiment of the present invention;
[0029] Figure 8 This is a data response and interaction flow chart provided according to the third embodiment of the present invention;
[0030] Figure 9 This is a structural diagram of a data communication device provided according to a fourth embodiment of the present invention;
[0031] Figure 10 It is a structural diagram of an electronic device for implementing the data communication method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] In one embodiment, Figure 1 Schematic diagram of information interaction between microcontroller unit and system on chip in the prior art. Figure 1As shown in the figure, the domain controller design is usually composed of two core processors: the MCU chip and the SoC chip. The MCU chip has fast power-up and can quickly establish communication with the entire vehicle. The SoC chip has strong processing power (computing power) and high power consumption. It focuses more on building a bridge for sensory interaction with drivers and passengers, and realizing interaction with people, such as instrument display and central control screen display. As the core of human interaction, the SoC chip is inseparable from the communication between it and the MCU chip. The communication between these two processors is mainly completed by SPI communication. The MCU chip and the SoC chip use full-duplex SPI communication, and both parties must comply with certain communication protocols. In commonly used communication protocols, in order to ensure the reliability of information transmission, the receiving party needs to give the other party a response for each data transmission.
[0035] In one embodiment, Figure 2 This is a flow chart of data response and interaction in the prior art. Figure 2 As shown, when MCU sends data and SoC responds:
[0036] Step 1, MCU sends: MCU first sends First Frame Data to SoC.
[0037] Step 2: SoC verification: SoC performs verification after receiving the data.
[0038] Step 3: SoC responds: After verification, the SoC sends an ACK (Acknowledge Character) response signal to the MCU, indicating that the data has been received correctly.
[0039] Step 4: Subsequent transmission: After receiving the ACK, the MCU continues to send the Next Frame Data. The SoC repeats the process of checking and sending the ACK, and the cycle continues.
[0040] When the SoC sends data and the MCU responds:
[0041] Step 1: SoC sends Frame Data to MCU.
[0042] Step 2: MCU verification: MCU performs verification after receiving the data.
[0043] Step 3, MCU response: After verification, the MCU sends an ACK response to the SoC to inform it that the data has been received correctly.
[0044] Step 4: Subsequent transmission: After receiving the ACK, the SoC sends the Next Frame Data. The MCU repeats the steps of checking and sending the ACK again, and the cycle continues.
[0045] In one embodiment, Figure 3 It is the data frame format in the prior art. Figure 3 As shown in the figure, the common data frame format is divided into two parts: frame header and frame data. The frame header is explained as follows:
[0046] Frame identifier: used by the receiver to identify the starting point of a frame of data. The length can be customized and is generally defined as 3 bytes, for example: 0xFF, 0x5A, 0xA5.
[0047] Frame ID (Identifier): used to identify the frame sequence, cyclically accumulated between 0 and 255; used to determine whether frame loss occurs.
[0048] Frame length: Counts the length from packet 1 to packet N and check code 1. This is used by the receiver to identify the end of a frame. The frame length occupies at least 2 bytes to meet the frame data length.
[0049] Check code 0: The frame ID and frame length are calculated to generate a check code, which is used by the receiver to use the same calculation method to determine whether the received data has errors. If the receiver finds that the check code is inconsistent, it needs to ask the sender to resend the entire packet data. The length of check code 0 is generally one byte.
[0050] The frame data is interpreted as follows:
[0051] Verification code 1: The receiver uses the same calculation method to determine whether the received data has errors. If the receiver finds that the verification code is incorrect, it needs to ask the sender to resend the entire packet of data.
[0052] In one embodiment, Figure 4 It is the response frame format in the prior art, such as Figure 4 As shown in the figure, the response frame only contains a frame header and no other valid data.
[0053] The response frame is explained as follows:
[0054] Frame identifier: used by the receiver to identify the starting point of a frame of data. The length can be customized, for example, definition: 0xFF, 0x5A, 0xA5.
[0055] Frame ID: If the receiver receives the message correctly, the frame ID can be fixed to a certain number, such as 0x00. If the receiver detects an error through the checksum and requires a retransmission, the frame ID can be fixed to a certain number, such as 0xFF. In one embodiment, if this number is used as the frame ID of a response frame, it must not be used in a data frame to prevent it from being mistakenly identified as a response frame.
[0056] Frame length: Generally 2 bytes. Since it is a response frame and does not carry data, the frame length can be agreed to be a fixed number 0x00.
[0057] Check code 0: Generates a check code for the frame ID and frame length, which is used by the receiver to determine whether there is an error in the received data using the same method.
[0058] This application restructures traditional data frames and response frames. The resulting combined frame transmits significantly more data per transmission than the original data frame. This allows both the sender and receiver to receive the data they need to transmit along with the response, achieving two goals at once. This newly designed data frame structure ensures reliable transmission of common data frames while also providing a response to received information. This fully utilizes bandwidth resources for each data transmission and reduces bandwidth waste.
[0059] Example 1
[0060] Figure 5 This is a flow chart of a data communication method provided according to the first embodiment of the present invention. This embodiment is applicable to the case where a microcontroller unit in a domain controller and a system on a chip perform information exchange. The method can be executed by a data communication device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 5 As shown, the method includes:
[0061] S110 , obtaining periodic vehicle data and event-type vehicle data through the transmitting end, and generating response information according to the historical feedback data frame of the receiving end.
[0062] Among them, when the sending end is a micro control unit, the receiving end is a system on a chip; when the sending end is a system on a chip, the receiving end is a micro control unit.
[0063] Among them, periodic vehicle data can be understood as vehicle-related data that is periodically acquired. In the actual operation process, periodic vehicle data may include but is not limited to vehicle operation information, such as tire pressure information, mileage information, vehicle power status and instrument indicator light information, etc. Event-type vehicle data can be understood as vehicle-related data collected when an event occurs. For example, event-type vehicle data may include environmental perception data, such as surrounding obstacle information, voice control information and air conditioning adjustment information, etc. The historical feedback data frame refers to the data frame of historical feedback from the receiving end. In the actual operation process, the historical feedback data frame can be the feedback data frame sent by the receiving end in the previous frame, that is, the data frame received by the sending end in the previous frame. Response information refers to a kind of status information returned by the receiving end for the data frame sent by the sending end during the data communication process, which is used to inform the sending end whether the data has been received correctly or whether it can continue to be sent.
[0064] In an embodiment, a transmitting end can collect periodic vehicle data and event-type vehicle data, obtain historical feedback data frames, and parse the historical feedback data frames to generate response information. In actual operation, periodic vehicle data and event-type vehicle data collected by other ECUs on the vehicle body, or tire pressure information, mileage information, vehicle power status, and instrument indicator light information collected by sensors can be extracted as periodic vehicle data, and data such as surrounding obstacle information, voice control information, and air conditioning adjustment information can be used as event-type vehicle data. The frame sequence number, frame length, dynamic data packet, frame header check code, and dynamic check code are then extracted from the historical feedback data frames to verify the integrity of the historical feedback data frames. A response message is generated based on the integrity. When the historical feedback data frames are confirmed to be complete, a response message that does not need to be retransmitted can be generated; when the historical feedback data frames are determined to be incomplete, a response message that needs to be retransmitted can be generated. In one embodiment, the response message can consist of 2 bytes.
[0065] S120. The transmitting end uses the periodic vehicle data and the event-type vehicle data as data to be sent, and generates a combined frame based on the data to be sent and the response information.
[0066] The combined frame includes a frame header, a static frame, and a dynamic frame; the static frame is determined by periodic vehicle data, and the dynamic frame is determined by event-type vehicle data and response information.
[0067] Static frames are used to transmit periodic vehicle data, while dynamic frames are used to transmit event-type vehicle data and response information. Generally speaking, periodic vehicle data has a fixed length and a fixed transmission period, for example, 8 bytes, and is retransmitted at regular intervals. For example, the interval can be 20ms / 50ms / 100ms / 200ms. For this type of periodic data, the receiver can receive the data without acknowledging it. If a checksum mismatch occurs, the receiver can discard the data and retain the previous frame of data to be sent. This saves bandwidth resources because the other party will continue to send data at regular intervals. For event-type vehicle data, which has a variable length and lacks periodicity, the receiver must acknowledge it to ensure reliable communication. This is done to maximize bandwidth utilization. Data to be sent refers to the information stored in the data packet within a data frame. A combined frame refers to the data frame to be sent to the receiver.
[0068] In an embodiment, the transmitting end can use the periodic vehicle data and the event-type vehicle data as the data to be sent, and encapsulate the data to be sent and the response information to obtain a combined frame. In the actual operation process, the first-in-first-out (FIFO) principle can be adopted for packet assembly, and the periodic vehicle data and the event-type vehicle data are respectively composed of data packets, and the corresponding check codes are generated. The data packets composed of the periodic vehicle data and the corresponding check codes are spliced to generate static frames, and the data packets composed of the response information and the event-type vehicle data and the corresponding check codes are spliced to generate dynamic frames. Combined with the frame header, the frame header, the static frame and the dynamic frame are spliced to generate a combined frame. In one embodiment, Figure 6 : is a schematic diagram of the structure of a combined frame provided according to the first embodiment of the present invention. Figure 6 As shown, a combined frame includes a frame header, a static frame, and a dynamic frame. The frame header includes a frame identifier, a frame sequence number, a frame length, and a check code 0 (frame header check code). The frame length includes a static frame length and a dynamic frame length. A static frame includes data packets 1_1, 1_2, ..., 1_N, and a check code 1 (static check code). A dynamic frame includes response information, data packets 2_1, 2_2, ..., 2_N, and a check code 2 (dynamic check code). The response information includes a response frame sequence number (response frame ID) and a retransmission flag.
[0069] S130: Receive the combined frame through the receiving end, determine the data information and response information of the combined frame, and generate a feedback data frame based on the data information and the response information and send it to the transmitting end.
[0070] The data information may include a frame header, a data packet and a check code.
[0071] In an embodiment, a receiving end may receive a combined frame, extract the frame sequence number, frame length, static data packet, dynamic data packet, frame header check code, static check code, and dynamic check code of the combined frame, determine the completion status of the combined frame, generate a response message based on the completeness, determine whether the data packet of the previous frame needs to be retransmitted based on the response message, and generate a feedback data frame and send it to the transmitting end. In actual operation, the frame sequence number and frame length in the combined frame may be XORed to obtain a fourth check code, and all dynamic data packets may be XORed to obtain a fifth check code. When the fourth check code is the same as the frame header check code and the fifth check code is the same as the dynamic check code, the historical feedback data frame is determined to be complete and a response message that does not need to be retransmitted is generated. When the fourth check code is different from the frame header check code and / or the fifth check code is different from the dynamic check code, the historical feedback data frame is determined to be incomplete and a response message that needs to be retransmitted is generated. An XOR operation is performed on all static data packets to obtain a sixth check code. When the sixth check code is different from the static check code, the static data packet in the combined frame is discarded, and a feedback data frame is generated based on the data information and the response message and sent to the transmitting end.
[0072] In an embodiment of the present invention, a transmitting end obtains periodic vehicle data and event-type vehicle data, generates response information based on the historical feedback data frame of the receiving end, uses the periodic vehicle data and event-type vehicle data as data to be sent, generates a combined frame based on the data to be sent and the response information, receives the combined frame through the receiving end, determines the data information and response information of the combined frame, and generates a feedback data frame based on the data information and the response information and sends it to the transmitting end, thereby reorganizing the data structure of the traditional data frame and the response frame. The amount of data transmitted each time after the combination is significantly greater than that of the original data frame. Whether it is the transmitting end or the receiving end, the data required to be transmitted is also included in the response, thus achieving two goals at one stroke, ensuring the reliability of data transmission of common data frames, and completing the response to the received information at the same time, making full use of the bandwidth resources of each data transmission, and reducing bandwidth waste.
[0073] In one embodiment, before generating response information according to the historical feedback data frame of the receiving end, the method further includes:
[0074] Extracting static data packets and static check codes from historical feedback data frames through the sending end;
[0075] Through the sending end, all static data packets are XORed to obtain a third check code;
[0076] Through the sending end, when the third check code is different from the static check code, the static data packet in the historical feedback data frame is discarded.
[0077] The static data packet refers to a data table in a static frame, and the static check code refers to a check code in a static frame.
[0078] In an embodiment, before generating a response message based on the historical feedback data frame of the receiving end, the sending end can also extract the static data packet and static check code in the historical feedback data frame, perform an XOR operation on all the static data packets to obtain a third check code. If the third check code is different from the static check code, it proves that the static frame is incomplete, and the static data packet in the historical feedback data frame can be discarded to save bandwidth resources.
[0079] Example 2
[0080] Figure 7 This is a flow chart of a data communication method provided according to the second embodiment of the present invention. This embodiment is based on the above embodiment to further optimize and expand, and can be combined with various optional technical solutions in the above embodiment. Figure 7 As shown, the method includes:
[0081] S201. Collect vehicle operation information as periodic vehicle data and collect environment perception data as event-type vehicle data through a sending end.
[0082] In one embodiment, the vehicle operation information includes at least tire pressure information, mileage information, vehicle power status, and instrument indicator light information; and the environmental perception data includes at least surrounding obstacle information, voice control information, and air conditioning adjustment information.
[0083] In an embodiment, the transmitting end may collect vehicle operation information such as tire pressure information, mileage information, vehicle power status, and instrument indicator light information as periodic vehicle data; and collect environmental perception data such as surrounding obstacle information, voice control information, and air conditioning adjustment information as event-type vehicle data.
[0084] S202. Extract the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code from the historical feed data frame through the sending end.
[0085] In an embodiment, the historical feed data frame may be parsed by the transmitter to determine the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code in the historical feed data frame.
[0086] S203: The sending end determines the completeness of the historical feedback data frame according to the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code, and generates response information according to the completeness.
[0087] The response information includes the response frame sequence number and an identifier indicating whether retransmission is required.
[0088] In an embodiment, after the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code are determined by the transmitting end, the integrity of the historical feedback data frame can be determined according to the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code. In actual operation, the expected check code of the frame header and the expected check code of the dynamic frame can be calculated according to the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code. When the expected check code of the frame header is the same as the frame header check code and the expected check code of the dynamic frame is the same as the dynamic check code, the historical feedback data frame is determined to be complete; when the expected check code of the frame header is different from the frame header check code or the expected check code of the dynamic frame is different from the dynamic check code, the historical feedback data frame is determined to be incomplete, and a response message can be generated according to the completeness.
[0089] In one embodiment, the transmitting end determines the integrity of the historical feedback data frame according to the frame sequence number, frame length, dynamic data packet, frame header check code, and dynamic check code, and generates response information according to the integrity, including:
[0090] Through the transmitting end, an XOR operation is performed on the frame sequence number and the frame length in the historical feedback data frame to obtain a first check code, and an XOR operation is performed on all dynamic data packets to obtain a second check code;
[0091] By the sending end, when the first check code is the same as the frame header check code and the second check code is the same as the dynamic check code, it is determined that the historical feedback data frame is complete and a response message that does not need to be retransmitted is generated;
[0092] By the sending end, when the first check code is different from the frame header check code and / or the second check code is different from the dynamic check code, it is determined that the historical feedback data frame is incomplete, and response information that needs to be retransmitted is generated.
[0093] In an embodiment, the transmitting end may perform an XOR operation on the frame sequence number and the frame length, determine the result as a first check code, and perform an XOR operation on all dynamic data packets, determine the result as a second check code. If the first check code is the same as the frame header check code and the second check code is the same as the dynamic check code, it can be determined that the historical feedback data frame is complete, and a response message that does not need to be retransmitted can be generated, such as 0x01, 0x01, etc.; if the first check code is different from the frame header check code and / or the second check code is different from the dynamic check code, it can be determined that the historical feedback data frame is incomplete, and a response message that needs to be retransmitted can be generated, such as 0x02, 0x00.
[0094] S204: The sending end uses the periodic vehicle data and the event-type vehicle data as data to be sent.
[0095] S205 , through the transmitting end, grouping the periodic vehicle data in the data to be sent according to the first-in-first-out principle and the maximum packet length to obtain a static data packet.
[0096] In an embodiment, the transmitting end can store periodic vehicle data in a FIFO queue in the order of arrival, forming a pool of data to be packaged. Data at the head of the queue is processed first, and new data is always added to the end of the queue to ensure that the timing is not disrupted. An empty data packet is created, and a maximum packet length threshold is set. Data is retrieved from the FIFO queue and attempted to be filled into the current data packet. If the data packet size exceeds the maximum packet length threshold, the addition is stopped, the current data packet is encapsulated into a static data packet, and a new empty data packet is created to continue processing the remaining periodic vehicle data.
[0097] S206 , through the sending end, the event-type vehicle data in the data to be sent are grouped into packets according to the first-in-first-out principle and the maximum packet length to obtain a dynamic data packet.
[0098] In an embodiment, the transmitting end can store event-type vehicle data in a FIFO queue in the order of arrival, forming a pool of data to be packaged. Data at the head of the queue is processed first, and new data is always added to the end of the queue to ensure that the timing is not disrupted. An empty data packet is created, and a maximum packet length threshold is set. Data is retrieved from the FIFO queue and attempted to be filled into the current data packet. If the data packet size exceeds the maximum packet length threshold, the addition is stopped, the current data packet is encapsulated into a static data packet, and a new empty data packet is created to continue processing the remaining event-type vehicle data.
[0099] S207. The transmitting end determines a static check code according to the static data packet and a dynamic check code according to the dynamic data packet, concatenates the static data packet and the static check code to obtain a static frame, and concatenates the response information, the dynamic data packet and the dynamic check code to obtain a dynamic frame.
[0100] In an embodiment, the sending end can calculate a static check code based on a static data packet, calculate a dynamic check code based on a dynamic data packet, splice the static data packet and the static check code as a static frame, and splice the response information, dynamic data packet and dynamic check code as a dynamic frame.
[0101] In one embodiment, determining, by a transmitting end, a static check code according to a static data packet and a dynamic check code according to a dynamic data packet includes:
[0102] Through the sending end, an XOR operation is performed on the static data packet to obtain a static check code, and an XOR operation is performed on the dynamic data packet to obtain a dynamic check code.
[0103] In an embodiment, an XOR operation may be performed on all static data packets and all dynamic data packets respectively, and the operation results of all static data packets are used as static check codes, and the operation results of all dynamic data packets are used as dynamic check codes.
[0104] S208. The sending end determines the frame identifier, frame sequence number, and frame length, performs an XOR operation on the frame sequence number and the frame length to obtain a frame header check code, and concatenates the frame identifier, frame sequence number, frame length, and frame header check code to obtain a frame header.
[0105] The frame length includes static frame length and dynamic frame length. Static frame length refers to the length of a static frame, while dynamic frame length refers to the length of a dynamic frame. Static frame length and dynamic frame length are generally defined as the upper 8 bits and lower 8 bits respectively. The frame identifier is the starting point for the receiver to identify a frame. Its length can be customized and is generally defined as 3 bytes, for example: 0xFF, 0x5A, 0xA5. The frame sequence number, or frame ID, is used to identify the frame sequence. Its length can be customized and is generally defined as 1 byte, cyclically accumulating between 0 and 255. It is used to determine whether frame loss has occurred.
[0106] In an embodiment, the transmitting end can determine the static frame length and the dynamic frame length to form the frame length, define the frame identifier and frame sequence number, and perform an exclusive OR operation on the frame sequence number and the frame length to obtain a frame header check code, that is, frame ID ^ static frame length upper 8 bits ^ static frame length lower 8 bits ^ dynamic frame length upper 8 bits ^ dynamic frame length lower 8 bits. The frame identifier, frame sequence number, frame length, and frame header check code are then concatenated in order to obtain a frame header.
[0107] S209: The sending end splices the frame header, the static frame, and the dynamic frame to obtain a combined frame.
[0108] S210: Receive a sequence number combination frame at the receiving end, determine data information and response information of the sequence number combination frame, and generate a feedback data frame based on the sequence number data information and the sequence number response information, and send the feedback data frame to the transmitting end.
[0109] In an embodiment of the present invention, a transmitting end collects vehicle operation information as periodic vehicle data, collects environmental perception data as event-type vehicle data, extracts the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code in the historical feedback data frame, determines the completeness of the historical feedback data frame according to the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code, generates response information according to the completeness, and realizes the accuracy of the response information determination; by taking the periodic vehicle data and the event-type vehicle data as the data to be sent, the periodic vehicle data in the data to be sent is grouped according to the first-in-first-out principle and the maximum packet length to obtain a static data packet, and the event-type vehicle data in the data to be sent is grouped according to the first-in-first-out principle and the maximum packet length to obtain a dynamic data packet, determines the static check code according to the static data packet, and generates the response information according to the dynamic data packet. The packet determines the dynamic check code, splices the static data packet and the static check code to obtain the static frame, and splices the response information, the dynamic data packet and the dynamic check code to obtain the dynamic frame, so as to realize the separate packaging of the periodic vehicle number and the event-type vehicle data, which is convenient for data transmission; by determining the frame identifier, frame sequence number and frame length, the frame sequence number and the frame length are XORed to obtain the frame header check code, the frame identifier, frame sequence number, frame length and frame header check code are spliced to obtain the frame header, and the frame header, static frame and dynamic frame are spliced to obtain a combined frame, which is received by the receiving end, the valid information and response information of the combined frame are determined, and the feedback data frame is generated based on the valid information and response information and sent to the sending end. The newly designed data frame structure ensures the reliability of data transmission of common data frames, while completing the response to the received information, making full use of the bandwidth resources of each data transmission and reducing bandwidth waste.
[0110] Example 3
[0111] In one embodiment, this embodiment is Figure 6 The specific description of the combined frame shown in FIG. 1 is based on the example of taking check code 0 as the frame header check code, check code 1 as the static check code, and check code 2 as the dynamic check code as an example to explain the specific combination of frames. Figure 6 As shown, a frame of valid data is divided into three parts: frame header, static frame, and dynamic frame.
[0112] In addition to the frame length, the frame header also contains the frame identifier, frame ID, and check code 0. Figure 3 Data frame format.
[0113] Frame length: This field helps the receiver identify the length of static and dynamic frames, making it easier for the receiver to identify and distribute data. The frame length consists of two bytes each: static and dynamic.
[0114] The static frame length starts from data packet 1_1 and ends with check code 1, including check code 1.
[0115] The dynamic frame length starts from data packet 2_1 and ends with check code 2, including check code 2.
[0116] Check code 0: Perform an exclusive OR operation on the frame ID and frame length, that is, frame ID ^ static frame length high 8 bits ^ static frame length low 8 bits ^ dynamic frame length high 8 bits ^ dynamic frame length low 8 bits.
[0117] If the receiver finds that the check code is 0, it needs to provide feedback in the response information of the dynamic frame. The feedback method is detailed in the response information description below.
[0118] Static frames consist of periodic messages or periodic information.
[0119] Data Packet 1_N: stores periodic CAN message information or other periodic data, such as tire pressure information, mileage information, vehicle power status, and instrument indicator light information.
[0120] Check code 1: Performs an XOR operation on static frame data packets 1_1 to 1_N. The receiver uses the same method to determine whether the received data has errors. Since it is a periodic message or data, if the check code is incorrect, it can be discarded and wait for the data to be sent in the next cycle.
[0121] Dynamic frames consist of event messages or information, such as surrounding obstacle information perceived by external sensors, voice control information, air conditioning adjustment information, etc.
[0122] Response information: The response information contains the response frame ID and whether to resend the information, which consists of 2 bytes. For example, 0x01, 0x01 means that the frame information with frame ID 0x01 was received correctly and does not need to be resent; 0x02, 0x00 means that the frame information with frame ID 0x02 was received incorrectly and needs to be resent by the sender.
[0123] Data Packet 2_N: stores event-type CAN messages or other temporary data, such as volume adjustment, air conditioning adjustment, and diagnostic information.
[0124] Check code 2: Performs an XOR operation on dynamic frame data packets 2_1 to 2_N. The receiver uses the same method to determine whether the received data has errors. If the check code is incorrect, the corresponding feedback is given in the response information of the data frame sent to the sender.
[0125] Static frame information typically comes from periodic signals from other ECUs in the vehicle. For example, the ECU monitoring tire pressure periodically reports pressure values for all four tires. A moving vehicle periodically reports tire speed pulses for calculating speed and mileage. Dynamic frame information occurs when a radar senses an obstacle ahead while driving, and this is fed back to the domain controller via dynamic frames. The domain controller then displays interface information and triggers the AEB function. A stationary radar senses a person or animal passing or approaching, and this is fed back to the domain controller via dynamic frames to trigger sentry mode. During music playback, the volume can be adjusted, and dynamic frames are fed back to the domain controller to control the output of an external amplifier.
[0126] Figure 8 This is a data response and interaction flow chart provided according to the third embodiment of the present invention. Figure 8 The figure shows the data response and interaction process of the application combination frame.
[0127] Step 1. MCU sends first frame data: MCU sends "First Frame Data from MCU" to SoC.
[0128] Step 2: SoC verifies and responds: After receiving the data, the SoC verifies it. If the verification passes, it sends "First Frame Data From SoC" to the MCU and responds to the first frame data sent by the MCU.
[0129] Step 3: MCU verifies and processes: After receiving the SoC data, the MCU verifies it and then continues to send "Next FrameData from MCU" (next frame data from the MCU).
[0130] Step 4: Circular interaction: The SoC verifies the data sent by the MCU again. If the verification is successful, it sends "NextFrame Data from SoC" to the MCU and responds to the data just sent by the MCU. This cycle repeats, achieving continuous data exchange between the two parties.
[0131] It embodies the bidirectional and concurrent data transmission and response mechanism between MCU and SoC, which improves communication efficiency while ensuring correct data transmission.
[0132] Example 4
[0133] Figure 9 FIG. 1 is a structural diagram of a data communication device provided according to a fourth embodiment of the present invention. Figure 9 As shown, the device includes: a transmitting end 91 and a receiving end 92;
[0134] The transmitting end 91 is used to obtain periodic vehicle data and event-type vehicle data and generate response information based on the historical feedback data frame of the receiving end; when the transmitting end is a microcontroller unit, the receiving end is a system on a chip; when the transmitting end is a system on a chip, the receiving end is a microcontroller unit;
[0135] The transmitting end 91 is configured to use the periodic vehicle data and the event-type vehicle data as data to be transmitted, and generate a combined frame based on the data to be transmitted and the response information; wherein the combined frame includes a frame header, a static frame, and a dynamic frame; the static frame is determined by the periodic vehicle data, and the dynamic frame is determined by the event-type vehicle data and the response information;
[0136] The receiving end 92 is configured to receive the combined frame, determine the data information and response information of the combined frame, and generate a feedback data frame based on the data information and response information and send the feedback data frame to the transmitting end.
[0137] The technical solution of the embodiment of the present invention is to obtain periodic vehicle data and event-type vehicle data through the sending end, generate response information according to the historical feedback data frame of the receiving end, use the periodic vehicle data and event-type vehicle data as valid data, generate a combined frame based on the valid data and the response information, receive the combined frame through the receiving end, determine the data information and response information of the combined frame, and generate a feedback data frame based on the data information and the response information and send it to the sending end, thereby realizing the data structure reorganization of the traditional data frame and the response frame. The amount of data transmitted each time after the combination is significantly more than that of the original data frame. Whether it is the sending end or the receiving end, the required data to be transmitted is also included in the response, which kills two birds with one stone, ensures the reliability of common data frame data transmission, and completes the response to the received information at the same time, fully utilizes the bandwidth resources of each data transmission, and reduces bandwidth waste.
[0138] In one embodiment, the sending end 91 is further configured to:
[0139] Collect vehicle operation information as periodic vehicle data and collect environmental perception data as event-based vehicle data;
[0140] Extracting the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code from the historical feedback data frame;
[0141] The integrity of the historical feedback data frame is determined according to the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code, and response information is generated according to the integrity; wherein the response information includes the response frame sequence number and whether retransmission is required.
[0142] In one embodiment, the sending end 91 is further configured to:
[0143] Performing an XOR operation on the frame sequence number and the frame length in the historical feedback data frame to obtain a first check code, and performing an XOR operation on all dynamic data packets to obtain a second check code;
[0144] When the first check code is the same as the frame header check code and the second check code is the same as the dynamic check code, it is determined that the historical feedback data frame is complete, and a response message that does not need to be retransmitted is generated;
[0145] When the first check code is different from the frame header check code and / or the second check code is different from the dynamic check code, it is determined that the historical feedback data frame is incomplete, and response information that needs to be retransmitted is generated.
[0146] In one embodiment, the sending end 91 is further configured to:
[0147] The periodic vehicle data in the data to be sent are grouped into packets according to the first-in-first-out principle and the maximum packet length to obtain a static data packet;
[0148] The event-type vehicle data in the data to be sent is grouped into packets according to the first-in-first-out principle and the maximum packet length to obtain a dynamic data packet;
[0149] Determine a static check code according to the static data packet, and determine a dynamic check code according to the dynamic data packet, splice the static data packet and the static check code to obtain a static frame, and splice the response information, the dynamic data packet and the dynamic check code to obtain a dynamic frame;
[0150] Determine the frame identifier, frame sequence number, and frame length, perform an XOR operation on the frame sequence number and the frame length to obtain a frame header check code, and concatenate the frame identifier, frame sequence number, frame length, and frame header check code to obtain a frame header; wherein the frame length includes a static frame length and a dynamic frame length;
[0151] The frame header, static frame and dynamic frame are spliced together to obtain a combined frame.
[0152] In one embodiment, the sending end 91 is further configured to:
[0153] An XOR operation is performed on the static data packet to obtain a static check code, and an XOR operation is performed on the dynamic data packet to obtain a dynamic check code.
[0154] In one embodiment, the sending end 91 is further configured to:
[0155] Extracting static data packets and static check codes from historical feedback data frames;
[0156] Performing an XOR operation on all static data packets to obtain a third check code;
[0157] When the third check code is different from the static check code, the static data packet in the historical feedback data frame is discarded.
[0158] In one embodiment, the vehicle operation information includes at least: tire pressure information, mileage information, vehicle power status, and instrument indicator light information;
[0159] Environmental perception data includes at least: surrounding obstacle information, voice control information and air conditioning adjustment information.
[0160] The data communication device provided in the embodiment of the present invention can execute the data communication method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0161] Example 5
[0162] Figure 10 Schematic diagram of the structure of an electronic device that implements the data communication method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0163] like Figure 10 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0164] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0165] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the data communication method.
[0166] In some embodiments, the data communication method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data communication method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the data communication method in any other suitable manner (e.g., by means of firmware).
[0167] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0168] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0169] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0170] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0171] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0172] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0173] In one embodiment, the present invention further includes a computer program product. The computer program product includes a computer program. When the computer program is executed by a processor, the data communication method of any embodiment of the present invention is implemented.
[0174] The computer program product may be implemented by writing computer program code for performing the operations of the present invention in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0175] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0176] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A data communication method, characterized in that: include: The transmitting end obtains periodic vehicle data and event-type vehicle data, and generates response information based on the historical feedback data frame of the receiving end; wherein, when the transmitting end is a microcontroller unit, the receiving end is a system on a chip; when the transmitting end is a system on a chip, the receiving end is a microcontroller unit; The transmitting end uses the periodic vehicle data and the event-type vehicle data as data to be transmitted, and generates a combined frame based on the data to be transmitted and the response information; wherein the combined frame includes a frame header, a static frame, and a dynamic frame; the static frame is determined by the periodic vehicle data, and the dynamic frame is determined by the event-type vehicle data and the response information; The receiving end receives the combined frame, determines the data information and response information of the combined frame, and generates a feedback data frame based on the data information and the response information and sends it to the transmitting end.
2. The method according to claim 1, characterized in that The method of acquiring periodic vehicle data and event-type vehicle data through the transmitting end and generating response information according to the historical feedback data frame of the receiving end includes: Through the sending end, vehicle operation information is collected as periodic vehicle data, and environmental perception data is collected as event-type vehicle data; Extract the frame sequence number, frame length, dynamic data packet, frame header check code and dynamic check code from the historical feedback data frame through the sending end; Through the sending end, the completeness of the historical feedback data frame is determined according to the frame sequence number, the frame length, the dynamic data packet, the frame header check code and the dynamic check code, and a response message is generated according to the completeness; wherein, the response information includes the response frame sequence number and an indicator of whether retransmission is required.
3. The method according to claim 2, characterized in that The transmitting end determines the completeness of the historical feedback data frame according to the frame sequence number, the frame length, the dynamic data packet, the frame header check code, and the dynamic check code, and generates response information according to the completeness, including: Through the transmitting end, an XOR operation is performed on the frame sequence number and the frame length in the historical feedback data frame to obtain a first check code, and an XOR operation is performed on all dynamic data packets to obtain a second check code; By the transmitting end, when the first check code is the same as the frame header check code and the second check code is the same as the dynamic check code, it is determined that the historical feedback data frame is complete, and a response message that does not need to be retransmitted is generated; Through the transmitting end, when the first check code is different from the frame header check code and / or the second check code is different from the dynamic check code, it is determined that the historical feedback data frame is incomplete, and response information that needs to be retransmitted is generated.
4. The method according to claim 1, wherein The generating a combined frame based on the data to be sent and the response information includes: By the transmitting end, the periodic vehicle data in the data to be sent is grouped into packets according to the first-in-first-out principle and the maximum packet length to obtain a static data packet; By the sending end, the event-type vehicle data in the data to be sent is packaged according to the first-in-first-out principle and the maximum packet length to obtain a dynamic data packet; By the transmitting end, a static check code is determined according to the static data packet, and a dynamic check code is determined according to the dynamic data packet, the static data packet and the static check code are spliced together to obtain a static frame, and a response message, the dynamic data packet and the dynamic check code are spliced together to obtain a dynamic frame; Determine, by a transmitting end, a frame identifier, a frame sequence number, and a frame length, perform an exclusive OR operation on the frame sequence number and the frame length to obtain a frame header check code, and concatenate the frame identifier, the frame sequence number, the frame length, and the frame header check code to obtain a frame header; wherein the frame length includes a static frame length and a dynamic frame length; The frame header, the static frame and the dynamic frame are spliced together by a sending end to obtain a combined frame.
5. The method according to claim 4, characterized in that The transmitting end determines a static check code according to the static data packet and determines a dynamic check code according to the dynamic data packet, including: Through the sending end, an XOR operation is performed on the static data packet to obtain a static check code, and an XOR operation is performed on the dynamic data packet to obtain a dynamic check code.
6. The method according to claim 1, characterized in that Before generating the response information according to the historical feedback data frame of the receiving end, the method further includes: Extracting static data packets and static check codes from historical feedback data frames through the sending end; Through the sending end, all static data packets are XORed to obtain a third check code; Through the transmitting end, when the third check code is different from the static check code, the static data packet in the historical feedback data frame is discarded.
7. The method according to claim 2, characterized in that The vehicle operation information includes at least: tire pressure information, mileage information, vehicle power status and instrument indicator light information; The environmental perception data includes at least surrounding obstacle information, voice control information and air conditioning adjustment information.
8. A data communication device, characterized in that: include: sender and receiver; The transmitting end is used to obtain periodic vehicle data and event-type vehicle data, and generate response information based on the historical feedback data frame of the receiving end; wherein, when the transmitting end is a micro control unit, the receiving end is a system on a chip; when the transmitting end is a system on a chip, the receiving end is a micro control unit; The transmitting end is configured to use the periodic vehicle data and the event-type vehicle data as data to be transmitted, and generate a combined frame based on the data to be transmitted and the response information; wherein the combined frame includes a frame header, a static frame, and a dynamic frame; the static frame is determined by the periodic vehicle data, and the dynamic frame is determined by the event-type vehicle data and the response information; The receiving end is configured to receive the combined frame, determine the data information and response information of the combined frame, and generate a feedback data frame based on the data information and the response information and send it to the transmitting end.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform a data communication method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a data communication method according to any one of claims 1 to 7 when executed.
11. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements a data communication method according to any one of claims 1 to 7.