Data interaction methods, vehicles and storage media
By rationally allocating buffer space and optimizing data transmission order according to the target attributes of the application in the intelligent driving system, the data interaction delay problem between the microcontroller and the system-on-a-chip is solved, thereby improving the real-time performance and safety of the system.
Patent Information
- Application Number
- CN202510725282.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-26
- Filing Date
- 2025-05-30
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-05-30
AI Technical Summary
In existing intelligent driving systems, the data interaction between the microcontroller unit and the system-on-a-chip suffers from increased time delay, making it difficult to meet high real-time requirements. This is mainly due to resource contention and data transmission chaos caused by the task scheduling mechanism.
By determining the target attributes of the application, allocating buffer space reasonably, storing application data in the target area, and optimizing the data transmission order, the effective utilization and reasonable allocation of buffer resources can be achieved.
It reduces data transmission latency between the microcontroller unit and the system-on-a-chip, improves the performance and safety of the intelligent driving system, and ensures rapid transmission of critical data and real-time system response capabilities.
Smart Images

Figure CN120578622B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data transmission technology, and in particular relates to a data interaction method, a vehicle, and a storage medium. Background Technology
[0002] In recent years, intelligent driving systems have typically adopted an architecture that combines a microcontroller unit (MCU) and a system-on-a-chip (SoC) to implement driver assistance functions. The MCU is primarily responsible for real-time control tasks (such as vehicle dynamics control and safety monitoring), while the SoC mainly handles high-performance computing tasks (such as environmental perception and path planning). Frequent data interaction between the MCU and SoC is necessary, and the time latency of this data interaction is a key factor affecting the performance and response speed of the intelligent driving system.
[0003] In related technologies, existing intelligent driving systems typically directly call the low-level interfaces generated by the Automotive Open System Architecture (AUTOSAR) to send data. However, due to limitations in task scheduling mechanisms, this can lead to increased data transmission latency, making it difficult to meet the high real-time requirements of data interaction between the MCU and the SoC. Summary of the Invention
[0004] This application provides a data interaction method, a vehicle, and a storage medium to address the problem of increased time delay in data transmission between a microcontroller unit and a system-on-a-chip.
[0005] In a first aspect, embodiments of this application provide a data interaction method, the method comprising: determining target attributes and application data of an application running on a microcontroller unit; determining a target area of a first buffer in the microcontroller unit corresponding to the application based on the target attributes; storing the application data in the target area; and transmitting the application data in the first buffer to a system-on-a-chip.
[0006] Secondly, embodiments of this application provide a data interaction device, the device comprising: an attribute determination module, configured to determine target attributes and application data of an application running on a microcontroller unit; a region determination module, configured to determine a target region of a first buffer in the microcontroller unit corresponding to the application based on the target attributes; a data storage module, configured to store the application data in the target region; and a data transmission module, configured to transmit the application data in the first buffer to a system-on-a-chip.
[0007] Thirdly, embodiments of this application provide a vehicle, the vehicle including a microcontroller unit, a system-on-a-chip (SoC), and a memory, the microcontroller unit being connected to the SoC, and the microcontroller unit being used to implement a data interaction method when executing a computer program stored in the memory.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a vehicle's microcontroller unit, implements a data interaction method.
[0009] The data interaction method provided in this application embodiment determines the target attributes and application data of an application running on the microcontroller unit; based on the target attributes, it determines the target area of the first buffer in the microcontroller unit corresponding to the application; it stores the application data in the target area; and it transmits the application data in the first buffer to the system-on-a-chip (SoC). This method allocates buffer space for the application based on its target attributes, achieving reasonable allocation and effective utilization of buffer resources, avoiding data transmission chaos and increased time delays due to resource contention, and reducing the time delay of data transmission between the microcontroller unit and the SoC. Attached Figure Description
[0010] Figure 1 This is a device diagram of a data interaction method provided in an embodiment of this application.
[0011] Figure 2 This is a flowchart illustrating the interaction between the microcontroller unit and the system-on-a-chip provided in this application embodiment.
[0012] Figure 3 This is a flowchart of a data interaction method provided in an embodiment of this application.
[0013] Figure 4 This is a flowchart illustrating the configuration of the buffer provided in an embodiment of this application.
[0014] Figure 5 This is a schematic diagram of application data caching provided in the embodiments of this application.
[0015] Figure 6 This is a flowchart illustrating the method for determining an exception handling strategy provided in an embodiment of this application.
[0016] Figure 7 This is a schematic diagram of the structure of a data interaction device provided in an embodiment of this application. Detailed Implementation
[0017] It should be noted that the terms "first" and "second" in the specification, 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 this application, the words "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 this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner. Unless otherwise specified, the following embodiments and features described herein can be combined with each other.
[0019] In recent years, intelligent driving systems have typically adopted an architecture where a microcontroller unit (MCU) and a system-on-chip (SoC) work together to implement driver assistance functions. The MCU is primarily responsible for real-time control tasks (such as vehicle dynamics control and safety monitoring). Applications (Apps) are developed on the MCU side based on the AUTOmotive Open System Architecture (AUTOSAR) architecture, focusing primarily on function implementation, real-time control, and safety mechanisms. The SoC mainly undertakes high-performance computing tasks (such as environmental perception and path planning).
[0020] To enable data interaction between the MCU and the SoC, related technologies involve the MCU application sending relevant data to the SoC by calling a transmission interface (e.g., a low-level interface generated by the AUTOSAR architecture), which is then received by multiple nodes on the SoC. Alternatively, a pre-defined application can be deployed on the MCU to store relevant application data, which is then distributed to multiple nodes on the SoC. The nodes on the SoC can be configured according to actual needs; for example, they may include sensing nodes, planning nodes, and diagnostic nodes.
[0021] However, due to limitations in task scheduling mechanisms, the above methods may lead to increased data transmission latency, making it difficult to meet the high real-time requirements of data interaction between the MCU and the SoC. For example, the first interaction method may suffer from increased data transmission latency due to issues such as a lack of unified scheduling, repetitive operations, and resource contention. For instance, each application's independent data interaction may result in inconsistent data transmission timing, causing data transmission disorder and increasing waiting time. Furthermore, different applications may repeatedly perform communication-related initialization and configuration operations, adding additional time overhead. Moreover, multiple applications simultaneously competing for communication resources (such as network bandwidth and buffers) may cause blocking and delays in some data, ultimately increasing data transmission latency. The second interaction method may also suffer from increased data transmission latency due to added intermediate steps, single-point failure risks, and caching bottlenecks. For example, using a pre-defined application for unified data processing and distribution introduces additional processing steps, increasing data transfer time. Furthermore, if the pre-defined application malfunctions, it will affect data interaction between all applications and the SoC, causing overall latency in the intelligent driving system. Additionally, when the amount of data to be processed by the pre-defined application is large, it may overload the application, ultimately increasing data transmission latency.
[0022] In view of this, this application provides a data interaction method, a vehicle, and a storage medium. The method includes: determining the target attributes and application data of an application running on a microcontroller unit; determining, based on the target attributes, a target area of a first buffer 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 to a system-on-a-chip.
[0023] This application embodiment allocates buffer space for the application according to the application's target attributes, realizing the reasonable allocation and effective utilization of buffer resources, avoiding data transmission chaos and increased time delay caused by resource contention, reducing the time delay of data transmission between the microcontroller unit and the system-on-a-chip, and improving the performance and safety of the intelligent driving system.
[0024] Some embodiments will now be described with reference to the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0025] Combination Figure 1 This application illustrates a device diagram illustrating a data interaction method provided in an embodiment. The data interaction method can be applied to a vehicle 10, which may include hybrid vehicles, pure gasoline vehicles, and pure electric vehicles, without limitation herein. Figure 1As shown, the vehicle 10 includes a microcontroller unit 101, a system-on-a-chip 102, a communication module 103, a memory 104, an input / output (I / O) interface 105, and a bus 106. The microcontroller unit 101 and the system-on-a-chip 102 are coupled to the communication module 103, the memory 104, and the input / output interface 105, respectively, via the bus 106.
[0026] In some embodiments, the microcontroller unit 101 provides computing and control capabilities. For example, the microcontroller unit 101 executes 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, safety monitoring, etc.). The microcontroller unit 101 is based on the Automotive Open System Architecture (AUTOSAR) architecture for application program (App) development. The application program covers multiple core aspects such as vehicle control, perception, decision-making, and interaction. For example, the application program may include a body domain control program, a chassis and suspension control program, a power control program, an environmental perception and decision-making program, and a human-machine interaction program.
[0027] In some embodiments, the system-on-a-chip 102 primarily undertakes high-performance computing tasks (such as environmental perception, path planning, etc.). The system-on-a-chip 102 is connected to the microcontroller unit 101. The system-on-a-chip 102 analyzes and processes the relevant data sent by the microcontroller unit 101 (hereinafter referred to as "application data" for ease of description) to obtain control data, and transmits the control data to the underlying memory of the microcontroller unit 101.
[0028] In some embodiments, the microcontroller unit 101 and the system-on-a-chip 102 can be separate chips, or they can be integrated; no limitation is imposed here. Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the interaction between the microcontroller unit and the system-on-a-chip (SoC) provided in an embodiment of this application. Figure 2 As shown, the application program in the microcontroller unit 101 generates application data during operation. This application data is stored in a buffer (referred to as the "first buffer" in this application for ease of description) within the microcontroller unit 101. The microcontroller unit 101 then transmits the application data from the first buffer to the system-on-a-chip (SoC) 102. The SoC 102 analyzes and processes the application data to obtain control data, which is then transmitted to a buffer (referred to as the "second buffer" in this application) within the microcontroller unit 101. The application program within the microcontroller unit 101 then controls the corresponding hardware devices to perform relevant operations based on the control data.
[0029] In some embodiments, when storing application data of an application in a first buffer of a microcontroller unit 101, target attributes and application data of the application are determined, wherein the application runs on the microcontroller unit 101. Based on the target attributes, a target region in the first buffer of the microcontroller unit 101 corresponding to the application is determined; the application data is stored in the target region; and the application data in the first buffer is transferred to the system-on-a-chip 102.
[0030] In some embodiments, the system-on-chip 102 analyzes application data to obtain control data and sends the control data to the second buffer of the microcontroller unit 101, so that the microcontroller unit 101 controls the corresponding hardware device to perform related operations based on the control data in the second buffer. For example, when the system-on-chip 102 sends control data to the second buffer of the microcontroller unit 101, it determines the application program corresponding to the control data (hereinafter referred to as the "target application" for ease of description) and the target attributes corresponding to the target application; based on the target attributes, it determines a designated area in the second buffer of the microcontroller unit 101 corresponding to the target application; and it 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, memory 104 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). Memory 104 is used to store one or more computer programs. The one or more computer programs are configured to be executed by microcontroller 101. The one or more computer programs include multiple instructions that, when executed by microcontroller 101, enable a data interaction method to be performed on 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 / output devices, such as a mouse, keyboard, touch device, display screen, etc., so that users can enter information or visualize information.
[0034] In the vehicle 10 provided in this application embodiment, the application buffer space is divided according to the target attributes of the application, which realizes the reasonable allocation and effective use of buffer resources, avoids the problem of data transmission chaos and increased time delay caused by resource competition, and can reduce the time delay of data transmission between the microcontroller and the system-on-a-chip.
[0035] Figure 3 This is a flowchart illustrating a data interaction method provided in an embodiment of this application. This data interaction method is applied to vehicles (e.g., Figure 1 Vehicle 10 in the middle). Figure 3 As shown, the data interaction method may include the following steps. Depending on different needs, the order of the steps in this flowchart may be changed, and some may be omitted.
[0036] S11, determine the target attributes and application data of the application, which runs on the microcontroller unit.
[0037] In some embodiments, the application may represent a program running within a microcontroller unit. The application covers multiple core aspects such as vehicle control, perception, decision-making, and interaction. Exemplarily, the application may include a body domain control program, a chassis and suspension control program, a powertrain control program, an environmental perception and decision-making program, and a human-machine interaction program. The body domain control program can be used for lighting control (such as adaptive high beams and dynamic turn signals), door / window control (such as controlling 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 controlling shock absorber damping and air spring stiffness), steering control (such as real-time torque control of electric power steering), and braking control (such as implementing anti-lock braking and emergency braking 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 speed, torque, and energy efficiency of the drive motor), and thermal management (controlling the cooling system (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-machine interaction programs can be used for touch and gesture recognition, voice interaction control, etc.
[0038] In some embodiments, each application has a corresponding target attribute, which can represent multi-dimensional attribute information of the application. For example, the method for determining the target attribute includes: determining the target attribute of the application based on its importance, a first quantity information, and latency information. This application embodiment improves the reliability of target attribute determination by determining the target attribute of the application from multiple dimensions.
[0039] The target attributes include at least one of the following: application importance, first quantity information, and latency information. Importance indicates the relevance of the application to driving safety; the higher the relevance, the greater the application's importance, and vice versa. First quantity information describes the amount of data generated by the application during operation, which may include parameters such as the size of data packets generated in a single task, the total amount of data transmitted periodically, and the logical blocks of data occupied in storage. Latency information describes the application's real-time requirements, i.e., the system's ability to complete tasks within a specified time. Higher real-time requirements necessitate lower latency; lower real-time requirements allow for longer latency.
[0040] In some embodiments, application data may represent data generated, used, or stored by the application during its operation. Each application has corresponding application data. For example, application data corresponding to the vehicle body domain control program may include lighting status (e.g., low beam headlights, turn signals, brake lights activation status) and door / window status (e.g., open / closed status, locked status). Application data corresponding to 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, braking pressure and wheel speed signals, etc. Application data corresponding to the powertrain control program may include motor speed and torque output, battery pack cell voltage and remaining charge, and energy recovery intensity (e.g., regenerative braking power of 20kW). Application data corresponding to the environmental perception and decision-making program may include radar distance signals (e.g., the distance between a rear obstacle and the vehicle is 0.5m), images captured by cameras, and point cloud data collected by radar, etc. Application data corresponding to the human-machine interaction program may include driver gesture recognition results (e.g., "waving" triggers window lowering), driver fatigue monitoring signals (e.g., abnormal blinking frequency), etc.
[0041] S12, based on the target attribute, determine the target area of the first buffer in the microcontroller corresponding to the application.
[0042] In some embodiments, a first buffer is created in the underlying memory of the microcontroller unit. This first buffer stores application data sent by the application program, and the application data stored in the first buffer is used to send data to the system-on-a-chip (SoC). The size of the first buffer is reasonably set based on the expected data volume (referred to as "second quantity information" for ease of description) and preset performance information. The size of the first buffer describes the amount of data it can store. For example, the size of the first buffer can be 512 bytes or 1024 bytes. By creating the first buffer and using it to cache application data, the problem of data loss due to excessively fast data transmission can be avoided, improving the reliability of data transmission.
[0043] In some embodiments, a designated area within a first buffer (hereinafter referred to as a "target area" for ease of description) is allocated to each application, and the application can store application data within the target area of the first buffer. In some embodiments, the target area of the first buffer in the microcontroller corresponding to the application is determined based on the application's target attributes. 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 a corresponding area from the first buffer based on the buffer capacity as the target area. The embodiments of this application determine the required buffer capacity based on the application's target attributes, which improves the accuracy of buffer capacity determination; and by determining the target area corresponding to the application from the first buffer based on the buffer capacity, the target area can meet the data transmission requirements of the application, improving the accuracy of buffer resource allocation.
[0044] Taking the application's importance, quantity information, and latency information as an example, if the application's importance is greater than or equal to a threshold, or the quantity information is greater than or equal to a threshold, or the latency information is less than or equal to a threshold, then a larger target area is allocated to the application, meaning a larger buffer capacity. If the application's importance is less than a threshold, the quantity information is less than a threshold, and the latency information is greater than a threshold, then a smaller target area is allocated to the application, meaning a smaller buffer capacity. The importance threshold, quantity threshold, and latency threshold can be set according to actual needs and are not restricted here.
[0045] In some embodiments, a correspondence between target attributes and buffer capacities can be pre-defined. 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), Recurrent Neural Network (RNN), or Generative Adversarial Network (GAN) model, etc., without limitation. The training method of the capacity determination model can include supervised training and unsupervised training. This application embodiment uses supervised training as an example. When training the capacity determination model, the target attribute of the application is used as input data, and the buffer capacity is used as output data. During training, the capacity determination model adjusts the model's weights and biases based on the accuracy of the model's output results, thereby obtaining a control model with an accuracy greater than a preset accuracy threshold. The preset accuracy threshold can be set according to actual needs, for example, the preset accuracy threshold can be 95%, 98%, etc. The training process of the model can be found in relevant techniques, and will not be elaborated here.
[0046] S13, Store the application data in the target area.
[0047] In some embodiments, considering the differences in the operating characteristics of different applications, application data can be stored in a target area according to the runtime of each application. For example, storing the application data in the target area may include: determining the runtime of the application; and writing the application data into the first buffer according to the runtime. This embodiment of the application writes application data into the target area of the first buffer according to the application's runtime, which, by fully considering the operating characteristics of different applications, improves the efficiency and regularity of data writing.
[0048] The runtime cycle represents the entire process of an application's continuous operation, from startup to completion, in which each functional module executes repeatedly according to a preset sequence and rules. There is a correspondence between applications and runtime cycles; by querying this correspondence, the runtime cycle for each application can be determined. For example, the environmental perception and decision-making program can read radar distance data according to a preset time interval. The preset time interval can be set according to actual needs; for example, it 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 millimeters.
[0049] S14, transfer the application data in the first buffer to the system-on-a-chip.
[0050] In some embodiments, application data stored in a first buffer is transmitted to a system-on-a-chip (SoC), utilizing the SoC's high computing power to perform complex calculations and intelligent decision-making. For example, the application data stored in the first buffer includes multiple radar signals. The microcontroller unit reads these multiple radar signals and sends them to the SoC. The SoC can generate a parking path by fusing the multiple radar signals. As another example, the application data stored in the first buffer includes raw images captured by a camera and a millimeter-wave radar target list (speed, distance). The microcontroller unit sends the raw images and the millimeter-wave radar target list (speed, distance) to the SoC. The SoC uses intelligent algorithms to track and classify targets (such as vehicles and pedestrians) based on the raw images and the millimeter-wave radar target list (speed, distance).
[0051] In some embodiments, since the first buffer stores application data from multiple applications, when transferring the application data in the first buffer to the system-on-a-chip (SoC), the data reading order of the application data can be set, and the application data in the first buffer can be transferred to the SoC according to the data reading order. In some embodiments, the application data in the first buffer can be transferred to the SoC according to the application priority. For example, transferring the application data in the first buffer to the SoC includes: determining the priority of the application; determining the data reading order corresponding to the application data in the first buffer according to the priority; and transferring the application data in the first buffer to the SoC according to the data reading order. This application embodiment determines the data reading order of the application data in the first buffer according to the application priority, which can prioritize 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 application's priority, the earlier the data is read; the lower the application's priority, the later the data is read. In other words, the application data in the first buffer corresponding to the application with the higher 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. This application embodiment takes determining the priority of an application based on the urgency and criticality of a task as an example. Exemplarily, determining the priority of an application includes: determining the priority of the application based on the urgency and criticality of the task corresponding to the application. This application embodiment, by 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] The urgency level describes the time-sensitive nature of a task, i.e., whether it requires immediate response or has strict time constraints. The criticality level describes the impact of a task on system safety, functionality, or reliability, i.e., the severity of the potential consequences of task failure. In intelligent driving scenarios, tasks involving vehicle data, control data, and active safety data have higher urgency and criticality levels, while tasks involving in-vehicle entertainment information and driver habit data have lower urgency and criticality levels. For example, if sensors detect an obstacle, braking commands must be calculated and issued within milliseconds; otherwise, a collision may occur. Thus, applications involving radar distance signals have higher priority.
[0055] In some embodiments, a pre-defined correspondence between application priority and urgency / criticality can be established. By querying this correspondence, the application's priority can be determined. For example, when the urgency of the corresponding task is greater than or equal to an urgency threshold, and / or the criticality is greater than or equal to a criticality threshold, the application's priority is determined to be higher. When the urgency of the corresponding task is lower than an urgency threshold, and the criticality is lower than a criticality threshold, the application's priority is determined to be lower. The urgency and criticality thresholds can be set according to actual needs and are not limited here.
[0056] In the data interaction method provided in the embodiments of this application, the application's target attributes are used to divide the buffer space for the application, thereby realizing the reasonable allocation and effective use of buffer resources, avoiding the chaos and increased latency caused by resource competition, reducing the latency of data transmission between the microcontroller unit and the system-on-a-chip, and improving the performance and safety of the intelligent driving system.
[0057] In some embodiments, in addition to setting up a first buffer in the underlying memory of the microcontroller unit to store application data, a second buffer can also be set up to store data sent by the system-on-a-chip (SoC) (such as control data). The capacities of the first and second buffers can be determined based on the expected data volume and the performance requirements of the intelligent driving system. See also... Figure 4 , Figure 4 This is a flowchart illustrating the configuration of the buffer provided in an embodiment of this application. For example... Figure 4 As shown, the buffer configuration method includes: determining 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; 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 program, and the second buffer is used to store control data transmitted by the system-on-a-chip. By configuring the first buffer and the second buffer in the microcontroller unit, where the first buffer is used to store application data corresponding to the application program and the second buffer is used to store control data transmitted by the system-on-a-chip, data can be centrally managed and transmitted efficiently.
[0058] In some embodiments, the second quantity information is used to indicate the amount of data exchanged between the microcontroller and the system-on-a-chip (SoC). For example, the second quantity information may include the amount of data transmitted from the SoC to the microcontroller and the amount of data transmitted from the microcontroller to the SoC. Preset performance information can describe the performance of the intelligent driving system. For example, the preset performance information may include the time required for the microcontroller to send application data to the SoC and the load information required for the microcontroller to send application data. Based on the second quantity information and the preset performance information, the data storage requirements of the microcontroller and the SoC can be determined, thereby determining the first capacity corresponding to the first buffer and the second capacity corresponding to the preset second buffer. For example, 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, and a region with a second buffer capacity is configured as a second buffer. The first buffer is used to store application data corresponding to the application, and the second buffer is used to store data sent by the system-on-a-chip.
[0060] In some embodiments, before storing the application data of an application in the first buffer, the priority, application ID, data transmission count, and amount of application data to be transmitted for each application can be determined. Based on a preset data structure, the application priority, application ID, data transmission count, amount of application data transmitted, and the application data are combined to obtain combined data, which is then stored in the first buffer. The application ID is used to uniquely identify the application; different applications have different application IDs, which can be letters, Chinese characters, or other characters, without limitation. The data transmission count indicates the number of times the application sends application data to the first buffer. The preset data structure can describe the application priority, application ID, data transmission count, amount of application data transmitted, and the order of the application data. The preset data structure can be set according to actual needs and is not limited here.
[0061] Please see Figure 5 , Figure 5 This is a schematic diagram of application data caching provided in an embodiment of this application. For example... Figure 5 As shown, taking the first buffer as an example for storing application data from two applications, the two applications are denoted as Application 1 and Application 2 respectively. The data structure of the cached application data may include the application's priority, application ID, and data transmission count value (…). Figure 5 (referred to as "count value" in Chinese), the amount of application data sent ( Figure 5 The data referred to in Chinese as "data volume" and application data.
[0062] In some embodiments, the second buffer is used to store data (such as control data) sent by the system-on-a-chip (SoC). When the SoC sends control data to the second buffer of the microcontroller unit, the method further includes: determining the target application corresponding to the control data, and determining the target attribute corresponding to the target application; determining a designated area in the second buffer of the microcontroller unit corresponding to the target application based on the target attribute; 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. There is a correspondence 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, and this designated area is used to store the control data corresponding to the target application. The method of allocating buffer space within the microcontroller unit based on the target attribute has been described in detail above and will not be repeated here. Allocating buffer space for the application based on the target attribute of the application achieves reasonable allocation and effective utilization of buffer resources, avoids data transmission chaos and increased time delay due to resource contention, and can reduce the time delay of data transmission between the microcontroller unit and the SoC.
[0063] In some embodiments, when the system-on-a-chip (SoC) sends control data to the second buffer of the microcontroller unit (MCU), it can determine the transmission order of the control data based on the priority of the target application corresponding to the control data, and then send the control data to the MCU according to the transmission order. Specifically, applications with higher priority are sent first, and applications with lower priority are sent later; that is, control data corresponding to higher-priority applications is sent first. The method for determining the application priority has been described in detail above and will not be repeated here. Determining the transmission order of control data based on the priority of the application corresponding to the control data can prioritize 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 within the microcontroller unit to monitor whether there are any anomalies in the preset buffer, and to take appropriate anomaly handling strategies in a timely manner when there are anomalies in the preset buffer. Figure 6 This is a flowchart illustrating the exception handling strategy determination method provided in an embodiment of this application. The exception handling strategy determination method is applied to vehicles. Figure 6 As shown, it includes the following steps:
[0065] S21. If an anomaly is detected in the preset buffer, the anomaly type is determined.
[0066] In some embodiments, a preset buffer is used to describe one or more buffers set within the 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, exception types may include insufficient buffer space, data write error, data read error, etc., and there is no limitation here.
[0067] S22, Determine the exception handling strategy corresponding to the exception type according to the preset correspondence.
[0068] In some embodiments, a pre-defined correspondence between exception types and exception handling strategies is established. By querying this correspondence, the exception handling strategy corresponding to an exception type can be determined. For example, when the exception type is insufficient cache space, the corresponding exception handling strategy can be to pause the writing of application data for low-priority applications. When the exception type is a data write error or a data read error, the corresponding exception handling strategy can be data retransmission.
[0069] S23, according to the exception handling strategy, perform storage and transmission of data in the preset buffer.
[0070] In the data interaction method provided in this application embodiment, by setting an error handling mechanism, when there is an exception in the preset buffer, the corresponding exception handling strategy is adopted according to the exception type to perform the storage and transmission of data in the preset buffer, which can improve the reliability of data stored in the preset buffer.
[0071] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a data interaction device provided in an embodiment of this application. In some embodiments, the data interaction device 20 may include multiple functional modules composed of computer program segments. The computer programs of each program segment 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 details). Figure 2 (Description) The function of data interaction.
[0072] In some embodiments, the data interaction device 20 can be divided into multiple functional modules according to the functions it performs. These 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 used in this application, a module refers to a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0073] The attribute determination module 201 can be used to determine the target attributes and application data of an application running on a microcontroller unit.
[0074] The region determination module 202 can be used to determine the target region of the application corresponding to the first buffer in the microcontroller unit based on the target attributes.
[0075] The data storage module 203 can be used to store the application data to the target area.
[0076] The data transmission module 204 can be used to transmit application data in the first buffer to the system-on-a-chip.
[0077] 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, the first quantity information and the latency information, wherein the first quantity information is used to indicate the amount of data generated by the application during operation.
[0078] In some embodiments, the region determination module 202 may also be used to determine the buffer capacity to be allocated to the application based on the target attribute; and to determine the corresponding region from the first buffer based on the buffer capacity as the target region.
[0079] 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 according to the priority; and transmit the application data in the first buffer to the system-on-a-chip according to the data reading order.
[0080] In some embodiments, the data transmission module 204 can also be used to determine the priority of the application based on the urgency and criticality of the tasks corresponding to the application.
[0081] In some embodiments, the data storage module 203 can also be used to determine the running cycle corresponding to the application; and write the application data into the first buffer according to the running cycle.
[0082] In some embodiments, the data storage module 203 can also be used to determine the type of exception if an exception is detected in the preset buffer; determine the exception handling strategy corresponding to the exception type according to a preset correspondence; and perform storage and transmission of data in the preset buffer according to the exception handling strategy.
[0083] In some embodiments, the data storage module 203 can also be used to determine the first capacity corresponding to the first buffer and the second capacity corresponding to the preset second buffer based on the second quantity information and the preset performance information, wherein the second quantity information is used to indicate the amount of data exchanged between the microcontroller and the system-on-a-chip; and to configure 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 program and the second buffer is used to store control data sent by the system-on-a-chip.
[0084] It is understood that the data interaction device 20 and the data interaction method of the above embodiments belong to the same inventive concept. The specific implementation of each module of the data interaction device 20 corresponds to each step of the data interaction method in the above embodiments, and will not be repeated here.
[0085] The module division described above is a logical functional division, and other division methods may be used in actual implementation. Furthermore, the functional modules in the various embodiments of this 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 integrated modules described above can be implemented in hardware or in a combination of hardware and software functional modules.
[0086] then Figure 1 Regarding the vehicle description, 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 Universal Serial Bus (USB) and 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).
[0087] In some embodiments, memory 104 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The RAM can be directly read and written by the processor 105 and can be used to store executable programs (e.g., machine instructions) of other running programs, as well as user and application data. The RAM 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), etc.
[0088] In some embodiments, the non-volatile memory may also store executable programs and user and application data, which can be pre-loaded into random access memory for direct reading and writing by the processor 105. The non-volatile memory may include disk storage devices and flash memory.
[0089] In some embodiments, the microcontroller unit 101 may include one or more processing units, such as 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). These different processing units may be independent devices or integrated into one or more processors.
[0090] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on vehicle 10. In other embodiments of this application, vehicle 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0091] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the methods in the above embodiments of this application.
[0092] The computer-readable storage medium can be the vehicle's internal storage as described in the above embodiments, such as the vehicle's hard drive or memory. Alternatively, it can be an external storage device for the vehicle, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card.
[0093] In some embodiments, a 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, an application program required for at least one function, etc.; and the data storage area may store data created based on the use of the vehicle, etc.
[0094] The computer-readable storage medium may mainly include a stored program area and a stored data area. The stored program area may store the operating system, an application program required for at least one function, etc.; the stored data area may store data created based on the use of the vehicle 10, etc.
[0095] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a vehicle or processor to execute portions of the methods described in the various embodiments of this application.
[0096] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0097] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0098] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0099] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that it can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other elements or, and the singular does not exclude the plural. Multiple elements or devices recited in the specification may also be implemented by a single element or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A data interaction method, characterized in that, The method comprises: determining a target attribute of an application program running on a micro control unit, the micro control unit being provided with a first buffer and a second buffer; determining a target region of the first buffer corresponding to the micro control unit according to the target attribute of the application program; storing the application data in the target region; transmitting the application data in the first buffer to a system chip, wherein the first buffer is configured according to a first capacity, the second buffer is configured according to a second capacity, the first capacity and the second capacity are determined according to second quantity information and preset performance information, the second quantity information is used to indicate the quantity of data exchanged between the micro control unit and the system chip, and the second buffer is used to store control data sent by the system chip.
2. The data interaction method of claim 1, wherein, The determining of the target attribute of the application program comprises: determining the target attribute of the application program according to the importance of the application program, first quantity information and time delay information, and the first quantity information is used to indicate the data volume parameter generated by the application program during running.
3. The data interaction method of claim 1, wherein, The determining of the target region of the first buffer corresponding to the micro control unit according to the target attribute of the application program comprises: determining the buffer capacity to be allocated to the application program according to the target attribute; determining the corresponding region in the first buffer as the target region based on the buffer capacity.
4. The data interaction method of claim 1, wherein, The transmitting of the application data in the first buffer to the system chip comprises: determining the priority of the application program; determining the data reading sequence of the application data in the first buffer according to the priority; transmitting the application data in the first buffer to the system chip according to the data reading sequence.
5. The data interaction method of claim 4, wherein, The determining of the priority of the application program comprises: determining the priority of the application program according to the urgency and criticality of the task corresponding to the application program.
6. The data interaction method of claim 1, wherein, The storing of the application data in the target region comprises: determining the running period corresponding to the application program; writing the application data into the target region in the first buffer according to the running period.
7. The data interaction method of claim 1, wherein, The method further comprises: if it is detected that a preset buffer is abnormal, determining an abnormal type; determining an abnormal processing strategy corresponding to the abnormal type according to a preset corresponding relationship; performing storage and transmission of data in the preset buffer according to the abnormal processing strategy, the preset buffer comprising the first buffer and the second buffer.
8. A vehicle characterized by comprising: The vehicle comprises a micro control unit, a system chip and a memory, the micro control unit is connected with the system chip, and the micro control unit is used to implement the data interaction method of any one of claims 1 to 7 when executing the computer program stored in the memory.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the micro control unit of the vehicle to implement the data interaction method of any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method and device, electronic equipment, storage medium and vehicle
CN115437975A
Data storage method, device and system, electronic equipment and storage medium
CN116450053A