Search

CN-122018974-A - Data processing method, device, computer equipment and storage medium

CN122018974ACN 122018974 ACN122018974 ACN 122018974ACN-122018974-A

Abstract

The application discloses a data processing method, a device, computer equipment and a storage medium, which belong to the field of vehicle IMU software development, and comprise the steps of acquiring an original data stream of an IMU sensor of a vehicle based on an MCAL layer; the method comprises the steps of acquiring auxiliary motion state information of application layer software of a vehicle based on a running environment, judging whether the vehicle is in a static state based on an original data stream and the auxiliary motion state information, responding to the vehicle in the static state, determining a zero offset compensation value, storing the zero offset compensation value in a nonvolatile memory based on a nonvolatile memory manager, packaging the original data stream into a standardized data format based on a communication interface of an ECU abstract layer, managing reading and writing of the zero offset compensation value based on a memory interface of the ECU abstract layer, interacting with the running environment, and providing standardized service for the application layer. The application ensures that the development of the IMU has higher standardability, portability and measurement accuracy, does not increase the maintenance burden of engineers and does not influence the operation efficiency of the system.

Inventors

  • HUI ZHIFENG
  • SU GANTING
  • MEI KAILU
  • FANG HONGQING

Assignees

  • 上海利氪科技有限公司
  • 苏州利氪科技有限公司
  • 杭州利氪汽车电子有限公司
  • 利氪(浙江)科技有限公司

Dates

Publication Date
20260512
Application Date
20260413

Claims (10)

  1. 1. A method of data processing, comprising: Acquiring an original data stream of an IMU sensor of a target vehicle based on an MCAL layer of an AUTOSAR architecture, wherein the original data stream is transmitted to an ECU abstract layer through a standardized interface; Acquiring auxiliary motion state information of at least one application layer software component of the target vehicle based on a runtime environment of the AUTOSAR architecture; Based on the original data stream and the auxiliary motion state information, carrying out cooperative judgment on whether the target vehicle is in a stationary state; Determining a zero offset compensation value in response to the target vehicle being in the stationary state, and storing the zero offset compensation value in a non-volatile memory based on an AUTOSAR non-volatile storage manager; Based on a communication interface of an ECU abstract layer, packaging the original data stream into a standardized data format and transmitting the standardized data format to the runtime environment; Based on a storage interface of the ECU abstract layer, managing the reading and writing of the zero offset compensation value; and providing standardized IMU data access and status query services for the application layer software components through AUTOSAR Interface interactions with the runtime environment.
  2. 2. The method of claim 1, wherein the acquiring the raw data stream of the IMU sensor of the target vehicle based on the MCAL layer of the AUTOSAR architecture comprises: establishing physical connection with the IMU sensor and performing data frame interaction by configuring SPI drive, I2C drive or UART drive of an MCAL layer; Monitoring the alarm pin state of the IMU sensor by configuring DIO drive of an MCAL layer; and acquiring an analog quantity signal output by the IMU sensor by configuring ADC driving of the MCAL layer.
  3. 3. The data processing method according to claim 1, wherein the storing the zero offset compensation value in the nonvolatile memory based on the AUTOSAR nonvolatile memory manager includes: generating a cyclic redundancy check code for the zero offset compensation value; And writing the zero offset compensation value added with the cyclic redundancy check code into different physical storage areas of the nonvolatile memory in the form of at least double copies.
  4. 4. The data processing method according to claim 1, wherein the raw data stream includes triaxial acceleration and triaxial angular velocity data, the auxiliary motion state information includes a vehicle speed signal and a wheel speed signal, and the cooperative determination of whether the target vehicle is in a stationary state based on the raw data stream and the auxiliary motion state information includes: And when the vehicle speed signal and the wheel speed signal are continuously indicated to be zero values in a first time window and the statistical fluctuation quantity of the triaxial acceleration and triaxial angular speed data in a second time window is lower than a preset threshold value, judging that the target vehicle is in the static state, wherein the time length of the first time window is longer than that of the second time window.
  5. 5. The data processing method according to any one of claims 1 to 4, wherein the communication interface is a unified service interface abstracting operations of multiple bottom layer drivers, the standardized interface is configured by a configuration tool of an MCAL layer, and the storage interface is a standardized interface of MemIf modules.
  6. 6. The method according to any one of claims 1-4, wherein the application layer software component accesses data through a predefined AUTOSAR Interface.
  7. 7. The method for processing data according to any one of claims 1 to 4, further comprising compensating the original data stream acquired in real time based on the zero offset compensation value to obtain compensated data.
  8. 8. A data processing apparatus, comprising: the first acquisition module is used for acquiring an original data stream of an IMU sensor of the target vehicle based on an MCAL layer of an AUTOSAR architecture; A second obtaining module, configured to obtain auxiliary motion state information of at least one application layer software component of the target vehicle based on a runtime environment of the AUTOSAR architecture; The judging module is used for carrying out cooperative judgment on whether the target vehicle is in a static state or not based on the original data stream and the auxiliary motion state information; the storage module is used for responding to the state that the target vehicle is in the static state, determining a zero offset compensation value and storing the zero offset compensation value in a nonvolatile memory based on an AUTOSAR nonvolatile storage manager; the packaging module is used for packaging the original data stream into a standardized data format based on a communication interface of the ECU abstract layer and transmitting the standardized data format to the runtime environment; the configuration module is used for managing the reading and writing of the zero offset compensation value based on a storage interface of the ECU abstract layer; And the interaction module is used for interacting with the runtime environment through AUTOSAR Interface and providing standardized IMU data access and state query services for the application layer software component.
  9. 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the data processing method according to any one of claims 1 to 7.
  10. 10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the data processing method according to any one of claims 1 to 7 when the program is executed by the processor.

Description

Data processing method, device, computer equipment and storage medium Technical Field The application relates to a data processing method, a data processing device, computer equipment and a storage medium, and belongs to the technical field of vehicle IMU software development. Background The inertial measurement unit is a core device in the field of gesture sensing, and occupies a key position in motion state measurement with high precision, high update rate and strong robustness. A typical Inertial Measurement Unit (IMU) is composed of a three-axis accelerometer, a three-axis gyroscope, and an Application Specific Integrated Circuit (ASIC) signal processing chip, which is shown schematically in fig. 1 in system interaction with a microcontroller. In the system, a microcontroller unit (MCU) is used as a main controller, and establishes physical connection with an IMU through a standard serial communication interface and performs data exchange. The MCU performs parameter configuration and mode initialization on the IMU through the link, and periodically reads the output original motion data. Simultaneously, the MCU monitors the alarm state of the IMU in real time through the universal input/output pins. When the IMU fails, the fault is reported to the MCU through an interrupt or level signal, so that the operation state monitoring and fault diagnosis are realized. However, under the conditions of complex automobile electronic and electric architecture and increasingly strict functional safety requirements, the development mode of IMU drive development by adopting a traditional bare metal or real-time operating system has the following defects: 1. the code styles are not uniform, and lack uniform architecture specifications; 2. the degree of coupling of software and hardware is high, and the degree of modularization is low; 3. Even in a stationary state, the accelerometer and gyroscope in the IMU will still output a non-zero fixed deviation, i.e. zero bias, which will directly contaminate all subsequent measurement data. Aiming at the problems, the conventional technical scheme in the industry is as follows: Aiming at the problem of architecture specification, the project responsible person regularly checks and prompts the correction by formulating an internal coding specification, unifying naming rules, file organization and function interfaces and assisting a code review mechanism. Aiming at the problem of coupling software and hardware, a hardware abstraction layer is usually introduced in the driver, and the operation of a lower-layer register is packaged into a unified interface so as to decouple the core driver from the hardware. Meanwhile, the hardware related parameters are centrally managed in a separate configuration file through macro definition. When the MCU platform is replaced, only the HAL layer and the configuration file are required to be adapted, and the core driving code can be kept unchanged. For zero offset problems, a zero offset acquisition and compensation mechanism is usually implemented in an IMU drive. When the system is initialized or the vehicle is stationary, a plurality of groups of data are continuously collected, the average value of the groups of data is calculated as zero offset value, and the zero offset value is stored in a random access memory or an electrically erasable programmable read-only memory (RAM or EEPROM). In normal operation, the zero offset value is subtracted from the real-time original data to obtain compensated effective data. The flow is shown in fig. 2. Although the above solution can deal with challenges in the traditional development mode to a certain extent, there are still more problems in practical engineering practice: 1. The architecture specification is difficult to unify due to the difference between developers and projects, and the interface definition and the file organization are random, so that the code cross-project multiplexing and portability are poor; 2. The hardware abstraction level is inconsistent, the parameter configuration management is scattered, the driving reusability is still not ideal when the MCU is replaced, and the boundary between the driving and the application module is fuzzy; 3. The zero offset compensation mechanism is imperfect, the static state is judged inaccurately, if the compensation value is stored in the EEPROM, the error of data is large and the reliability is low due to improper writing time, insufficient power-down protection or lack of a verification mechanism, and the whole scheme has defects in the aspect of functional safety compliance. Disclosure of Invention In view of this, the present application provides a data processing method, apparatus, computer device and storage medium, and the embodiments of the present application enable the development of IMUs to have higher standardization, portability and measurement accuracy, and not increase the maintenance burden of engineers, but also not affect the o