Data transmission optimization method, system and device based on intelligent cabin

CN121680907APending Publication Date: 2026-03-17CHINA FAW CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511782870.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-30
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing intelligent cockpit domain controllers, signal configuration information is highly coupled with driver layer code, which prevents the signal configuration from being updated independently and dynamically, severely limiting the flexibility and development efficiency of function iteration.

Method used

Signal configuration information is defined through a configuration file. When the system starts up, the configuration file is parsed and a runtime signal mapping table is formed. Only signals that the application layer subscribes to are loaded. Combined with a differentiated transmission optimization strategy, dynamic updates and on-demand loading of signals are achieved.

Benefits of technology

Dynamic updates to signal configurations were implemented, reducing the amount of redundant signals uploaded in uplink data, lowering the data processing load of the application layer and the system bus bandwidth usage, and meeting the requirements of intelligent cockpits for high real-time performance and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121680907A_ABST
    Figure CN121680907A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission optimization method, system and device based on an intelligent cockpit, and relates to the technical field of intelligent cockpit systems.The method comprises the following steps that configuration information of all signals is defined in advance through a configuration file, the configuration information comprises a signal category, a signal unique identifier, a message identifier, a start bit of a signal in a message, a signal length and a transmission direction; when the system is started, analyzing the configuration file, and only loading a signal required by subscription of an application layer; receiving an uplink data packet sent by the microcontroller unit through the bus; extracting signals belonging to the runtime signal mapping table; a signal category is predefined in the configuration file according to each signal. According to the method, the signal category and the application layer subscription mark are set in the configuration file, and a mechanism that only the subscription signal is loaded to form the runtime signal mapping table when the system is started is combined, so that the technical problem that a driver layer code needs to be recompiled every time the signal is changed in a traditional hard coding mode is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent cockpit systems, and in particular to a data transmission optimization method, system and device based on an intelligent cockpit. BACKGROUND

[0002] With the rapid development of new energy vehicles and intelligent networked vehicles, intelligent cockpits have become one of the core domain controllers of the vehicle electronic and electrical architecture. The intelligent cockpit domain controller usually adopts a hardware architecture in which a heterogeneous multi-core system-on-chip (SoC) and a microcontroller unit (MCU) work together, wherein the SoC is responsible for running the operating system and application layer software, and the MCU is responsible for direct interaction with the vehicle CAN / LIN network, and all external signals are collected by the MCU and then forwarded to the driver layer of the SoC through a high-speed SPI bus for analysis and distribution.

[0003] In the prior art, the intelligent cockpit domain controller generally implements signal analysis and distribution in a hard-coded manner, that is, the message identifier, starting bit, length, scale factor and other configuration information of each signal are fixedly defined in the source code of the SoC driver layer in the form of an array or a switch-case structure. When new instrument display requirements, entertainment function requirements or diagnostic function requirements result in changes in the signal matrix, the driver layer source code must be modified and the entire driver image must be recompiled and flashed.

[0004] The present application inventors found at least the following technical problems in the process of implementing the above-mentioned hard-coded signal configuration scheme: the signal configuration information is highly coupled with the driver layer code, resulting in the need to recompile and flash the driver layer code for any addition, deletion or parameter adjustment of signals, which cannot achieve independent dynamic updating of signal configuration, thereby seriously limiting the flexibility and development efficiency of intelligent cockpit function iteration. SUMMARY

[0005] The purpose of the present application is to provide a data transmission optimization method, system and device based on an intelligent cockpit, which at least solves the problem of high coupling between signal configuration information and driver layer code, which cannot achieve independent dynamic updating of signal configuration.

[0006] The present application provides the following scheme:

[0007] According to one aspect of the present application, a data transmission optimization method based on an intelligent cockpit is provided, comprising the following steps:

[0008] Defining the configuration information of all signals in advance through a configuration file, wherein the configuration information includes signal category, signal unique identifier, message identifier, starting bit of the signal in the message, signal length and transmission direction;

[0009] When the system starts, it parses the configuration file and loads only the signals that the application layer needs to subscribe to, forming a runtime signal mapping table.

[0010] Receive uplink data packets sent by the microcontroller unit (MCU) via the SPI bus;

[0011] Each frame of the uplink data packet is parsed to extract the signals belonging to the runtime signal mapping table;

[0012] Based on the signal category predefined in the configuration file for each signal, the corresponding transmission optimization strategy is executed to determine whether to upload the signal value to the application layer.

[0013] The signal categories include interactive CAN signals, reporting information CAN signals, non-CAN signals, and full-frame transparent CAN signals.

[0014] Furthermore, the step of determining whether to upload the signal value to the application layer after executing the corresponding transmission optimization strategy according to the signal category predefined in the configuration file for each signal is as follows:

[0015] When the signal type is an interactive CAN signal or a non-CAN signal, the current value of the signal is directly uploaded to the application layer;

[0016] When the signal type is a CAN signal for reporting information, the current physical value will be uploaded to the application layer and the previously uploaded physical value and time will be updated only when the current physical value of the signal changes relative to the last successfully uploaded physical value or when the time since the last upload exceeds the preset maximum reporting period.

[0017] When the signal type is a full-frame transparent CAN signal, the current full CAN message will only be uploaded to the application layer and the data load and time of the last uploaded message will be updated if the data load of the current full CAN message changes by any byte relative to the data load of the last successfully uploaded full CAN message, or if the time since the last upload exceeds the preset maximum forced upload period.

[0018] Furthermore, the steps of pre-defining the configuration information of all signals through a configuration file and parsing the configuration file during system startup are as follows:

[0019] The configuration file is stored in text format, with configuration items separated by delimiters. Each line corresponds to one signal configuration. When the system starts, it reads the configuration file line by line in read-only mode. After splitting the fields by delimiters, only the lines with the application layer subscription flag set to 1 are parsed.

[0020] Furthermore, the step of loading only signals with application layer subscription requirements to form a runtime signal mapping table specifically involves:

[0021] During the parsing of the configuration file, the application layer subscription flag field in each line of configuration information is read. Only when the flag field is 1 will the corresponding signal category, signal unique identifier, message identifier, signal start bit in the message, signal length, transmission direction, and deduplication status storage area be allocated to the runtime signal mapping table.

[0022] Furthermore, the definition and usage of the unique signal identifier are as follows:

[0023] When generating the configuration file, decimal integers are assigned as unique identifiers for signals, starting from the lexicographical order of the signal names. When forming the runtime signal mapping table, these unique identifiers are used as the keys of the hash table. In subsequent signal extraction and uploading processes, these unique identifiers are used as the unique indexes of signals between the application layer and the driver layer.

[0024] Furthermore, the specific steps for parsing each frame of the uplink data packet and extracting signals belonging to the runtime signal mapping table are as follows:

[0025] Upon receiving an uplink data packet, the message identifier of each frame within the packet is read sequentially. The message identifier is used to perform a lookup in the runtime signal mapping table. If the lookup is successful, all signal entries associated with the message identifier are traversed. The original bit values ​​are extracted from the 8-byte data payload of the frame according to the start bit and signal length of each signal in the message, and the physical value conversion is completed immediately.

[0026] Secondly, a data transmission optimization system based on a smart cockpit includes:

[0027] The configuration file storage module is used to store the configuration information of all predefined signals. The configuration information includes at least the signal type, signal unique identifier, message identifier, the start bit of the signal in the message, the signal length, and the transmission direction.

[0028] The configuration loading module is used to parse the configuration file when the system starts up, and only load signals that have application layer subscription requirements to form a runtime signal mapping table;

[0029] The uplink data receiving module is used to receive uplink data packets sent by the microcontroller unit (MCU) via the SPI bus;

[0030] The signal parsing module is used to parse each frame of the uplink data packet and extract the signals belonging to the runtime signal mapping table;

[0031] The differentiated transmission optimization module is used to execute the corresponding transmission optimization strategy according to the predefined signal category of each signal and then decide whether to upload it to the application layer. The signal categories include interactive CAN signals, reporting information CAN signals, non-CAN signals and full-frame transparent transmission CAN signals.

[0032] Specifically, the differentiated transmission optimization module performs direct uploading for interactive CAN signals and non-CAN signals, performs deduplication uploading based on value change detection and the longest uploading period for reporting information CAN signals, and performs deduplication uploading based on whole-frame transparent transmission CAN signals based on whole-frame content comparison and the longest forced uploading period.

[0033] Furthermore, the configuration file storage module, configuration loading module, uplink data receiving module, signal parsing module, and differentiated transmission optimization module are all implemented in the same driver layer signal processing module of the chip in the form of functions. This driver layer signal processing module runs in the chip kernel mode as a QNX resource manager process, and the five modules interact directly through a shared runtime signal mapping table.

[0034] Furthermore, the configuration file storage module is fixed to a plain text file in the read-only partition of the system-on-chip, with configuration items separated by a single comma. During the initialization phase of the driver layer signal processing module, the configuration loading module reads the data line by line in read-only mode and splits the fields according to the delimiter. Only the lines with the application layer subscription flag field set to 1 are allocated a structure and inserted into the runtime signal mapping table.

[0035] Thirdly, a data transmission optimization device based on a smart cockpit includes a chip and a microcontroller unit, wherein the chip and the microcontroller unit are connected via an SPI bus, and the chip is provided with a driver layer signal processing module.

[0036] The above solution achieves the following beneficial technical effects:

[0037] This invention achieves dynamic updating and on-demand loading of signal configuration by setting signal categories and application layer subscription flags in the configuration file, combined with a mechanism that loads only subscribed signals to form a runtime signal mapping table at system startup. This avoids the technical problem of having to recompile the driver layer code every time a signal changes under the traditional hard-coding method, and shortens the development cycle.

[0038] This invention effectively reduces the amount of redundant signals uploaded in uplink data by employing a deduplication strategy based on value change detection and the longest reporting period for CAN signals reporting information, and a deduplication strategy based on byte-by-byte comparison and the longest forced upload period for CAN signals transmitting entire frames. This reduces the data processing load of the application layer and the system bus bandwidth usage.

[0039] This invention achieves real-time and stable transmission of uplink signals without increasing hardware costs by centrally deploying all optimized logic in the driver layer signal processing module and combining it with SPI high-speed interconnect and runtime signal mapping table, thus meeting the requirements of intelligent cockpit domain controllers for high real-time performance and reliability. Attached Figure Description

[0040] Figure 1 This is a flowchart of a data transmission optimization method based on a smart cockpit.

[0041] Figure 2 This is a framework diagram of a data transmission optimization system based on a smart cockpit. Detailed Implementation

[0042] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] Example 1

[0044] Please refer to Figure 1 A data transmission optimization method based on a smart cockpit includes the following steps:

[0045] All signal configuration information is predefined through a configuration file. The configuration information includes signal type, unique signal identifier, message identifier, start bit of the signal in the message, signal length, and transmission direction.

[0046] When the system starts, it parses the configuration file and loads only the signals that the application layer needs to subscribe to, forming a runtime signal mapping table.

[0047] Receive uplink data packets sent by the microcontroller unit (MCU) via the SPI bus;

[0048] Parse each frame of the uplink data packet and extract the signals belonging to the runtime signal mapping table;

[0049] Based on the signal category predefined in the configuration file for each signal, the corresponding transmission optimization strategy is executed to determine whether to upload the signal value to the application layer.

[0050] The signal categories include interactive CAN signals, information reporting CAN signals, non-CAN signals, and full-frame transparent CAN signals.

[0051] Specifically, the method in this embodiment includes the following steps:

[0052] First, the configuration information for all signals is predefined using a configuration file. This file is named `signal_info.conf` and is stored in plain text format, with fields separated by commas. Each line corresponds to the complete configuration information for one signal, and the field order is fixed as follows: signal type, signal name, signal unique identifier, message identifier, data type, signal length, start bit of the signal in the message, transmission direction, and application layer subscription flag.

[0053] Signal category occupies 2 bytes, and the values ​​are as follows:

[0054] The interactive CAN signal is 0x0A.

[0055] The reported information type CAN signal is 0x0B.

[0056] Non-CAN signals are 0x0C.

[0057] The full-frame transparent CAN signal is 0x0D.

[0058] Each signal identifier occupies 4 bytes and is allocated sequentially from 1 according to the lexicographical order of the signal name, ensuring global uniqueness.

[0059] The application layer subscription flag occupies 1 byte. A value of 1 indicates that the signal has an application layer subscription, and a value of 0 indicates that there is no subscription.

[0060] When the system starts, the driver-layer signal processing module reads and parses the signal_info.conf file, loading only the signal entries with the application-layer subscription flag set to 1 into the runtime signal mapping table. The runtime signal mapping table stores the corresponding complete configuration information using the unique identifier of the signal as the key.

[0061] The driver layer signal processing module receives uplink data packets sent by the MCU via the SPI bus. The uplink data packets contain several complete CAN frames, each containing an 8-byte data payload and a message identifier.

[0062] The driver layer signal processing module traverses each frame of the uplink data packet, searching for a matching signal entry in the runtime signal mapping table based on the message identifier. For each matching signal entry, the raw bit value is extracted from the 8-byte data payload according to its signal length and the start bit of the signal in the message.

[0063] The formula for converting raw bit values ​​to physical values ​​is as follows:

[0064] When the data type is an unsigned integer

[0065] ;

[0066] in, For physical values, For the extracted raw unsigned integer values, As a scaling factor, This is the offset. Scale and Offset are defined in the extended fields of the configuration file, and default to 1.0 and 0.0 respectively.

[0067] When the data type is a signed integer

[0068] if ,but ;

[0069] if ≥ ,but Where L is the signal length.

[0070] When the data type is a floating-point number, the corresponding 4-byte or 8-byte memory content is directly interpreted as an IEEE 754 floating-point number.

[0071] Physical values ​​obtained from the conversion Alternatively, the original 8-byte data payload can be processed according to the signal category of the signal, and then processed using the corresponding transmission optimization strategy.

[0072] When the signal type is an interactive CAN signal or a non-CAN signal, directly use the current physical value. It is uploaded to the application layer along with the unique identifier of the signal.

[0073] When the signal type is a CAN signal for reporting information, the following judgment is performed:

[0074] Read the physical value of the signal during the last successful upload. and timestamp .

[0075] Calculate the current timestamp and difference.

[0076] if ,or Then the current Upload the signal's unique identifier to the application layer, and update simultaneously. , .

[0077] in, The minimum change threshold preset for this signal. The maximum reporting period preset for this signal.

[0078] When the signal type is a full-frame transparent CAN signal, the following judgment is performed:

[0079] Compare the current 8-byte data payload with the 8-byte data payload of the last successful upload, byte by byte.

[0080] If any bytes are different, or the current timestamp Compared to the last upload timestamp The difference is greater than If so, the complete 8-byte data payload along with the message identifier is uploaded to the application layer, while the current 8-byte data payload is saved as a reference for the next comparison and updated. .

[0081] The above steps complete the processing of all uplink data packets. After processing, the driver layer signal processing module continues to wait for the next uplink data packet.

[0082] The method in this embodiment is implemented in the intelligent cockpit domain controller, and the driver layer signal processing module is located in the QNX system driver layer of the SoC. The runtime signal mapping table is stored using a hash table structure, and the deduplication status information of all signals is saved in the SoC memory along with the table entries.

[0083] In this embodiment, the specific steps for determining whether to upload the signal value to the application layer after executing the corresponding transmission optimization strategy according to the predefined signal category of each signal in the configuration file are as follows:

[0084] When the signal type is an interactive CAN signal or a non-CAN signal, the current value of the signal is directly uploaded to the application layer;

[0085] When the signal type is a CAN signal for reporting information, the current physical value will be uploaded to the application layer and the previously uploaded physical value and time will be updated only when the current physical value of the signal changes relative to the last successfully uploaded physical value or when the time since the last upload exceeds the preset maximum reporting period.

[0086] When the signal type is a full-frame transparent CAN signal, the current full CAN message will only be uploaded to the application layer and the data load and time of the last uploaded message will be updated if the data load of the current full CAN message changes by any byte relative to the data load of the last successfully uploaded full CAN message, or if the time since the last upload exceeds the preset maximum forced upload period.

[0087] Specifically, in this embodiment, the step of deciding whether to upload the signal value to the application layer after executing the corresponding transmission optimization strategy according to the predefined signal category of each signal in the configuration file is as follows:

[0088] After completing the raw bit extraction and physical value conversion of each signal, the driver layer signal processing module immediately reads the signal category field stored in the signal entry and enters the corresponding processing branch according to the value of the field.

[0089] When the signal type is an interactive CAN signal, the driver layer signal processing module directly constructs a signal containing a unique identifier and the current physical value. The data structure is sent to the application layer through a pre-registered callback function interface. This type of signal includes request / response messages such as air conditioner on / off responses, volume up / down responses, and charging reservation confirmation responses.

[0090] When the signal type is not a CAN signal, the processing method is exactly the same as for interactive CAN signals, directly uploading the current physical value. This type of signal originates from hard-wired levels, LIN bus, or proprietary protocols, including ignition switch status, ambient light level commands, seat heating status, etc.

[0091] When the signal type is a CAN signal for reporting information, the driver layer signal processing module first reads the following four fields from the extended area of ​​the entry in the runtime signal mapping table:

[0092] The last successfully uploaded physical value, a 4-byte or 8-byte floating-point number;

[0093] : The timestamp of the last successful upload, 8 bytes;

[0094] Minimum change threshold, 4-byte floating-point number, default value is 0.0;

[0095] : Maximum reporting period, 4-byte integer, default value is 1000.

[0096] The following comparison operation is then performed:

[0097] Calculate the absolute value of the difference in physical values .

[0098] Calculate the time difference ,in, It is directly provided by the SoC's high-precision clock.

[0099] if > or > If established, immediately construct a system containing a unique signal identifier and... The data structure is uploaded to the application layer, and at the same time... Write ,Will Write If neither of the two conditions is met, then discard this attempt. No upload operation will be performed.

[0100] Typical signals include:

[0101] Vehicle speed signal;

[0102] Motor speed;

[0103] Battery SOC.

[0104] When the signal type is a full-frame transparent CAN signal, the driver layer signal processing module reads the following fields from the extended area of ​​this entry in the runtime signal mapping table:

[0105] Frame_last[8]: The 8-byte data payload of the last successfully uploaded data;

[0106] : The timestamp of the last successful upload, 8 bytes;

[0107] : Maximum forced upload period, 4-byte integer, default value is 10000.

[0108] Then perform the following operations:

[0109] Compare the 8-byte data payload of the current CAN frame with Frame_last[8] byte by byte.

[0110] Calculate the time difference .

[0111] If any one of the 8 bytes is different, or > Then, a data structure containing the message identifier and the complete 8-byte data payload is constructed and uploaded to the application layer. At the same time, the current 8 bytes are copied to overwrite Frame_last[8], and the data structure containing the message identifier and the complete 8-byte data payload is uploaded to the application layer. Write If neither of the two conditions is met, the current entire message frame is discarded.

[0112] Typical signals include:

[0113] Diagnostic request and response message series;

[0114] Gateway status message;

[0115] Calibration uses extended frame messages.

[0116] After the above four branches are processed, the driver layer signal processing module continues to process the next signal in the uplink data packet until the entire data packet is processed. All deduplication status information is resident in the SoC memory along with the runtime signal mapping table and remains valid until the system loses power.

[0117] In this embodiment, the steps of pre-defining the configuration information of all signals through a configuration file and parsing the configuration file during system startup are as follows:

[0118] The configuration file is stored in text format, with configuration items separated by delimiters. Each line corresponds to one signal configuration. When the system starts, it reads the configuration file line by line in read-only mode. After splitting the fields by delimiters, only the lines with the application layer subscription flag of 1 are parsed.

[0119] The specific steps for forming a runtime signal mapping table, which only loads signals that have application-layer subscription requirements, are as follows:

[0120] During the parsing of the configuration file, the application layer subscription flag field in each line of configuration information is read. Only when the value of the flag field is 1 will the corresponding signal category, signal unique identifier, message identifier, signal start bit in the message, signal length, transmission direction, and deduplication status storage area be allocated to the runtime signal mapping table.

[0121] The definition and usage of a signal's unique identifier are as follows:

[0122] When generating the configuration file, decimal integers are assigned as unique identifiers for signals, starting from the lexicographical order of the signal names. When forming the runtime signal mapping table, this unique identifier is used as the key of the hash table. In the subsequent signal extraction and uploading process, this unique identifier is used as the unique index of signals between the application layer and the driver layer.

[0123] The specific steps for parsing each frame of the uplink data packet and extracting the signals belonging to the runtime signal mapping table are as follows:

[0124] Upon receiving an uplink data packet, the message identifier of each frame within the packet is read sequentially. The message identifier is used to perform a lookup in the runtime signal mapping table. If the lookup is successful, all signal entries associated with the message identifier are traversed. The original bit values ​​are extracted from the 8-byte data payload of the frame according to the start bit and signal length of each signal in the message, and the physical value conversion is completed immediately.

[0125] Specifically, the configuration file is named signal_info.conf and is located in the / boot / config directory of the SoC file system. The file uses UTF-8 encoding, and each line corresponds to the complete configuration information of one signal, with each line separated by a newline character. Each line contains 10 fields, with the field order fixed and the fields separated by a single comma, without spaces.

[0126] The field is defined as follows:

[0127] Signal type: 2-byte hexadecimal number, with values ​​of 0x0A, 0x0B, 0x0C, or 0x0D.

[0128] Signal name: string, maximum 256 bytes, supports English letters, numbers and underscores.

[0129] Unique signal identifier: a decimal integer, automatically generated and filled in by an external tool according to the lexicographical order of the signal name.

[0130] Message identifier: 8-bit hexadecimal number, fill in 0xFFFFFFFF for non-CAN signals.

[0131] Data type: String, with a value of one of uint8, uint16, uint32, int32, or float32.

[0132] Signal length: Decimal integer, unit: bit, value: 1-64.

[0133] The starting bit of the signal in the message: a decimal integer, counting from 0, with the least significant bit taking precedence.

[0134] Transmission direction: string, value can be up or down.

[0135] Application layer subscription flag: a decimal integer, with a value of 1 or 0.

[0136] Extended parameter field: Reserved for storing... , Parameters such as Scale and Offset are allowed, and multiple parameters are separated by semicolons. If a parameter is not currently used, fill in the blank.

[0137] After system startup, the driver layer signal processing module calls the configuration loading function during the initialization phase. This function first opens the signal_info.conf file in read-only mode and reads it line by line. Each line is first separated into 10 substrings by commas. The 9th field is compared numerically, and processing continues only if the field equals 1.

[0138] For a row that satisfies the subscription flag of 1, the module performs the following operation:

[0139] First, the third field is converted into a 32-bit unsigned integer as a unique identifier for the signal.

[0140] Then the first field is converted to a 16-bit unsigned integer as the signal category.

[0141] Next, convert fields 4 through 8 into their corresponding 32-bit or 16-bit integers.

[0142] Finally, the 10th field is further split by a semicolon, and the extended parameters are extracted and written into the entry extension area.

[0143] After parsing all fields, the entire signal configuration is inserted into the runtime signal map table as a structure. The runtime signal map table is implemented using Googledense_hash_map, with the unique identifier of the signal as the key.

[0144] When adding or deleting signal requirements during project development, simply modify the 9th field of the corresponding line in the signal_info.conf file to 1 or 0, or directly add or delete lines; there is no need to recompile the driver layer signal processing module code. The modified configuration file will automatically take effect after the next system restart.

[0145] Example 2

[0146] Please refer to the attached document. Figure 2 A data transmission optimization system based on a smart cockpit, comprising:

[0147] The configuration file storage module is used to store the configuration information of all predefined signals. The configuration information includes at least the signal type, signal unique identifier, message identifier, the start bit of the signal in the message, the signal length, and the transmission direction.

[0148] The configuration loading module is used to parse the configuration file when the system starts up, and only load signals that the application layer needs to subscribe to, forming a runtime signal mapping table;

[0149] The uplink data receiving module is used to receive uplink data packets sent by the microcontroller unit (MCU) via the SPI bus;

[0150] The signal parsing module is used to parse each frame of the uplink data packet and extract the signals that belong to the runtime signal mapping table;

[0151] The differentiated transmission optimization module is used to execute the corresponding transmission optimization strategy according to the predefined signal category of each signal and then decide whether to upload it to the application layer. The signal categories include interactive CAN signals, reporting information CAN signals, non-CAN signals and full-frame transparent transmission CAN signals.

[0152] Among them, the differentiated transmission optimization module performs direct upload for interactive CAN signals and non-CAN signals, performs deduplication upload based on value change detection and the longest reporting period for CAN signals reporting information, and performs deduplication upload based on whole frame content comparison and the longest forced upload period for CAN signals transmitting the entire frame.

[0153] Specifically, the configuration file storage module is implemented as a read-only partition in the SoC root file system, with a fixed storage path of / boot / config / signal_info.conf, and is a plain text file encoded in UTF-8. Each line of the file contains 10 comma-separated fields, and the field order is exactly the same as in Example 1. The configuration file storage module keeps the file handle open after the system powers on, providing a line-by-line reading interface for the configuration loading module to call.

[0154] The configuration loading module executes during the QNX operating system driver initialization phase of the SoC. This module first opens the file handle provided by the configuration file storage module, reads line by line, and splits it into 10 substrings. It performs an integer comparison on the 9th field of each line; only if the field is 1, it allocates a `SignalEntry_t` structure instance, fills the corresponding members with the 10 fields, and then inserts it into the runtime signal map table using the unique signal identifier as the key. The runtime signal map table is implemented using `Googledense_hash_map`, with keys of type `uint32_t` and value types of `SignalEntry_t` pointers, an initial capacity of 4096, and a load factor of 0.7. After loading is complete, the configuration loading module closes the file handle and releases the temporary buffer.

[0155] The uplink data receiving module is implemented through an interrupt service routine registered via the SPI slave driver. After the MCU completes the acquisition of a batch of CAN frames, it encapsulates up to 64 frames into a single SPI uplink data packet and transmits it to the SoC via SPIDMA. Within the interrupt service routine, the uplink data receiving module copies the complete data packet to a circular buffer and sends an event notification to the signal parsing module.

[0156] The signal parsing module runs in a separate worker thread, continuously retrieving uplink data packets from the circular buffer. For each frame within a data packet, it first extracts a 4-byte message identifier and performs a lookup operation in the runtime signal mapping table. If the lookup is successful, it iterates through all signal entries associated with that message identifier, extracting the raw bit values ​​from the 8-byte data payload sequentially according to the start bit and signal length. Then, it calls a unified physical value conversion function to obtain the final signal value. Alternatively, the original 8-byte payload can be retained directly.

[0157] The differential transmission optimization module and the signal parsing module execute serially on the same thread. For each extracted and converted signal, the following branch is executed immediately:

[0158] Branch 1: Directly call the pre-registered signal callback function at the application layer and push a 32-byte data structure containing the unique identifier of the signal and the current physical value to the application layer message queue.

[0159] Branch 2: Read from the SignalEntry_t structure , , , Four members. Get the current timestamp. Then, floating-point absolute value comparison and 64-bit integer time difference comparison are performed sequentially. If either condition is met, the same callback function is invoked to upload the data, and a write-back is performed in-place. , If none of the conditions are met, the operation will be returned directly without any upload operation.

[0160] Branch 3: Read Frame_last[8] and from the SignalEntry_t structure , Member. Perform 8 byte comparisons with Frame_last[8] for the current 8-byte payload, or calculate... If any byte is different or a timeout occurs, a dedicated full-frame upload callback function is invoked, and an 8-byte memory copy is performed to update Frame_last and update... If none of the conditions are met, return directly.

[0161] All five modules are compiled into the SoC driver image using static linking and run in the resource manager process with a priority of 25. The runtime signal mapping table and all SignalEntry_t instances reside in the SoC's DDR4 memory until the system is shut down.

[0162] In this embodiment, the configuration file storage module, configuration loading module, uplink data receiving module, signal parsing module, and differentiated transmission optimization module are all implemented in the same driver layer signal processing module of the chip in the form of functions. The driver layer signal processing module runs in the chip kernel mode as a QNX resource manager process, and the five modules interact directly through a shared runtime signal mapping table.

[0163] The configuration file storage module is fixed to a plain text file in the read-only partition of the system-on-chip. Configuration items are separated by a single comma. During the initialization phase of the driver layer signal processing module, the configuration loading module reads the data line by line in read-only mode and splits the fields by the delimiter. Only the lines with the application layer subscription flag field set to 1 are allocated a structure and inserted into the runtime signal mapping table.

[0164] Specifically, the driver-layer signal processing module runs as a resource manager process under the QNX operating system, named devg-spm.so, and is statically linked to the SoC's root file system image. The SPM process is started by the QNX system initialization script with priority 25 after the SoC powers on, and exclusively occupies a 512MB contiguous physical memory area for runtime signal mapping tables and circular buffers.

[0165] All five functional modules are implemented as C language function groups in the same source file, spm_core.c. Internal registration is completed during SPM process initialization via a function pointer table, eliminating cross-process communication overhead. The configuration file storage module corresponds to the global read-only file handle g_config_fd in the source code, which is fixed to the path / boot / config / signal_info.conf. This file is written to the read-only partition during SoC factory flashing and cannot be modified during runtime.

[0166] The configuration loading module executes during the InitPhase2 phase of the SPM process, calling the standard C library functions open(), read(), and strtok_r() to perform line-by-line parsing. During parsing, a 1024-byte temporary buffer on the stack is used to store the content of each line, and sscanf() is used to convert each field to its corresponding integer or floating-point number. Only when the application-layer subscription flag field is equal to 1, kmalloc() is called to allocate a fixed-size 248-byte SignalEntry_t structure from the previously pre-allocated 512MB memory pool, and it is inserted into the runtime signal map table using dense_hash_map_insert(). The entire loading process is completed within 850ms after SoC startup.

[0167] The uplink data receiving module directly writes data to the starting address 0xA2000000 of the pre-mapped circular buffer of the SPM process via the ISR driven by the SPI slave, supporting the simultaneous storage of up to 64 uplink data packets. After writing, a pulse code is sent to the SPM main thread via QNXMsgSendPulse(), triggering the wake-up of the signal parsing module and the differential transmission optimization module.

[0168] The signal parsing module and the differential transmission optimization module execute sequentially within an infinite loop of the SPM main thread. Each time a complete uplink data packet is retrieved from the circular buffer, the parsing and optimization process begins immediately. The two modules operate without lock synchronization, and all operations are completed within the same thread context.

[0169] When adding or deleting signal subscriptions, developers only need to edit the `signal_info.conf` file on their PC, changing the 9th field of the corresponding line to 1 or 0, and then overwrite the new file to the ` / boot / config` directory of the SoC via OTA or USB flashing. After the SoC restarts, the SPM process automatically re-executes the configuration loading module in the InitPhase2 phase to rebuild the runtime signal mapping table. The entire process does not require recompiling or flashing the SPM executable code.

[0170] Example 3

[0171] A data transmission optimization device based on a smart cockpit includes a chip and a microcontroller unit. The chip and the microcontroller unit are connected via an SPI bus. The chip has a driver layer signal processing module, which is used to implement a data transmission optimization method based on a smart cockpit.

[0172] Example 4

[0173] In the fourth embodiment of the present invention, based on the same inventive concept, the present invention proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the image recognition method of the above embodiments.

[0174] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for data transmission optimization based on an intelligent cockpit, characterized in that, The method comprises the following steps: Defining configuration information of all signals in advance through a configuration file, the configuration information including signal category, signal unique identifier, message identifier, starting bit of signal in message, signal length, and transmission direction; Analyzing the configuration file when the system starts, loading only signals with application layer subscription demand to form a runtime signal mapping table; Receiving an uplink data packet sent by a micro controller unit (MCU) through a SPI bus; Analyzing each frame of message in the uplink data packet to extract signals belonging to the runtime signal mapping table; Deciding whether to upload the signal value to the application layer after performing corresponding transmission optimization strategy according to the signal category of each signal predefined in the configuration file; The signal category includes interactive CAN signal, information reporting CAN signal, non-CAN signal, and whole frame transparent CAN signal.

2. The data transmission optimization method based on the intelligent cockpit according to claim 1, characterized in that, The step of deciding whether to upload the signal value to the application layer after performing corresponding transmission optimization strategy according to the signal category of each signal predefined in the configuration file is specifically: When the signal category is interactive CAN signal or non-CAN signal, the current value of the signal is directly uploaded to the application layer; When the signal category is information reporting CAN signal, the current physical value is uploaded to the application layer and the last uploaded physical value and time are updated only when the current physical value changes relative to the last successfully uploaded physical value or the time since the last upload exceeds a preset longest reporting period; When the signal category is whole frame transparent CAN signal, the current complete message is uploaded to the application layer and the last uploaded message data load and time are updated only when the data load of the current complete CAN message changes relative to the data load of the last successfully uploaded complete message or the time since the last upload exceeds a preset longest forced upload period. 3.The data transmission optimization method based on an intelligent cockpit according to claim 1, wherein, The step of analyzing the configuration file is specifically: The configuration file is stored in text form, and configuration items are separated by a delimiter. Each line corresponds to a signal configuration. The system reads the configuration file line by line in read-only mode when starting, and only the line with the application layer subscription flag as 1 is parsed after splitting the fields by the delimiter.

4. The data transmission optimization method based on the intelligent cockpit according to claim 1, characterized in that, The step of loading only signals with application layer subscription demand to form a runtime signal mapping table is specifically: During the process of analyzing the configuration file, the application layer subscription flag field in each line of configuration information is read. Only when the flag field takes the value 1, the signal category, signal unique identifier, message identifier, starting bit of signal in message, signal length, transmission direction, and de-duplication state allocation area corresponding to the line are stored in the runtime signal mapping table.

5. The data transmission optimization method based on the intelligent cockpit according to claim 1, characterized in that, The definition and use of the signal unique identifier are as follows: When generating the configuration file, a decimal integer is assigned as the signal unique identifier in ascending order of the dictionary order of the signal name. The signal unique identifier is used as the key of the hash table when forming the runtime signal mapping table. The signal unique identifier is used as the unique index between the application layer and the driver layer in the subsequent signal extraction and upload process.

6. The data transmission optimization method based on the intelligent cockpit according to claim 1, characterized in that, The step of analyzing each frame of message in the uplink data packet and extracting signals belonging to the runtime signal mapping table is specifically: After receiving the uplink data packet, the message identifier of each frame in the packet is read in sequence, and the message identifier is used to perform a lookup in the runtime signal mapping table. If the lookup hits, all signal entries associated with the message identifier are traversed, and the original bit value is extracted from the 8-byte data payload of the frame according to the start bit and signal length of each signal in the message, and the physical value conversion is immediately completed.

7. An intelligent cockpit-based data transmission optimization system, characterized in that, The data transmission optimization method based on an intelligent cockpit according to any one of claims 1-6 comprises: A configuration file storage module is configured to store pre-defined configuration information of all signals, and the configuration information at least includes signal category, signal unique identifier, message identifier, start bit of signal in message, signal length, and transmission direction. A configuration loading module is configured to parse the configuration file when the system starts, and only load signals with application layer subscription requirements to form a runtime signal mapping table. An uplink data receiving module is configured to receive uplink data packets sent by a microcontroller unit (MCU) through an SPI bus. A signal analysis module is configured to analyze each frame of message in the uplink data packet and extract signals belonging to the runtime signal mapping table. A differential transmission optimization module is configured to decide whether to upload to the application layer after performing corresponding transmission optimization strategies according to the pre-defined signal category of each signal, and the signal category includes interactive CAN signal, reporting information type CAN signal, non-CAN signal, and whole frame transparent type CAN signal. 8.The data transmission optimization system based on intelligent cockpit of claim 7, wherein, The configuration file storage module, configuration loading module, uplink data receiving module, signal analysis module, and differential transmission optimization module are all in the form of functions in the same driver layer signal processing module of the chip, and the driver layer signal processing module runs in the kernel state of the chip in the form of a QNX resource manager process. The five modules directly interact through a shared runtime signal mapping table. 9.The data transmission optimization system based on intelligent cockpit of claim 8, wherein, The configuration file storage module points to a pure text file in the read-only partition of the system-level chip, and the configuration items are separated by a single comma. The configuration loading module reads each line in a read-only manner during the initialization stage of the driver layer signal processing module, and separates the fields according to the separator. Only the lines with the application layer subscription flag field set to 1 are allocated a structure and inserted into the runtime signal mapping table.

10. An intelligent cockpit-based data transmission optimization apparatus, characterized in that, The data transmission optimization method based on an intelligent cockpit according to any one of claims 1-6 comprises a chip and a microcontroller unit, and the chip and the microcontroller unit are connected through an SPI bus. The chip is provided with a driver layer signal processing module.