Data interaction method, vehicle and storage medium
By dividing the buffer space for the application in the intelligent driving system according to the target attributes of the application, the problem of data interaction time delay between the microcontroller unit and the system-level chip is solved, and the reasonable allocation of buffer resources is achieved, and the system's real-time response capability and security are improved.
Patent Information
- Application Number
- CN202510725282.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-26
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-05-30
AI Technical Summary
In the existing intelligent driving system, the data interaction between the microcontroller unit and the system-level chip has the problem of increasing time delay, which is difficult to meet the high real-time requirements.
By determining the target attributes of the application, dividing the buffer space, and allocating the target area to the application for data storage and transmission based on the target attributes, the rational allocation and effective utilization of buffer resources are achieved.
It reduces the data transmission delay between the microcontroller unit and the system-level chip, and improves the performance and safety of the intelligent driving system.
Smart Images

Figure CN120578622A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of data transmission, and in particular relates to a data interaction method, a vehicle, and a storage medium. Background Art
[0002] In recent years, intelligent driving systems have typically implemented assisted driving functions using a collaborative architecture combining a microcontroller unit (MCU) and a system-on-chip (SoC). The MCU primarily handles real-time control tasks (such as vehicle dynamics control and safety monitoring), while the SoC primarily handles high-performance computing tasks (such as environmental perception and path planning). Frequent data exchange between the MCU and SoC is crucial, and data exchange latency is a key factor affecting the performance and responsiveness of intelligent driving systems.
[0003] Existing intelligent driving systems typically directly use low-level interfaces generated by the AUTOmotive OpenSystem Architecture (AUTOSAR) to transmit data. However, due to limitations in task scheduling, this can increase data transmission latency, making it difficult to meet the high-speed real-time data exchange requirements between the MCU and SoC. Summary of the Invention
[0004] Embodiments of the present application provide a data interaction method, a vehicle, and a storage medium to solve the problem of increased time delay in data transmission between a microcontroller unit and a system-on-chip.
[0005] In a first aspect, an embodiment of the present application provides a data interaction method, the method comprising: determining target attributes and application data of an application, the application running on a microcontroller unit; determining, based on the target attributes, a target area of a first buffer zone in the microcontroller unit corresponding to the application; storing the application data in the target area; and transmitting the application data in the first buffer zone to a system-level chip.
[0006] In a second aspect, an embodiment of the present application provides a data interaction device, which includes: an attribute determination module for determining the target attributes and application data of an application, wherein the application runs on a microcontroller unit; an area determination module for determining the target area of the application corresponding to the first buffer zone in the microcontroller unit based on the target attributes; a data storage module for storing the application data in the target area; and a data transmission module for transmitting the application data in the first buffer zone to a system-level chip.
[0007] In a third aspect, an embodiment of the present application provides a vehicle, comprising a microcontroller unit, a system-level chip and a memory, wherein the microcontroller unit is connected to the system-level chip, and the microcontroller unit is used to implement a data interaction method when executing a computer program stored in the memory.
[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a microcontroller unit of a vehicle, a data interaction method is implemented.
[0009] The data interaction method provided in an embodiment of the present application determines the target attributes and application data of an application program running on the microcontroller; based on the target attributes, determines a target area of a first buffer zone in the microcontroller corresponding to the application program; stores the application data in the target area; and transmits the application data in the first buffer zone to the system-on-chip. The method divides buffer space for the application program based on the target attributes of the application program, thereby achieving reasonable allocation and effective utilization of buffer resources, avoiding data transmission confusion and increased time delays due to resource competition, and reducing the time delay of data transmission between the microcontroller and the system-on-chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is a device diagram of a data interaction method provided in an embodiment of the present application.
[0011] Figure 2 This is a flow chart of the interaction between the microcontroller unit and the system-on-chip provided in an embodiment of the present application.
[0012] Figure 3 This is a flow chart of a data interaction method provided in an embodiment of the present application.
[0013] Figure 4 This is a flow chart of the configuration of the buffer zone provided in an embodiment of the present application.
[0014] Figure 5 This is a schematic diagram of application data caching provided in an embodiment of the present application.
[0015] Figure 6 This is a flowchart of the method for determining an exception handling strategy provided in an embodiment of the present application.
[0016] Figure 7 It is a structural diagram of a data interaction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] It should be noted that the terms "first" and "second" in the description, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0018] In the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a concrete manner. The following embodiments and features in the embodiments may be combined with each other unless there is a conflict.
[0019] In recent years, intelligent driving systems have typically implemented assisted driving functions using a collaborative architecture combining a microcontroller unit (MCU) and a system-on-chip (SoC). The MCU primarily handles real-time control tasks (such as vehicle dynamics control and safety monitoring). Applications (apps) are developed on the MCU based on the AUTOmotive Open System Architecture (AUTOSAR). Application development primarily focuses on functional implementation, real-time control, and safety mechanisms. The SoC primarily handles high-performance computing tasks (such as environmental perception and path planning).
[0020] To enable data exchange between the MCU and the SoC, in related technologies, the MCU application calls a transmission interface (for example, a low-level interface generated by the AUTOSAR architecture) to send relevant data to the SoC, where multiple nodes on the SoC receive the data. Alternatively, a pre-defined application is deployed on the MCU to store the application's data, which is then distributed to multiple nodes on the SoC. The nodes on the SoC can be configured based on actual needs; for example, they can include perception nodes, planning nodes, and diagnostic nodes.
[0021] However, due to the limitations of task scheduling mechanisms, the above-mentioned methods may increase data transmission latency, making it difficult to meet the high real-time requirements for data interaction between the MCU and the SoC. For example, the first interaction method may increase data transmission latency due to issues such as a lack of unified scheduling, repeated operations, and resource contention. For example, if each application performs data interaction independently, data transmission timing may be inconsistent, resulting in disordered data transmission and increased transmission latency. Furthermore, different applications may need to repeatedly perform communication-related initialization and configuration operations, adding additional time overhead. Furthermore, multiple applications competing for communication resources (such as network bandwidth and buffers) may cause some data to be blocked and delayed, ultimately increasing data transmission latency. The second interaction method may also increase data transmission latency due to issues such as increased intermediaries, single points of failure, and cache bottlenecks. For example, using pre-defined applications for unified data processing and distribution introduces additional processing steps, increasing data transit time. Furthermore, if a pre-defined application fails, it will affect data interaction between all applications and the SoC, causing overall delays in the intelligent driving system. Furthermore, if the pre-defined application needs to process a large amount of data, it may become overloaded, ultimately increasing data transmission latency.
[0022] In view of this, the present application provides a data interaction method, a vehicle and a storage medium, the method including: determining the target attributes and application data of an application, wherein the application runs on a microcontroller unit; based on the target attributes, determining the target area of the first buffer corresponding to the application in the microcontroller unit; storing the application data in the target area; and transmitting the application data in the first buffer to a system-level chip.
[0023] The embodiment of the present application divides the buffer space for the application according to the target attributes of the application, realizes the reasonable allocation and effective utilization of the buffer resources, avoids the data transmission confusion and increased time delay due to resource competition, can reduce the time delay of data transmission between the microcontroller unit and the system-level chip, and improves the performance and safety of the intelligent driving system.
[0024] The following will describe some embodiments with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.
[0025] Combine Figure 1 The device diagram of a data interaction method provided by an embodiment of the present application is described. The data interaction method can be applied to a vehicle 10, which can include a hybrid vehicle, a pure fuel vehicle, and a pure electric vehicle, without limitation. Figure 1As shown, vehicle 10 includes a microcontroller unit 101, a system-on-chip (SoC) 102, a communication module 103, a memory 104, an input / output (I / O) interface 105, and a bus 106. Microcontroller unit 101 and SoC 102 are coupled to communication module 103, memory 104, and I / O interface 105, respectively, via bus 106.
[0026] In some embodiments, the microcontroller unit 101 provides computing and control capabilities. For example, the microcontroller unit 101 is used to execute computer programs stored in the memory 104 to implement the aforementioned data interaction method. The microcontroller unit 101 is primarily responsible for real-time control tasks (such as vehicle dynamics control and safety monitoring). The microcontroller unit 101 develops application programs (apps) based on the AUTomotive Open System Architecture (AUTOSAR). Applications cover multiple core aspects, including vehicle control, perception, decision-making, and interaction. For example, applications may include body domain control programs, chassis and suspension control programs, powertrain control programs, environmental perception and decision-making programs, and human-computer interaction programs.
[0027] In some embodiments, the SoC 102 primarily performs high-performance computing tasks (such as environmental perception and path planning). The SoC 102 is connected to the MCU 101. The SoC 102 analyzes and processes relevant data sent by the MCU 101 (referred to herein as "application data" for ease of description) to obtain control data, which it then transmits to the underlying memory of the MCU 101.
[0028] In some embodiments, the microcontroller unit 101 and the system-on-chip 102 may be independent chips, or the microcontroller unit 101 and the system-on-chip 102 may be integrated, which is not limited here. Figure 2 , Figure 2 This is a flow chart of the interaction between the microcontroller unit and the system-level chip provided in the embodiment of the present application. Figure 2 As shown, during operation, the application program in the microcontroller unit 101 generates application data, which is stored in a buffer of the microcontroller unit 101 (referred to herein as the "first buffer" for ease of description). The microcontroller unit 101 then transmits the application data in the first buffer to the system-on-chip 102. The system-on-chip 102 analyzes and processes the application data to obtain control data, which it transmits to a buffer of the microcontroller unit 101 (referred to herein as the "second buffer" for ease of description). The application program in the microcontroller unit 101 then controls the corresponding hardware device to perform related operations based on the control data.
[0029] In some embodiments, when storing application data of an application in a first buffer of the microcontroller unit 101, target attributes and application data of the application are determined, and the application is running on the microcontroller unit 101. Based on the target attributes, a target area corresponding to the application in the first buffer of the microcontroller unit 101 is determined; the application data is stored in the target area; and the application data in the first buffer is transmitted to the system-on-chip 102.
[0030] In some embodiments, the SoC 102 analyzes the application data to obtain control data, and sends the control data to the second buffer of the MCU 101, so that the MCU 101 controls the corresponding hardware device to perform related operations based on the control data in the second buffer. For example, when the SoC 102 sends the control data to the second buffer of the MCU 101, it determines the application corresponding to the control data (referred to herein as the "target application" for ease of description) and the target attributes corresponding to the target application; based on the target attributes, it determines the designated area of the second buffer of the MCU 101 corresponding to the target application; and stores the control data in the designated area, so that the target application controls the corresponding hardware device to perform related operations based on the control data.
[0031] In some embodiments, the communication module 103 may be a wired communication module and / or a wireless communication module.
[0032] In some embodiments, the memory 104 may include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). The memory 104 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the microcontroller unit 101. The one or more computer programs include multiple instructions. When executed by the microcontroller unit 101, the multiple instructions can implement the data interaction method executed on the vehicle 10.
[0033] In some embodiments, the input / output interface 105 is used to provide a channel for user input or output. For example, the input / output interface 105 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information.
[0034] In the vehicle 10 provided in the embodiment of the present application, the buffer space is divided for the application according to the target attributes of the application, thereby achieving reasonable allocation and effective utilization of buffer resources, avoiding the problems of data transmission confusion and increased time delay due to resource competition, and reducing the time delay of data transmission between the microcontroller unit and the system-level chip.
[0035] Figure 3 is a flow chart of a data interaction method provided by an embodiment of the present application, the data interaction method is applied to a vehicle (for example, Figure 1 Vehicle 10 in FIG. Figure 3 As shown, the data interaction method may include the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0036] S11, determining target attributes and application data of an application program running on a microcontroller unit.
[0037] In some embodiments, applications can represent programs running within the microcontroller unit. Applications cover multiple core aspects of vehicle control, perception, decision-making, and interaction. For example, applications may include body domain control programs, chassis and suspension control programs, powertrain control programs, environmental perception and decision-making programs, and human-machine interaction programs. The body domain control program can be used for lighting control (such as adaptive high and low beams and dynamic turn signals), door / window control (such as power door locks, keyless entry, and anti-pinch functions), and air conditioning and seat adjustment. The chassis and suspension control program can be used for active suspension control (such as shock absorber damping and air spring stiffness), steering control (such as real-time torque control for electric power steering), and braking control (such as anti-lock braking and emergency brake assist). The powertrain control program can be used for battery management (such as monitoring battery pack voltage, temperature, and health status, and optimizing charging and discharging strategies), motor drive control (managing the drive motor's speed, torque, and energy efficiency), and thermal management (controlling cooling systems such as water pumps and fans). Environmental perception and decision-making programs can be used for sensor data processing (such as processing raw data collected by radar and cameras) and low-power monitoring (such as real-time monitoring of the vehicle's surroundings in sentry mode). Human-computer interaction programs can be used for touch and gesture recognition, voice interaction control, and more.
[0038] In some embodiments, each application has a corresponding target attribute, which can represent attribute information of the application in multiple dimensions. Exemplarily, a method for determining the target attribute includes determining the target attribute of the application based on the importance of the application, the first quantity information, and the latency information. By determining the target attribute of the application from multiple dimensions, embodiments of the present application can improve the reliability of the target attribute determination.
[0039] Among them, the target attributes include at least one of the importance of the application, the first quantity information and the delay information. Among them, the importance is used to indicate the relevance of the application to driving safety. The higher the relevance of the application to driving safety, the greater the importance of the application. The smaller the relevance of the application to driving safety, the smaller the importance of the application. The first quantity information is used to describe the data volume parameters generated by the application during operation, which may include parameters such as the size of the data packet generated by a single task, the total amount of data transmitted periodically, and the logical block data occupied by the storage. The delay information is used to describe the real-time requirements of the application, that is, the ability of the system to complete the task within the specified time. The higher the real-time requirements, the lower the delay required; the lower the real-time requirements, the longer the delay can be allowed.
[0040] In some embodiments, application data may represent data generated, used, or stored by an application during operation. Each application has corresponding application data. For example, the application data for the body domain control program may include lighting status (e.g., low beam, turn signal, and brake light activation status) and door / window status (e.g., switch status and lock status). The application data for the chassis and suspension control program may include steering angle and steering assist torque (e.g., steering wheel angle 30°, assist torque 5Nm), suspension height and damping coefficient, brake pressure, and wheel speed signals. The application data for the powertrain control program may include motor speed and torque output, battery cell voltage and remaining charge, and energy recovery intensity (e.g., 20kW of regenerative power during braking). The application data for the environmental perception and decision-making program may include radar distance signals (e.g., rear obstacle is 0.5m away from the vehicle), camera images, and radar point cloud data. The application data for the human-computer interaction program may include driver gesture recognition results (e.g., "waving" triggers window lowering) and driver fatigue monitoring signals (e.g., abnormal blinking frequency).
[0041] S12: Determine a target area of the first buffer zone in the micro control unit corresponding to the application program according to the target attribute.
[0042] In some embodiments, a first buffer is created in the underlying memory of the microcontroller unit. The first buffer is used to store application data sent by the application, and the application data stored in the first buffer is used to be sent to the system-on-chip. The size of the first buffer is reasonably set based on the expected amount of data (for ease of description, referred to as "second quantity information" in this application) and preset performance information. The size of the first buffer is used to describe the amount of data that the first buffer can store. For example, the size of the first buffer can be 512 bytes or 1024 bytes. By creating the first buffer and using the first buffer to cache the application data of the application, the problem of data loss due to excessively fast data transmission can be avoided, thereby improving the reliability of data transmission.
[0043] In some embodiments, a designated area in the first buffer is allocated to each application (for ease of description, referred to as the "target area" in this application), and the application can store application data in the target area in the first buffer. In some embodiments, the target area of the first buffer corresponding to the application in the microcontroller unit is determined based on the target attributes of the application. Exemplarily, the method for determining the target area includes: determining the buffer capacity to be allocated to the application based on the target attributes; and determining the corresponding area from the first buffer as the target area based on the buffer capacity. The embodiment of the present application determines the required buffer capacity according to the target attributes of the application, which can improve the accuracy of the buffer capacity determination; and determines the target area corresponding to the application from the first buffer based on the buffer capacity, so that the target area can meet the data transmission requirements of the application level, thereby improving the accuracy of buffer resource allocation.
[0044] For example, if the target attributes include the importance of an application, the first quantity information, and the delay information, if the importance of the application is greater than or equal to the degree threshold, or the first quantity information is greater than or equal to the quantity threshold, or the delay information is less than or equal to the delay threshold, a larger target area is allocated to the application, i.e., a larger buffer capacity. If the importance of the application is less than the degree threshold, the first quantity information is less than the quantity threshold, and the delay information is greater than the delay threshold, a smaller target area is allocated to the application, i.e., a smaller buffer capacity. The degree threshold, quantity threshold, and delay threshold can be set according to actual needs and are not limited here.
[0045] In some embodiments, a correspondence between target attributes and buffer capacity can be pre-set. By querying this correspondence, the buffer capacity corresponding to the target attribute can be determined. In other embodiments, a capacity determination model can be pre-trained. The capacity determination model can be a neural network model, such as a Convolutional Neural Network (CNN) model, a Recurrent Neural Network (RNN) model, or a Generative Adversarial Network (GAN) model, without limitation. The capacity determination model can be trained using supervised or unsupervised training methods. The present embodiment uses supervised training as an example to illustrate the training of the capacity determination model. When training the capacity determination model, the target attributes of the application are used as input data and the buffer capacity as output data. During training, the capacity determination model adjusts the model weights and biases based on the accuracy of the model output, thereby obtaining a control model with an accuracy greater than a preset accuracy threshold. The preset accuracy threshold can be set based on actual needs, for example, 95%, 98%, etc. The model training process can refer to relevant technologies and will not be described in detail here.
[0046] S13: Store the application data in the target area.
[0047] In some embodiments, considering the differences in the working characteristics of different applications, the application data can be stored in the target area based on the operating cycle of each application. Exemplarily, storing the application data in the target area can include: determining the operating cycle corresponding to the application; and writing the application data to the first buffer based on the operating cycle. The embodiment of the present application writes the application data to the target area of the first buffer based on the operating cycle of the application. By fully considering the working characteristics of different applications, the efficiency and regularity of data writing can be improved.
[0048] The operating cycle can represent the entire process from application startup to continuous operation, during which each functional module repeatedly executes according to preset timing and rules. There is a corresponding relationship between applications and operating cycles. By querying this correspondence, the operating cycle corresponding to each application can be determined. For example, the environmental perception and decision-making program can read radar distance data at preset time intervals. The preset time interval can be set according to actual needs. For example, the preset time interval can be 20 milliseconds, 30 milliseconds, etc. Taking a preset time interval of 20 millimeters as an example, the environmental perception and decision-making program can store application data in the target area every 20 millimeter interval.
[0049] S14: Transmit the application data in the first buffer to the system-on-chip.
[0050] In some embodiments, the application data stored in the first buffer is transmitted to a system-on-chip (SoC), leveraging the SoC's high computing power to perform complex calculations and intelligent decision-making. Exemplarily, the application data stored in the first buffer includes multiple radar signals. The microcontroller reads these signals and sends them to the SoC. By fusing these multiple radar signals, the SoC generates a parking path. In another exemplary embodiment, the application data stored in the first buffer includes a raw image captured by a camera and a list of millimeter-wave radar targets (speed, distance). The microcontroller sends the raw image and the list of millimeter-wave radar targets (speed, distance) to the SoC. Based on the raw image and the list of millimeter-wave radar targets (speed, distance), the SoC uses intelligent algorithms to track and classify targets (e.g., vehicles, pedestrians).
[0051] In some embodiments, since the application data of multiple applications are stored in the first buffer, when the application data in the first buffer is transferred to the system-level chip, the data reading order of the application data can be set, and the application data in the first buffer can be transferred to the system-level chip based on the data reading order. In some embodiments, the application data in the first buffer can be transferred to the system-level chip based on the priority of the application. Exemplarily, transferring the application data in the first buffer to the system-level chip includes: determining the priority of the application; determining the data reading order corresponding to the application data in the first buffer based on the priority; and transferring the application data in the first buffer to the system-level chip based on the data reading order. The embodiment of the present application determines the data reading order of the application data in the first buffer based on the priority of the application, which can give priority to ensuring the rapid transmission of critical and urgent application data, thereby significantly improving the real-time response capability of the intelligent driving system.
[0052] The higher the priority of the application, the earlier the data is read, and the lower the priority of the application, the later the data is read. That is, the application data in the first buffer corresponding to the application with a high priority is read first.
[0053] In some embodiments, the priority of an application can be dynamically adjusted based on the urgency and / or criticality of a task. In the embodiment of the present application, determining the priority of an application based on the urgency and criticality of a task is taken as an example. Exemplarily, determining the priority of the application includes: determining the priority of the application based on the urgency and criticality of the task corresponding to the application. In the embodiment of the present application, determining the priority of an application based on the urgency and criticality of the task corresponding to the application can improve the accuracy of priority determination.
[0054] Among them, the urgency is used to describe the time urgency of the task to be processed, that is, whether the task requires an immediate response or there is a strict time limit. The criticality is used to describe the impact of the task on the safety, functionality or reliability of the system, that is, the severity of the consequences of the failure of the task. In the intelligent driving scenario, the tasks involving vehicle body data, control data, active safety data and other data have a higher degree of urgency and criticality, while the tasks involving in-vehicle entertainment information, driver's habit data and other data have a lower degree of urgency and criticality. For example, if the sensor detects an obstacle, the calculation and issuance of the braking command must be completed within a few milliseconds, otherwise it may cause a collision. In this way, applications involving radar distance signals have a higher priority.
[0055] In some embodiments, the correspondence between the priority of the application and the urgency and criticality can be pre-set, and the priority of the application can be determined by querying the correspondence. For example, when the urgency of the task corresponding to the application is greater than or equal to the urgency threshold, and / or the criticality is greater than or equal to the criticality threshold, the priority of the application is determined to be higher. When the urgency of the task corresponding to the application is lower than the urgency threshold, and the criticality is lower than the criticality threshold, the priority of the application is determined to be lower. Among them, the urgency threshold and the criticality threshold can be set according to actual needs and are not limited here.
[0056] In the above-mentioned data interaction method provided in the embodiment of the present application, the buffer space is divided for the application through the target attributes of the application, thereby realizing the reasonable allocation and effective utilization of buffer resources, avoiding the confusion and increased delay caused by resource competition, and being able to reduce the delay of data transmission between the microcontroller unit and the system-level chip, thereby improving the performance and safety of the intelligent driving system.
[0057] In some embodiments, in addition to setting up a first buffer in the bottom memory of the microcontroller unit for storing application data, a second buffer can also be set up to store data sent by the system-level chip (such as control data). The capacity of the first buffer and the second buffer can be determined based on the expected data volume and the performance of the intelligent driving system. Figure 4 , Figure 4 This is a flow chart of the configuration of the buffer zone provided by the embodiment of this application. Figure 4 As shown, the buffer configuration method includes: determining a first capacity corresponding to the first buffer and a second capacity corresponding to the preset second buffer based on second quantity information and preset performance information; and configuring the first buffer and the second buffer based on the first capacity and the second capacity, wherein the first buffer is used to store application data corresponding to the application, and the second buffer is used to store control data transmitted by the system-on-chip. By configuring the first buffer and the second buffer in the microcontroller unit, with the first buffer being used to store application data corresponding to the application, and the second buffer being used to store control data transmitted by the system-on-chip, data can be centrally managed and efficiently transmitted.
[0058] In some embodiments, the second quantity information is used to indicate the amount of data interacting between the microcontroller unit and the system-on-chip. For example, the second quantity information may include the amount of data transmitted from the system-on-chip to the microcontroller unit, and the amount of data transmitted from the microcontroller unit to the system-on-chip. The preset performance information may describe the performance of the intelligent driving system. For example, the preset performance information may include the time required for the microcontroller unit to send application data to the system-on-chip and the load information required for the microcontroller unit to send application data. Based on the second quantity information and the preset performance information, the data storage requirements of the microcontroller unit and the data storage requirements of the system-on-chip can be determined, thereby determining the first capacity corresponding to the first buffer and the second capacity corresponding to the preset second buffer. Exemplarily, the first buffer corresponds to a first capacity of 512 bytes, and the second buffer corresponds to a second capacity of 1024 bytes.
[0059] In some embodiments, a region with a first buffer capacity is configured within the microcontroller unit as a first buffer region, and a region with a second buffer capacity is configured as a second buffer region. The first buffer region is used to store application data corresponding to the application program, and the second buffer region is used to store data sent by the system-on-chip.
[0060] In some embodiments, before storing the application data of an application in the first buffer, the priority, application code, data sending count value, and data volume of the application data sent of each application can also be determined. According to a preset data structure, the priority, application code, data sending count value, data volume of the application data sent, and application data of the application are combined to obtain the combined data, and the combined data is stored in the first buffer. Among them, the application code is used to uniquely identify the application. Different applications have different application codes. The application code can be a letter, Chinese character, or character, which is not limited here. The data sending count value can represent the number of times the application sends application data to the first buffer. The preset data structure can describe the priority, application code, data sending count value, data volume of the application data sent, and the order in which the application data is arranged. The preset data structure can be set according to actual needs and is not limited here.
[0061] See also Figure 5 , Figure 5 This is a schematic diagram of application data caching provided by the embodiment of this application. Figure 5 As shown, the first buffer is used to store application data of two applications as an example, and the two applications are respectively recorded as application 1 and application 2. The data structure of the cached application data may include the priority of the application, the application code, the sent data count value ( Figure 5 referred to as "count value" in this document), the amount of application data sent ( Figure 5 data) and application data.
[0062] In some embodiments, the second buffer is used to store data (such as control data) sent by the SoC. When the SoC sends the control data to the second buffer of the MCU, the method further includes: determining a target application corresponding to the control data and determining a target attribute corresponding to the target application; based on the target attribute, determining a designated area of the second buffer in the MCU corresponding to the target application; and storing the control data in the designated area so that the target application controls the corresponding hardware device to perform related operations based on the control data. A corresponding relationship exists between the control data and the application; by querying this correspondence, the target application corresponding to the control data can be determined. Based on the target attribute of the target application, a designated area in the second buffer can be determined for storing the control data corresponding to the target application. The method for allocating buffer space within the MCU based on target attributes has been described in detail above and will not be repeated here. Dividing buffer space for applications based on their target attributes achieves reasonable allocation and efficient utilization of buffer resources, avoids data transmission confusion and increased time delays caused by resource competition, and can reduce data transmission delays between the MCU and the SoC.
[0063] In some embodiments, when the system-level chip sends the control data to the second buffer of the microcontroller unit, it can determine the order in which the control data is sent based on the priority of the target application corresponding to the control data, and send the control data to the microcontroller unit based on the sending order. Among them, if the priority of the application is high, the control data is sent first, and if the priority of the application is low, the control data is sent later, that is, the control data corresponding to the application with high priority is sent first. The method for determining the priority of the application has been described in detail above and will not be repeated here. Determining the sending order of the control data based on the priority of the application corresponding to the control data can give priority to ensuring the rapid transmission of critical and urgent control data, thereby significantly improving the real-time response capability of the intelligent driving system.
[0064] In some embodiments, an error handling mechanism is configured in the micro control unit to monitor whether a preset buffer has an abnormality, and when an abnormality occurs in the preset buffer, a corresponding abnormality handling strategy is promptly adopted. Figure 6 This is a flow chart of the method for determining an abnormality handling strategy provided by an embodiment of the present application, and the abnormality handling strategy determination method is applied to a vehicle. Figure 6 As shown, the following steps are included: S21: If an abnormality is detected in the preset buffer, the type of the abnormality is determined.
[0065] In some embodiments, a preset buffer is used to describe one or more buffers set within a microcontroller unit. For example, the preset buffer may include a first buffer and a second buffer. There are multiple exception types corresponding to the preset buffer, for example, an exception type may include insufficient buffer space, a data write error, a data read error, etc., without limitation herein.
[0066] S22: Determine the exception handling strategy corresponding to the exception type according to the preset corresponding relationship.
[0067] In some embodiments, a correspondence between exception types and exception handling strategies is pre-set, and by querying the correspondence, the exception handling strategy corresponding to the exception type can be determined. For example, when the exception type is insufficient cache space, the corresponding exception handling strategy can be to suspend writing of application data corresponding to the application with a low priority. When the exception type is a data write error or a data read error, the corresponding exception handling strategy can be data retransmission.
[0068] S23, executing storage and transmission of the data in the preset buffer according to the exception handling strategy.
[0069] In the data interaction method provided in the embodiment of the present application, by setting an error handling mechanism, when an exception occurs in the preset buffer, a corresponding exception handling strategy is adopted according to the exception type to execute storage and transmission of data in the preset buffer, thereby improving the reliability of data stored in the preset buffer.
[0070] See also Figure 7 , Figure 7 1 is a schematic diagram of the structure of a data interaction device provided in an embodiment of the present application. In some embodiments, the data interaction device 20 may include multiple functional modules composed of computer program segments. The computer programs of the various program segments in the data interaction device 20 may be stored in the memory of the vehicle 10 and executed by at least one processor to perform (see Figure 2 Description) data interaction function.
[0071] In some embodiments, the data interaction device 20 can be divided into multiple functional modules based on the functions it performs. The functional modules may include: an attribute determination module 201, a region determination module 202, a data storage module 203, and a data transmission module 204. As referred to herein, a module refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, and is stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0072] The attribute determination module 201 may be used to determine target attributes and application data of an application program running on the micro control unit.
[0073] The region determination module 202 may be configured to determine a target region of the application corresponding to the first buffer zone in the micro control unit according to the target attribute.
[0074] The data storage module 203 may be configured to store the application data in the target area.
[0075] The data transmission module 204 may be configured to transmit the application data in the first buffer to the system-on-chip.
[0076] In some embodiments, the attribute determination module 201 can also be used to determine the target attributes of the application based on the importance of the application, first quantity information and delay information, where the first quantity information is used to indicate the data volume parameters generated by the application during operation.
[0077] In some embodiments, the area determination module 202 may also be configured to determine a buffer capacity to be allocated to the application according to the target attribute; and based on the buffer capacity, determine a corresponding area within the first buffer as the target area.
[0078] In some embodiments, the data transmission module 204 can also be used to determine the priority of the application; determine the data reading order corresponding to the application data in the first buffer based on the priority; and transmit the application data in the first buffer to the system-level chip based on the data reading order.
[0079] In some embodiments, the data transmission module 204 may also be configured to determine the priority of the application program based on the urgency and criticality of the task corresponding to the application program.
[0080] In some embodiments, the data storage module 203 may also be used to determine an operating cycle corresponding to the application program; and write the application data into the first buffer according to the operating cycle.
[0081] In some embodiments, the data storage module 203 can also be used to determine the type of exception if an exception is detected in a preset buffer; determine the exception handling strategy corresponding to the exception type based on a preset correspondence; and perform storage and transmission of data in the preset buffer based on the exception handling strategy.
[0082] In some embodiments, the data storage module 203 can also be used to determine a first capacity corresponding to the first buffer and a second capacity corresponding to a preset second buffer based on second quantity information and preset performance information, where the second quantity information is used to indicate the amount of data exchanged between the microcontroller unit and the system-level chip; and configure the first buffer and the second buffer based on the first capacity and the second capacity, where the first buffer is used to store application data corresponding to the application, and the second buffer is used to store control data sent by the system-level chip.
[0083] It can be understood that the data interaction device 20 and the data interaction method of the above embodiment belong to the same inventive concept, and the specific implementation method of each module of the data interaction device 20 corresponds to the various steps of the data interaction method in the above embodiment, which will not be repeated in this application.
[0084] The module division described above is a logical functional division, and other division methods may be used in actual implementation. In addition, the functional modules in the various embodiments of the present application can be integrated into the same processing unit, or each module can exist physically separately, or two or more modules can be integrated into the same unit. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0085] then Figure 1 Regarding the vehicle, the communication module 103 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions, such as a universal serial bus (USB) and a controller area network (CAN). The wireless communication module may provide one or more wireless communication solutions, such as wireless fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, frequency modulation (FM), near field communication (NFC), and infrared (IR).
[0086] In some embodiments, memory 104 may include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). RAMs can be directly read and written by processor 105 and can be used to store executable programs (e.g., machine instructions) for other running programs, as well as user and application data. RAMs may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), and the like.
[0087] In some embodiments, non-volatile memory may also store executable programs and user and application data, which may be pre-loaded into random access memory for direct reading and writing by processor 105. Non-volatile memory may include disk storage devices and flash memory.
[0088] In some embodiments, the microcontroller unit 101 may include one or more processing units. For example, the microcontroller unit 101 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0089] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the vehicle 10. In other embodiments of the present application, the vehicle 10 may include more or fewer components than illustrated, or may combine or separate certain components, or may have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0090] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the methods in the above-mentioned embodiments of the present application.
[0091] The computer-readable storage medium may be the internal memory of the vehicle described in the above embodiments, such as the vehicle's hard drive or memory. The computer-readable storage medium may also be an external storage device of the vehicle, such as a plug-in hard drive, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc.
[0092] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, applications required for at least one function, etc.; the data storage area may store data created according to the use of the vehicle, etc.
[0093] The computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, etc.; the data storage area may store data created according to the use of the vehicle 10, etc.
[0094] The above-mentioned integrated unit implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module stored in a storage medium includes a number of instructions for causing a vehicle or a processor to execute parts of the methods of various embodiments of the present application.
[0095] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is only a logical function division, and other division methods may be used in actual implementation.
[0096] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, and may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to achieve the objectives of this embodiment based on actual needs.
[0097] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0098] It is obvious to those skilled in the art that the present application is not limited to the details of the above-mentioned exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic characteristics of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the specification may also be implemented by one unit or device through software or hardware. Words such as first, second, etc. are used to indicate names and do not indicate any particular order.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A data interaction method, characterized in that: The method comprises: determining target attributes and application data of an application program running on the microcontroller unit; determining, based on the target attribute, a target area of the first buffer zone in the micro control unit corresponding to the application; storing the application data in the target area; The application data in the first buffer is transmitted to the system-on-chip.
2. The data interaction method according to claim 1, wherein: Determining the target attributes of the application includes: The target attribute of the application is determined based on the importance of the application, first quantity information and delay information, where the first quantity information is used to indicate a data volume parameter generated by the application during operation.
3. The data interaction method according to claim 1, wherein: Determining, based on the target attribute, a target area of the first buffer zone in the micro control unit corresponding to the application program includes: determining a buffer capacity to be allocated to the application program based on the target attribute; Based on the buffer capacity, a corresponding area is determined in the first buffer as the target area.
4. The data interaction method according to claim 1, wherein: The transmitting the application data in the first buffer to the system-on-chip includes: determining a priority for said applications; determining, based on the priority, a data reading order corresponding to the application data in the first buffer; The application data in the first buffer is transmitted to the system-on-chip according to the data reading sequence.
5. The data interaction method according to claim 4, wherein: Determining the priority of the application comprises: The priority of the application is determined according to the urgency and criticality of the task corresponding to the application.
6. The data interaction method according to claim 1, wherein: The storing the application data to the target area includes: Determining an operating cycle corresponding to the application program; The application data is written into a target area in the first buffer according to the operation cycle.
7. The data interaction method according to claim 1, wherein: The method further comprises: determining, based on second quantity information and preset performance information, a first capacity corresponding to the first buffer and a second capacity corresponding to a preset second buffer, wherein the second quantity information is used to indicate a quantity of data exchanged between the microcontroller unit and the system-on-chip; The first buffer and the second buffer are configured according to the first capacity and the second capacity, the first buffer is used to store application data corresponding to the application, and the second buffer is used to store control data sent by the system-level chip.
8. The data interaction method according to claim 7, wherein: The method further comprises: If an abnormality is detected in the preset buffer, the type of abnormality is determined; Determine the exception handling strategy corresponding to the exception type according to the preset corresponding relationship; According to the exception handling strategy, the data in the preset buffer is stored and transmitted, and the preset buffer includes the first buffer and the second buffer.
9. A vehicle, characterized in that: The vehicle includes a microcontroller unit, a system-level chip and a memory. The microcontroller unit is connected to the system-level chip. The microcontroller unit is used to implement the data interaction method as described in any one of claims 1 to 8 when executing the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a micro control unit of a vehicle, implements the data interaction method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data caching system and data caching method
CN103488581A
Data processing method and device, electronic equipment, storage medium and vehicle
CN115437975A
Data storage method, device and system, electronic equipment and storage medium
CN116450053A