A highly secure in-vehicle communication software architecture
By introducing data aggregation layer, protection layer and communication layer into the vehicle communication software architecture, using mechanisms such as SEC-DED error correction code and data identity identification bits, communication fault detection and mitigation problems in the existing technology are solved, and high functions are achieved Safety protection and performance improvements support demanding fault tolerance time requirements.
Patent Information
- Application Number
- CN202410500201.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-04-24
AI Technical Summary
When the existing on-board communication software architecture faces software errors, hardware failures and external environment interference, it is difficult to effectively detect and alleviate communication failures, especially under the demanding fault tolerance time requirements, it cannot be quickly detected and entered a safe state, and data reorganization and distribution It may damage the data structure and increase development costs.
Adopt a highly secure vehicle communication software architecture, including data aggregation layer, data protection layer and data communication layer. By adding security control information to the sending end and verifying it on the receiving end, SEC-DED error correction code and data identity identification are used. Mechanisms such as bits ensure data integrity and error correction capabilities, and support functional downgrade strategies.
It realizes high functional security protection for on-board communication systems, improves the performance and flexibility of the data communication layer and gateway roles, reduces the pressure on system hardware resources, can quickly detect and correct communication failures, supports demanding fault tolerance time requirements, and It explicitly represents data security integrity for upper-level application development.
Smart Images

Figure CN118646514B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to vehicle-mounted communication technology, and in particular to a highly secure vehicle-mounted communication software architecture. Background Art
[0002] The causes of functional safety failure in communication systems can be summarized into three categories: Figure 1 As shown in the figure, the communication process failures include:
[0003] Software errors: Software errors may be caused by systemic errors in communication protocols and software components. Errors may occur at any stage of the life cycle, including specification design, coding and compilation. Systematic errors always occur when the environment is the same as the conditions that caused the root cause of the failure. The consequence of software errors may be communication failure or abnormality.
[0004] Hardware failure: Hardware failure is usually the random result of hardware component overload, degradation, aging or exposure to external environmental pressure. A random hardware failure cannot be completely avoided, but its failure probability can be evaluated and appropriate technical measures should be implemented to prevent it.
[0005] Interference from external environmental factors: External influences and environmental stresses include electromagnetic interference, electrostatic discharge, humidity, corrosion, temperature or mechanical stress (such as vibration). Generally, faults caused by external environmental factors are transient faults, which disappear when leaving the interference environment. Therefore, communication robustness design should be carried out according to the fault tolerance time requirements of the vehicle-level functions. It usually takes a certain amount of time to determine that a fault has occurred.
[0006] In order to solve the above problems, the common practice in the existing vehicle communication software architecture and communication protocol is to add a sending operation checksum CRC and a frame counter to the communication message frame sent based on the two parties exchanging data, and to determine whether there are failure modes described in ISO26262 such as message corruption, message insertion, and message duplication in the communication by calculating the checksum of all communication content and detecting the frame counter. However, the premise of this method is that the communication data cannot be re-packed and re-packed after adding the above check field, otherwise the original check field will fail due to the three types of failures of the unpacking or packing party and cannot play its original role.
[0007] In addition, the traditional method of adding cyclic redundancy check and CRC to the communication message frame requires at least two calculations and comparisons to derive the frame message data, and it is impossible to correct erroneous data. This cannot effectively cope with some vehicle functions with stringent fault tolerance time, such as requiring the system to detect communication-related faults within 10ms and enter the corresponding safety state.
[0008] In the next generation of in-vehicle centralized electronic architecture design, the typical feature is that the regional controller ZCU is first arranged nearby according to the physical location of the sensor, and the collected data is pre-processed before being provided to possible data users. In order to achieve full atomization and dynamism of data in the whole vehicle network, under the next generation of typical in-vehicle electronic and electrical architecture, the sender of the data may not be clear about the final use scenario and function of the data, and the flow of data is dynamic, which requires a central data gateway to reorganize and distribute the data according to real-time needs. The reorganization and distribution of data may destroy the structure and content of the original data, and also change the data publisher and the destination address of the data. When a functional safety-related failure occurs on the sender of the data, the software communication protocol also needs to effectively support the functional degradation strategy of the whole vehicle.
[0009] At this time, the central gateway or software middleware can be regarded as both the receiver of the original security information and the sender of the new security information. It needs to generate a new check field based on the new data information. The data integrity protection requirements in this process need to be borne by the central gateway or software middleware. The central gateway or software middleware will inherit the highest signal integrity level of the signal routing, which greatly increases the development cost.
[0010] In view of the above problems, the present invention provides a highly secure vehicle communication software architecture, which is intended to detect and mitigate the causes or effects of communication failures. Summary of the invention
[0011] In order to solve the deficiencies in the prior art, the present invention aims to provide a highly secure vehicle communication software architecture.
[0012] To achieve the purpose of the present invention, the technical solution adopted by the present invention is:
[0013] A highly secure vehicle communication software architecture, including a data aggregation layer, a data protection layer and a data communication layer; the sending end data aggregation layer obtains all the original data / data groups that the vehicle controller can access;
[0014] The data protection layer at the sending end receives the original data / data group from the data convergence layer and adds security control information, packages it according to the predetermined data structure to generate security data / security data group, and provides it to the data communication layer at the sending end at a fixed period;
[0015] The data communication layer at the sending end is responsible for packaging the security data / security data group and security control information and non-security data generated by the data protection layer at the sending end according to the established rules, forming message data and sending it to the corresponding bus;
[0016] The data communication layer at the receiving end obtains the message data from the bus and unpacks the security data and non-security data according to the defined rules to obtain the security data / security data group and security control information;
[0017] The receiving end data protection layer performs security data verification on the security data / security data group and security control information uploaded by the data communication layer, and feeds back to the receiving end data convergence layer after the security data verification;
[0018] The data convergence layer at the receiving end receives the feedback of safety data verification results and safety data / data groups, and the software application unit implements its own functional safety strategy based on the feedback verification results and actual functional safety requirements.
[0019] Furthermore, the security control information includes an error correction code, a data counter, a data valid bit, a data identity bit, a data update flag, and a data security integrity flag.
[0020] Furthermore, the data structure of the security data and security control information includes Data[0], Data[1], Data[2], Data[3], and Data[4], where Data[0], Data[1], and Data[2] are security control information; Data[3] and Data[4] are security data;
[0021] The error correction code uses the SEC-DED error correction code generation method, occupying bits 0, 4, 6, and 7 of Data[0] and bits 1 to 3 of Data[2]. The remaining positions where the original data / data group length is less than 17 bits are filled with 0xf.
[0022] The data valid bit occupies the Data[2] bit0 position. 0 indicates that the corresponding safety data / data group is invalid due to an internal fault, and 1 indicates that it is valid.
[0023] The data counter occupies Data[2] bit5 to bit7, uses a 4-bit loop count identifier, and increases by 1 for each send request;
[0024] The data identity bit occupies the Data[1] position and is unique to the vehicle and is used to identify the correct data sender;
[0025] The data update flag occupies the Data[0] bit 5 position, indicating whether the security data or security data group sent by the data sender is updated. If the security data or data group of the data sender is updated, the data protection layer automatically sets the corresponding data update flag to 1, otherwise, resets the data update flag to 0;
[0026] The data security integrity flag occupies Data[0] bit1 to bit3, and uses 0x0 to 0x4 to represent the diagnostic integrity level of the data or data group being sent.
[0027] Furthermore, the data convergence layer receives bus data from within the vehicle controller system software application unit or the system through a physical communication interface.
[0028] Furthermore, the data packet sent by the data protection layer to the data communication layer is a combination of a single original data and security control information, or a collection of multiple original data and security control information.
[0029] Furthermore, when the bus is CAN or FlexRay, the packetization bit sequence uses the MSB, while when on LIN / Ethernet, the packetization bit sequence uses the LSB.
[0030] Furthermore, the security data / data group protection process of the sender of the data protection layer includes the steps of:
[0031] (1) When a new data protection layer operation cycle is triggered, determine whether new data is obtained from the data aggregation layer. If no new data is obtained, set the data update flag bit to 0;
[0032] (2) If new data is obtained, determine whether the current counter is <15. If it is greater than 15, initialize the counter to 0;
[0033] (3) If the counter is less than 15, the counter is incremented by 1, and the data counter is written at Data[2] bit5 to bit7. Then the data identity bit is written at Data[1], and the data security integrity bit is written at Data[0] bit1 to bit3. The data update flag is set to 1.
[0034] (4) Generate a 7-bit SEC-DED error correction code based on the 32-bit data content;
[0035] (5) Finally, send the security data / data group and security control information to the data communication layer.
[0036] Furthermore, the security data / data group verification process of the receiver of the data protection layer includes the steps of:
[0037] (1) The data protection layer performs security data verification on the security control information. First, it checks whether the data update flag is equal to 1. If it is not equal to 1, the data verification result is output as no new data is received.
[0038] (2) If the data update flag is equal to 1, determine whether the difference between the two counter values of the consecutively received valid messages is less than 15. If it is less than 15, the difference between the two counter values of the consecutively received valid messages is incremented;
[0039] (3) If it is greater than 15, select the corresponding data counter, select the corresponding data identity bit, and determine whether the SEC-DED code verification is correct. If it is wrong, output the data verification result as data corruption;
[0040] (4) If it is correct, determine whether safety data has been received since the system was initialized. If so, initialize the counter difference, update the counter value to the last received counter value, and output the status result as the verification program initialization;
[0041] (5) If not, calculate the difference between the previous and next counters. If the difference = 0, the output status result is data duplication;
[0042] (6) If the difference value = 1, the counter difference value is initialized, the counter value is updated to the last received counter value, and the output data verification result is a state where there is no data loss;
[0043] (7) If 1<difference<=n, the counter difference is initialized, the counter value is updated to the last received counter value, and the output data check result is a state where the lost data is within the allowable range; wherein n is a configurable parameter;
[0044] (8) If the difference value is greater than or equal to n, the counter difference value is initialized, and the counter value is updated to the last received counter value, and the output state result is data out of order.
[0045] Furthermore, when the output data verification result is that there is no data loss, and the output data verification result is that the lost data is within the allowable range; further determine whether the data security integrity has changed since the last cycle. If there is an output ASIL Change Event, if not, the output data verification result is normal.
[0046] The beneficial effect of the present invention is that, compared with the prior art, the vehicle-mounted communication software architecture of the present invention implements complete protection based on original data or data groups rather than message frames. At this time, failures introduced in unpacking and packaging can be detected by the verification logic of the data receiver, which helps the data communication layer and gateway role of the entire vehicle to perform signal unpacking and packaging actions with maximum performance, which not only helps to improve the performance of the data communication layer and gateway role, but also helps the flexibility of the communication architecture of the entire vehicle.
[0047] The in-vehicle communication software architecture of the present invention protects less data content than traditional methods and uses error correction codes, so that the data receiver can automatically detect and correct the original data content according to the extended SEC-DED code calculation within the data communication cycle of the current cycle, without having to wait for a new data cycle to determine whether the communication fault is mature, and the SEC-DED code can be generated and stored using the sender's memory controller hardware, which solves the problem of system hardware resource pressure caused by having to speed up the software operation cycle and calculate a large amount of data check codes due to the stringent fault tolerance time in some functions in the whole vehicle communication.
[0048] The in-vehicle communication software architecture of the present invention requires that the publisher of data conduct a full internal diagnosis before uploading the data, and explicitly express the safety integrity specified by ISO26262 in the communication protocol, so that the upper-level application developer can use its security concept to implement the safety integrity requirements of the upper-level application. Even, the developer of the upper-level application can select two signals from different sources to perform safety integrity decomposition of functional safety according to needs, so as to develop a function with a higher safety level.
[0049] A data update flag is defined in the vehicle communication software architecture and communication protocol of the present invention. The data protection protocol automatically updates the data according to the data publisher's behavior or can be customized according to the user configuration. The addition of a signal update flag can realize the existence of multiple possible data publishers in the network. These publishers can determine the data sending path according to the functional scenario, or define the sending path according to project requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a schematic diagram of the communication process failure;
[0051] Figure 2 It is a schematic diagram of the high-security vehicle communication software architecture of the present invention;
[0052] Figure 3 It is a structural diagram of security data and security control information;
[0053] Figure 4 It is a diagram of the security data / data group protection process of the sender;
[0054] Figure 5 It is a diagram of the receiver's security data / data group verification process;
[0055] Figure 6 It is a schematic diagram of the security protection scheme based on the data group level;
[0056] Figure 7 It is a schematic diagram of the dynamic changes in data security integrity;
[0057] Figure 8 This is a schematic diagram of the data update identification bit controlling the vehicle network communication. DETAILED DESCRIPTION
[0058] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of this application.
[0059] like Figure 2 As shown, the high-security in-vehicle communication software architecture described in the present invention is divided into a data aggregation layer, a data protection layer and a data communication layer. By performing data protection and extending additional information at the data sending end and using unified rules to verify data and extended information at the receiving end, high-functional safety protection at the in-vehicle communication system level is achieved, which is particularly suitable for in-vehicle central centralized communication architecture.
[0060] The vehicle communication sending end includes a data aggregation layer, a data protection layer and a data communication layer.
[0061] The data aggregation layer refers to the aggregation abstraction layer of bus data received from the software application unit of the vehicle controller system or the system through the physical communication interface. Its characteristic is that the data aggregation layer of a single vehicle control system can obtain all the original data / data groups accessible to the vehicle controller. Among them, some original data may be related to functional safety.
[0062] The data protection layer receives the original data / data group from the data convergence layer and adds security control information, which includes error correction code, data valid bit, data counter, data identity bit, data update flag and data security integrity flag inserted into the original data / data group. These control information data are added to the original data, packaged according to the predetermined data structure, and provided to the data communication layer at a fixed period.
[0063] The data packet sent by the data protection layer to the data communication layer may be a combination of a single original data and security control information (hereinafter referred to as security data), or it may be a collection of multiple original data and security control information (hereinafter referred to as security data group). For example, the door opening and closing status signal and the door lock locking status signal are often uniformly collected and controlled by the door control module in the electronic architecture, and are usually used in combination in functional applications. They can design relevant security data groups according to actual needs.
[0064] The data communication layer is responsible for packaging the safety data / safety data group and safety control information and non-safety data generated by the data protection layer according to established rules to form message data and send it to the corresponding bus. When the corresponding bus is CAN or FlexRay, the packetization sequence uses MSB (most significant bit first), and when on LIN / Ethernet, the packetization sequence uses LSB (least significant bit first).
[0065] The vehicle communication transmitting and receiving end includes a data aggregation layer, a data protection layer and a data communication layer.
[0066] The data communication layer is responsible for obtaining the required message data from the bus and unpacking the security data and non-security data according to the defined rules to obtain the security data / security data group and security control information.
[0067] The data protection layer performs security data verification on the security data / security data group and security control information uploaded by the data communication layer, including error correction code check, data valid bit check, data counter check, data identity bit check, data update flag check and data security integrity flag check. After the security data verification, the data protection layer will feedback the security data verification results and the security data / data group itself to the data convergence layer.
[0068] The data convergence layer receives the feedback of safety data verification results and safety data / data groups, and the software application unit can implement its own functional safety strategy based on the feedback verification results and actual functional safety requirements.
[0069] The data structure of security data and security control information is as follows: Figure 3 As shown, it includes Data[0], Data[1], Data[2], Data[3], and Data[4]. Data[0], Data[1], and Data[2] include security control information; Data[3] and Data[4] include security data. Data[0] includes an error correction code, a data update flag, and a data security integrity flag; Data[1] includes a data identity flag; and Data[2] includes a data counter, an error correction code, and a data validity bit.
[0070] The data check bit uses a 7-bit error correction code and adopts the (39, 32) SEC-DED error correction code generation method, which can automatically correct 1-bit errors in the protected data and detect data errors exceeding 1 bit. Since the length of the security control information is fixed, the maximum length of the original data / data group should not exceed 17 bits (when using data valid bits). The error correction code is inserted into the security data and control information content according to specific rules, occupying bits 0, 4, 6, and 7 of Data[0] and bits 1 to 3 of Data[2]. If the length of the original data / data group is less than 17 bits, the remaining position should be filled with 0xf. In particular, the data check bit can be generated, stored, and verified by the memory controller in the vehicle control chip, so that the overall communication performance is improved.
[0071] The data valid bit occupies the Data[2]bit0 position. You can choose whether to use it according to actual needs. If used, 0 is used to indicate that the corresponding safety data / data group is invalid due to internal fault, and 1 is used to indicate that it is valid. If the data valid bit is not used, this position can be used by the original data / data group.
[0072] The data counter occupies the Data[2] bit5 to bit7 positions and uses a 4-bit cyclic count identifier. For the first transmission request from the data sender, the data protection layer can initialize the data counter to 0 and increase it by 1 for each subsequent transmission request. When the data counter reaches 15 (0xF), the next transmission request from the receiver will restart from 0. By setting the maximum allowable lost data cycle and comparing the counter of the received data with the counter of the previously received data, the following situations can be detected: no new data is received; duplicate data is received; the counter is incremented by 1 in sequence (no data is lost); the counter is not incremented by 1, but is still within the allowed range (that is, some data is lost); the counter increases more than allowed (that is, too much data is lost).
[0073] The data identity bit occupies the Data[1] position and occupies 8 bits. The data identity identifier of each security data needs to be uniformly defined by the organization responsible for vehicle communication and statically assigned to the communicating parties sending and receiving security data. It is unique to the vehicle and is used to identify the correct data sender to avoid receiving false messages. When the security data is updated, the data identity bit should also be updated.
[0074] The data update flag occupies Data[0]bit5 position, occupies 1 bit, indicating whether the safety data or safety data group sent by the data sender has been updated. If the safety data or data group of the data sender has been updated, the data protection layer automatically sets the corresponding data update flag to 1, otherwise, resets the data update flag to 0. When receiving data at the receiving end, the data protection layer will first check the data update flag corresponding to the safety data or safety data group. If the data update flag is 0, the data or data group corresponding to the data update flag will be discarded. The addition of the data update flag can realize the existence of multiple possible data publishers in the network. These publishers can determine the data transmission path according to the functional scenario, or define the transmission path according to the project requirements. For example, in a communication system, there are two Sig1 publishers A and B and one Sig1 receiver C. After A's transmission behavior is disabled through the UB bit, there is no need to redefine the underlying communication interface, providing unified vehicle configuration.
[0075] The data safety integrity flag occupies Data[0] bit1 to bit3, which is 3 bits. 0x0 to 0x4 are used to represent the diagnostic integrity level QM, ASIL-A, ASIL-B, ASIL-C, and ASIL-D of the sent data or data group, respectively. Compared with the traditional top-down development process, if the plug-and-play electronic architecture design requirements are to be met, the sender of the signal cannot fully know the safety integrity level of the function ultimately formed by using its own signal, and thus performs corresponding functional safety protection according to fixed requirements.
[0076] The present invention designs a method for explicitly indicating the security integrity of the data sent by itself in the communication protocol. The publisher of the data identifies the functional safety integrity level that the data may reach according to its own functional safety implementation situation, and the functional safety compliance of the sender is guaranteed by a separate verification process. When the data security integrity of the sender of the data decreases due to possible sensor failure, self-functional degradation or partial functional exit, the sender can dynamically change the ASIL flag level in the data, for example, from ASIL B to QM. The receiver of the data can formulate certain functional safety strategies and form different functional processing strategies according to the security integrity of the received data. Compared with the traditional silent behavior of failure, this strategy can better meet the scenario requirements of failure-operable.
[0077] The sender's security data / data group protection process of the data protection layer is shown in Figure 4 As shown, the steps include:
[0078] (1) When a new data protection layer operation cycle is triggered, determine whether new data is obtained from the data aggregation layer. If no new data is obtained, set the data update flag bit to 0;
[0079] (2) If new data is obtained, determine whether the current counter is <15. If it is greater than 15, initialize the counter to 0;
[0080] (3) If the counter is less than 15, the counter is incremented by 1, and the data counter is written at Data[2] bit5 to bit7, then the data identity bit is written at Data[1], the data security integrity bit is written at Data[0] bit1 to bit3, and the data update flag is set to 1; where the data security integrity enumeration value is 0x0;
[0081] (4) Generate a 7-bit SEC-DED error correction code based on the 32-bit data content;
[0082] (5) Finally, send the security data / data group and security control information to the data communication layer.
[0083] The security data / data group verification process of the receiver of the data protection layer is shown in Figure 5 As shown, the steps include:
[0084] (1) Figure 5 As shown in a, the data protection layer performs security data verification on the security control information, first checking whether the data update flag is equal to 1. If it is not equal to 1, the output data verification result is that no new data is received;
[0085] (2) If the data update flag is equal to 1, determine whether the difference between the two counter values of the consecutively received valid messages is less than 15. If it is less than 15, the difference between the two counter values of the consecutively received valid messages is incremented;
[0086] (3) If it is greater than 15, select the corresponding data counter, select the corresponding data identity bit, and determine whether the SEC-DED code verification is correct. If it is wrong, output the data verification result as data corruption;
[0087] (4) If it is correct, determine whether safety data has been received since the system was initialized. If so, initialize the counter difference, update the counter value to the last received counter value, and output the status result as the verification program initialization;
[0088] (5) If not, calculate the difference between the previous and next counters. If the difference = 0, the output state result is data duplication; Figure 5 As shown in b;
[0089] (6) If the difference value = 1, the counter difference value is initialized, the counter value is updated to the last received counter value, and the output data verification result is a state where there is no data loss;
[0090] (7) If 1<difference<=n, the counter difference is initialized, the counter value is updated to the last received counter value, and the output data verification result is a state where the lost data is within the allowable range; wherein n is a configurable parameter, which is configured according to the customer's tolerance for data loss, and the configuration range is 2 to 14;
[0091] (8) If the difference value is greater than or equal to n, the counter difference value is initialized, and the counter value is updated to the last received counter value, and the output state result is data out of order.
[0092] When the output data verification result shows that there is no data loss, and the output data verification result shows that the lost data is within the allowable range; further determine whether the data security integrity has changed since the last cycle. If there is an ASIL Change Event, the output data verification result is normal.
[0093] The beneficial effect of the present invention is that, compared with the prior art, the vehicle communication software architecture of the present invention implements complete protection based on raw data or data groups rather than message frames. At this time, failures introduced in the unpacking and packaging process can be detected by the verification logic of the data receiver, which helps the data communication layer and gateway roles of the entire vehicle to perform the unpacking and packaging of signals with maximum performance, which not only helps to improve the performance of the data communication layer and gateway roles, but also helps to improve the flexibility of the vehicle communication architecture. Figure 6 shown.
[0094] The in-vehicle communication software architecture of the present invention protects less data content than traditional methods, and uses error correction codes to replace traditional running checksums, so that the data receiver can automatically detect and correct the original data content according to the extended SEC-DED code calculation within the data communication cycle of the current cycle, without having to wait for a new data cycle to determine whether the communication fault is mature, and the SEC-DED code can be generated and stored using the sender's memory controller hardware, which solves the problem of system hardware resource pressure caused by having to speed up the software running cycle and calculate a large number of data checksums due to the stringent fault tolerance time in some functions in the whole vehicle communication.
[0095] In the traditional development model, a safety-related subsystem will conduct safety integrity assessment based on itself, but it will not be disclosed at the signal level. However, in the future development model, the development with ECU as the smallest unit will gradually decrease, and more developers will participate in the development of software modules. At this time, explicitly characterizing the safety integrity of a signal / signal group will help users to better conduct safety assessments and formulate fault degradation strategies. Figure 7 As shown in the figure, if ECU A uses two redundant ASIL B inputs (with diversity), it completes the logic of high safety integrity and provides ASIL D safety signals for ECU C. When one of the inputs, input1, diagnoses a related fault and is insufficient to support the safety goal set by ECU A itself, the usual practice is to prohibit the output of Signal A or output invalid Signal A, which will cause a series of functions of the user's functions Modules C, D, and E to exit and become unavailable, even if the safety integrity requirements of Modules D and E are still within the supportable range.
[0096] The in-vehicle communication software architecture of the present invention requires that the publisher of data should conduct sufficient internal diagnosis before uploading the data, and explicitly express the safety integrity specified by ISO26262 in the communication protocol, so that upper-level application developers (especially in complex software architectures such as HPC) can use their security concepts to implement the safety integrity requirements of upper-level applications. Even, the developers of upper-level applications can select two signals from different sources to perform safety integrity decomposition of functional safety according to needs, so as to develop a function with a higher safety level.
[0097] The in-vehicle communication software architecture and communication protocol of the present invention define a data update flag, which is automatically updated by the data protection protocol according to the data publisher's behavior or can be customized according to the user configuration. The addition of the signal update flag can realize the existence of multiple possible data publishers in the network. These publishers can determine the data transmission path according to the functional scenario, or define the transmission path according to the project requirements. Figure 8 As shown, there are two publishers of the same data, A and B, and one receiver C in the communication system. After static configuration through the data update flag, there is no need to redefine the underlying communication interface, and the communication behavior in the vehicle network can be dynamically controlled, providing flexibility in communication design for the vehicle configuration.
[0098] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.
Claims
1. A highly secure in-vehicle communication software architecture, characterized in that: It includes data aggregation layer, data protection layer and data communication layer; the data aggregation layer at the sending end obtains all the original data / data groups that the vehicle controller can access; The data protection layer at the sending end receives the original data / data group from the data convergence layer and adds security control information, packages it according to the predetermined data structure to generate security data / security data group, and provides it to the data communication layer at the sending end at a fixed period; The data communication layer at the sending end is responsible for packaging the security data / security data group and security control information and non-security data generated by the data protection layer at the sending end according to the established rules, forming message data and sending it to the corresponding bus; The data communication layer at the receiving end obtains the message data from the bus and unpacks the security data and non-security data according to the defined rules to obtain the security data / security data group and security control information; The receiving end data protection layer performs security data verification on the security data / security data group and security control information uploaded by the data communication layer, and feeds back to the receiving end data convergence layer after the security data verification; The receiving end data convergence layer receives the feedback safety data verification results and safety data / data groups, and the software application unit implements its own functional safety strategy based on the feedback verification results and actual functional safety requirements; The security control information includes an error correction code, a data counter, a data valid bit, a data identity bit, a data update flag, and a data security integrity flag; The data structure of security data and security control information includes Data[0], Data[1], Data[2], Data[3], and Data[4]. Data[0], Data[1], and Data[2] are security control information; Data[3] and Data[4] are security data; The error correction code uses the SEC-DED error correction code generation method, occupying bits 0, 4, 6, and 7 of Data[0] and bits 1 to 3 of Data[2]. The remaining positions where the original data / data group length is less than 17 bits are filled with 0xf. The data valid bit occupies the Data[2] bit0 position. 0 indicates that the corresponding safety data / data group is invalid due to an internal fault, and 1 indicates that it is valid. The data counter occupies the Data[2] bit5~bit7 positions and uses a 4-bit loop count identifier, which increases by 1 for each send request. The data identity bit occupies the Data[1] position and is unique to the vehicle and is used to identify the correct data sender; The data update flag occupies the Data[0] bit 5 position, indicating whether the security data or security data group sent by the data sender is updated. If the security data or data group of the data sender is updated, the data protection layer automatically sets the corresponding data update flag to 1, otherwise, resets the data update flag to 0; The data security integrity flag occupies Data[0] bit1~bit3 positions, and uses 0x0~0x4 to represent the diagnostic integrity level of the data or data group being sent.
2. The high-security vehicle communication software architecture according to claim 1, characterized in that: The data aggregation layer receives bus data from the vehicle controller system software application unit or the system through the physical communication interface.
3. The high-security vehicle communication software architecture according to claim 1, characterized in that: The data packet sent by the data protection layer to the data communication layer is a combination of a single original data and security control information, or a collection of multiple original data and security control information.
4. The high-security vehicle communication software architecture according to claim 1, characterized in that: When the bus is CAN or FlexRay, the packet bit order uses MSB, while on LIN / Ethernet, the packet bit order uses LSB.
5. The high-security vehicle communication software architecture according to claim 1, characterized in that: The sender's secure data / data group protection process of the data protection layer includes the following steps: (1) When a new data protection layer operation cycle is triggered, determine whether new data is obtained from the data aggregation layer. If no new data is obtained, set the data update flag = 0; (2) If new data is obtained, determine whether the current counter is <15. If it is greater than 15, initialize the counter to 0; (3) If the counter is less than 15, the counter is incremented by 1, and the data counter is written at Data[2] bit5~bit7, then the data identity bit is written at Data[1], the data security integrity bit is written at Data[0] bit1~bit3, and the data update flag is set to 1; (4) Generate a 7-bit SEC-DED error correction code based on the 32-bit data content; (5) Finally, send the security data / data group and security control information to the data communication layer.
6. The high-security vehicle communication software architecture according to claim 1, characterized in that: The process of verifying the security data / data group of the receiver of the data protection layer includes the following steps: (1) The data protection layer performs security data verification on the security control information. First, it checks whether the data update flag is equal to 1. If it is not equal to 1, the output data verification result is that no new data has been received; (2) If the data update flag is equal to 1, determine whether the difference between the two counter values of the consecutively received valid messages is less than 15. If it is less than 15, the difference between the two counter values of the consecutively received valid messages is incremented; (3) If it is greater than 15, select the corresponding data counter, select the corresponding data identity bit, and determine whether the SEC-DED code verification is correct. If it is wrong, output the data verification result as data corruption; (4) If correct, determine whether safety data has been received since the system was initialized. If so, initialize the counter difference, update the counter value to the last received counter value, and output the status result as the verification program initialization; (5) If not, calculate the difference between the previous and next counters. If the difference = 0, the output state result is data duplication; (6) If the difference value = 1, the counter difference value is initialized, the counter value is updated to the last received counter value, and the output data verification result is a state where there is no data loss; (7) If 1<difference<=n, the counter difference is initialized, the counter value is updated to the last received counter value, and the output data check result is the state where the lost data is within the allowable range; where n is a configurable parameter; (8) If the difference value >= n, the counter difference value is initialized, and the counter value is updated to the last received counter value. The output state result is data out of order.
7. The high-security vehicle communication software architecture according to claim 6, characterized in that: When the output data verification result shows that there is no data loss, and the output data verification result shows that the lost data is within the allowable range; further determine whether the data security integrity has changed since the last cycle. If there is an ASIL Change Event, the output data verification result is normal.
Citation Information
Patent Citations
End-to-end verification method and system for CAN bus security data
CN112003773A
Secure communication method of digital rail vehicle-mounted navigation controller based on CAN (Controller Area Network)
CN117528523A
