Sensor abstraction layer design method, device and equipment based on annular buffer

By designing sensor abstraction layer and plug-in based on ring buffers, the complexity of sensor adaptation and inconvenient data processing in intelligent driving applications are solved, and the design of upper-level applications and unified data processing are achieved.

CN119962266AActive Publication Date: 2025-05-09SIENGINE TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510447910.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-05-09
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

When the existing technology directly adapts to different models of sensors in intelligent driving applications, there are problems such as high code complexity, differences in data protocols, and the lack of unified data drop-off and playback formats, which leads to inconvenient debugging of upper-level applications.

Method used

Design a sensor abstraction layer based on ring buffers. By building a sensor abstraction layer and corresponding plug-ins, the sensor raw data is read, stored and decoded, providing a unified data structure and operation interface, and shielding the differences between different sensors of different models.

Benefits of technology

It effectively reduces the difficulty of upper-level applications to adapt to different types of sensors, simplifies upper-level application design, provides unified access specifications and data processing interfaces, and facilitates upper-level application debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119962266A_ABST
    Figure CN119962266A_ABST
Patent Text Reader

Abstract

The invention discloses a sensor abstraction layer design method, device and equipment based on an annular buffer area, and relates to the technical field of vehicle sensor data processing.The method comprises the steps that a sensor abstraction layer is constructed, the plug-in is used for reading and storing the original data of the sensor based on the annular buffer area and decoding the original data of the sensor to obtain a uniform data structure and a uniform operation interface; the plug-in based on the sensor abstraction layer reads the sensor original data of the corresponding sensor, and stores the read sensor original data into the annular buffer area; and reading the original data of the sensor from the annular buffer area in sequence and executing decoding operation, and sending the decoded data to an intelligent driving application on the upper layer. The difficulty that the upper-layer application adapts to different types of sensors can be effectively reduced, and the upper-layer application design is simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle sensor data processing, and in particular to a sensor abstraction layer design method, device and equipment based on a ring buffer. Background Art

[0002] Smart driving applications need to access multiple types of sensor data, including Camera, LiDAR, Radar, IMU, GNSS, CAN, etc. The data types and operation methods of these different types of sensors vary greatly, and most of them are not standardized. It will waste a lot of manpower if the upper-level applications directly adapt to different types of sensors.

[0003] If the intelligent driving software is directly adapted to different types of sensors, the following disadvantages will occur: (1) The code needs to be designed with multiple different branches, each for accessing different types of sensors, which increases the complexity of software design; (2) Since sensors of different types have different transport layer types and data protocols, the workload of software coding is increased; (3) Due to different data protocols, there is a lack of a unified data storage and playback format, which makes it inconvenient to debug upper-level applications. Summary of the invention

[0004] The present application provides a sensor abstraction layer design method, device and equipment based on a ring buffer, which can effectively reduce the difficulty of upper-layer applications adapting to sensors of different models and simplify the upper-layer application design.

[0005] In a first aspect, an embodiment of the present application provides a sensor abstraction layer design method based on a ring buffer, and the sensor abstraction layer design method based on a ring buffer includes: Constructing a sensor abstraction layer, the sensor abstraction layer includes plug-ins corresponding to different types of sensors, for realizing the reading and storage of sensor raw data based on a ring buffer, and decoding the sensor raw data to obtain a unified data structure and a unified operation interface; The plug-in based on the sensor abstraction layer reads the raw sensor data of the corresponding sensor and stores the read raw sensor data into a ring buffer; The sensor raw data is read from the circular buffer in sequence and the decoding operation is performed, and the decoded data is sent to the upper-level intelligent driving application.

[0006] In combination with the first aspect, in one embodiment, the plug-in includes a camera plug-in corresponding to the camera, a lidar plug-in corresponding to the lidar, a millimeter-wave radar plug-in corresponding to the millimeter-wave radar, an inertial navigation plug-in corresponding to the inertial measurement unit, a satellite navigation plug-in corresponding to the satellite navigation system, and a CAN plug-in corresponding to the controller area network.

[0007] In combination with the first aspect, in one implementation, The unified data structure obtained after decoding the raw data of each type of sensor includes image data frame, lidar data frame, millimeter wave radar data frame, inertial unit data frame, satellite navigation data frame, and CAN data frame; The image data frame includes a timestamp, a DMA BUF, and attributes, and the lidar data frame includes a timestamp, a decoded returns, and attributes; The millimeter wave radar data frame includes timestamp, Radar Scans, and attributes, and the inertial unit data frame includes timestamp, IMU Mesurements, and attributes; The satellite navigation data frame includes a timestamp, GNSS Mesurements, and attributes, and the CAN data frame includes a timestamp, a CANFD Message, and attributes; The unified operation interface includes sensor lifecycle management, sensor data interaction, and sensor data decoding; The sensor life cycle management includes GetSensorInformation, CreateSensor, StartSensor, ResetSensor, StopSensor, and ReleaseSensor; The sensor data interaction includes GetRawData, ReturnRawData, PushRawData, RawDataReadyForDecode, SendMessage, SetFilter, and ClearFilter; The sensor data decoding includes GetDecodeConstants, GetDecodeFrame, and ValidatePacket.

[0008] In combination with the first aspect, in one implementation, the plug-in includes a circular buffer for storing sensor raw data read from a sensor, a decoding queue for storing sensor raw data to be decoded, and an interface for decoding the sensor raw data.

[0009] In combination with the first aspect, in one implementation, the sensor abstraction layer-based plug-in reads raw sensor data of a corresponding sensor and stores the read raw sensor data into a ring buffer, specifically including: The plug-in corresponding to the current sensor in the sensor abstraction layer reads the sensor's raw data; The plug-in stores the raw sensor data read into a ring buffer.

[0010] In combination with the first aspect, in one implementation, the reading of the sensor raw data from the ring buffer in sequence and performing a decoding operation, and sending the decoded data to an upper-layer intelligent driving application, specifically includes: The intelligent driving application reads the sensor raw data from the ring buffer in sequence and sends the read sensor raw data to the decoding queue of the corresponding plug-in; Get the raw sensor data from the decoding queue and perform decoding operations, get the decoded data and send it to the intelligent driving application; The intelligent driving application receives the decoded data and processes the decoded data.

[0011] In combination with the first aspect, in one implementation, The sensor abstraction layer is also used to copy the sensor raw data read from the ring buffer to the disk storage queue to implement sequential storage operations on the sensor raw data; The sensor abstraction layer is also used to load the stored sensor raw data into the playback queue, and call the PushRawData interface to send the sensor raw data in the playback queue to the decoding queue of the corresponding plug-in for decoding operation.

[0012] In combination with the first aspect, in one implementation, The ring buffer in the plugin supports multiple producers writing data and multiple consumers reading data; The producer is a thread for reading raw data of the sensor; The consumer is a thread for performing a decoding operation on raw data from the sensor.

[0013] In a second aspect, an embodiment of the present application provides a sensor abstraction layer design device based on a ring buffer, and the sensor abstraction layer design device based on a ring buffer includes: A construction module, which is used to construct a sensor abstraction layer, wherein the sensor abstraction layer includes plug-ins corresponding to different types of sensors, used to realize the reading and storage of sensor raw data based on a ring buffer, and to decode the sensor raw data into a unified data structure and a unified operation interface; A reading module, which is used to read the sensor raw data of the corresponding sensor based on the plug-in of the sensor abstraction layer, and store the read sensor raw data into a ring buffer; The decoding module is used to read the sensor raw data from the ring buffer in sequence and perform decoding operations, and send the decoded data to the upper-level intelligent driving application.

[0014] In a third aspect, an embodiment of the present application provides a sensor abstraction layer design device based on a ring buffer, wherein the sensor abstraction layer design device based on a ring buffer comprises a processor, a memory, and a sensor abstraction layer design program based on a ring buffer stored in the memory and executable by the processor, wherein when the sensor abstraction layer design program based on the ring buffer is executed by the processor, the steps of the sensor abstraction layer design method based on the ring buffer are implemented.

[0015] The beneficial effects brought by the technical solution provided in the embodiments of the present application include: The sensor abstraction layer isolates the upper-layer applications from the physical sensors, shielding the differences between different sensor models, providing a unified operation interface for the upper-layer applications, and simplifying the upper-layer application design; a unified access specification is provided for physical sensors, and the sensor supplier can encapsulate the data protocol and operation method into a plug-in, which is provided to the sensor abstraction layer for calling, reducing the user's workload; the sensor abstraction layer provides a unified data storage and playback function to facilitate upper-layer application debugging. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a sensor abstraction layer design method based on a ring buffer in this application; Figure 2 This is a schematic diagram of the structure of the sensor abstraction layer of this application; Figure 3 Schematic diagram of the process of obtaining raw sensor data and performing decoding operations; Figure 4 Design block diagram for multi-producer multi-consumer ring buffer; Figure 5 A schematic diagram of the functional modules of the sensor abstraction layer design device based on the ring buffer of the present application; Figure 6 Schematic diagram of the hardware structure of the sensor abstraction layer design device based on the ring buffer for this application. DETAILED DESCRIPTION

[0017] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0018] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0019] In a first aspect, an embodiment of the present application provides a sensor abstraction layer design method based on a ring buffer, which is used to reduce the difficulty of upper-layer applications adapting to sensors of different models and simplify the design of upper-layer applications.

[0020] In one embodiment, referring to Figure 1 , Figure 1 The following is a flow chart of the sensor abstraction layer design method based on the ring buffer in this application. Figure 1 As shown in the figure, the sensor abstraction layer design method based on the ring buffer includes: S1: Build a sensor abstraction layer, which includes plug-ins corresponding to different types of sensors, used to read and store sensor raw data based on a ring buffer, and decode the sensor raw data to obtain a unified data structure and a unified operation interface; use the sensor abstraction layer as part of the intelligent driving application middleware; S2: The plug-in based on the sensor abstraction layer reads the sensor raw data of the corresponding sensor and stores the read sensor raw data into the ring buffer; S3: Read the sensor raw data from the ring buffer in sequence and perform decoding operations, and send the decoded data to the upper-level intelligent driving application.

[0021] See also Figure 2 As shown in the figure, it is a schematic diagram of the structure of the sensor abstraction layer, and the plug-ins therein specifically include a camera plug-in corresponding to the camera, a lidar plug-in corresponding to the lidar, a millimeter-wave radar plug-in corresponding to the millimeter-wave radar, an inertial navigation plug-in corresponding to the inertial measurement unit, a satellite navigation plug-in corresponding to the satellite navigation system, and a CAN (Controller Area Network) plug-in corresponding to the controller area network. Each plug-in is used to read the raw data of the corresponding sensor and perform decoding operations. In actual applications, if other types of sensors are included, the sensor abstraction layer is provided with corresponding plug-ins.

[0022] In the present application, the unified data structure obtained after decoding the raw data of each type of sensor includes an image data frame, a lidar data frame, a millimeter wave radar data frame, an inertial unit data frame, a satellite navigation data frame, and a CAN data frame. For example, the unified data structure obtained after decoding the raw data of the lidar sensor is a lidar data frame.

[0023] Specifically, the image data frame includes timestamp, DMA BUF, and attributes; the lidar data frame includes timestamp, Decoded Returns, and attributes; the millimeter wave radar data frame includes timestamp, Radar Scans, and attributes; the inertial unit data frame includes timestamp, IMU Mesurements, and attributes; the satellite navigation data frame includes timestamp, GNSS Mesurements, and attributes; and the CAN data frame includes timestamp, CAN FD Message, and attributes.

[0024] Among them, DMA BUF is a direct memory access buffer, Decoded Returns is a decoded radar data frame, Radar Scans is a radar scan data frame, IMU Mesurements is an inertial measurement unit data frame, GNSS Mesurements is a satellite navigation system data frame, and CANFD Message is a controller area network message.

[0025] For the attributes in the image data frame, they are image attributes, including width, height, format, frame rate, offset address, etc.; for the attributes in the lidar data frame, they are lidar attributes, including scanning frequency, number of output points per scan, point cloud step, horizontal start angle, horizontal end angle, vertical actual angle, vertical end angle, etc.; for the attributes in the millimeter wave radar data frame, they are millimeter wave radar attributes, including scanning type, number of data frames returned per scan, scanning frequency, etc.; for the attributes in the inertial unit data frame, they are inertial unit attributes, including initial alignment status, temperature status, whether to turn on temperature compensation, etc.; for the attributes in the satellite navigation data frame, they are satellite navigation data attributes, including satellite navigation positioning type, satellite navigation positioning status, timestamp quality, etc.; for the attributes in the CAN data frame, they are CAN attributes, including data frame type, transmission baud rate, etc.

[0026] In this application, the unified operation interface includes sensor lifecycle management, sensor data interaction, and sensor data decoding. By decoding the raw sensor data of various types of sensors into a unified data structure, a unified operation interface is formed and provided to the upper layer application.

[0027] Specifically, the sensor life cycle management includes GetSensorInformation, CreateSensor, StartSensor, ResetSensor, StopSensor, and ReleaseSensor; the sensor data interaction includes GetRawData, ReturnRawData, PushRawData, RawDataReadyForDecode, SendMessage, SetFilter, and ClearFilter; the sensor data decoding includes GetDecodeConstants, GetDecodeFrame, and ValidatePacket.

[0028] Among them, GetSensorInformation means obtaining sensor attribute information; CreateSensor means creating a sensor object; StartSensor means starting a sensor object; ResetSensor means resetting a sensor object; StopSensor means stopping a sensor object; ReleaseSensor means releasing a sensor object; GetRawData means obtaining raw data; ReturnRawData means returning raw data; PushRawData means pushing raw data; RawDataReadyForDecode means whether the raw data is complete and can be decoded; SendMessage means sending a message to the sensor; SetFilter means setting a (CAN message) filter; ClearFilter means clearing a (CAN message) filter; GetDecodeConstants means obtaining sensor decoding attribute constants; GetDecodeFrame means obtaining decoded sensor data frames; ValidatePacket means verifying sensor data frames.

[0029] For the structure of the plugin, see Figure 3 As shown, the plug-in includes a ring buffer for storing the sensor raw data read from the sensor, a decoding queue for storing the sensor raw data to be decoded, and an interface for decoding the sensor raw data. That is, the main components of the plug-in should include a ring buffer (for storing the sensor raw data read from the sensor), a decoding queue (for storing the sensor raw data to be decoded), and a group of interfaces (for decoding the sensor raw data).

[0030] Furthermore, in one embodiment, the sensor abstraction layer-based plug-in reads the sensor raw data of the corresponding sensor and stores the read sensor raw data into a ring buffer, specifically including: S201: The plug-in corresponding to the current sensor in the sensor abstraction layer reads the sensor raw data; S202: The plug-in stores the read raw sensor data into a ring buffer.

[0031] Furthermore, in one embodiment, the raw data of the sensor is read from the ring buffer in sequence and a decoding operation is performed, and the decoded data is sent to the upper-layer intelligent driving application, specifically including: S301: the intelligent driving application reads the sensor raw data from the ring buffer in sequence, and sends the read sensor raw data to the decoding queue of the corresponding plug-in; for example, if the read sensor raw data is the sensor raw data of the laser radar, the sensor raw data is sent to the decoding queue of the laser radar plug-in; S302: Obtaining sensor raw data from a decoding queue and performing a decoding operation to obtain decoded data and send it to the intelligent driving application; S303: The intelligent driving application receives the decoded data and processes the decoded data.

[0032] For details, see Figure 3 The figure shows a schematic diagram of the process of obtaining sensor raw data and performing decoding operations. The plug-in waits for the sensor to detect and obtain the sensor raw data and reads it, and stores the read sensor raw data into the head of the ring buffer. The intelligent driving application obtains the sensor raw data from the tail of the ring buffer and pushes the obtained sensor raw data into the decoding queue of the plug-in corresponding to the sensor raw data. Then, the sensor raw data is obtained from the decoding queue and decoded to obtain the decoded data. The intelligent driving application obtains the decoded data and processes the decoded data.

[0033] It should be noted that for the decoding of sensor raw data in this application, taking the Robosense M1 laser radar as an example, it outputs two protocol frames (i.e. sensor raw data) through Ethernet: MSOP (Main dataStream Output Protocol) and DIFOP (Device Info Output Protocol), where MSOP contains time_offset, radius, elevation, azimuth, intensity and other fields, and decoding it can solve the timestamp, polar coordinates and other information of the point cloud; DIFOP contains some configuration information of the radar, such as single echo mode or dual echo mode, and decoding it can obtain echo mode information. In actual applications, the specific decoding logic of the sensor raw data can be written into the plug-in by the sensor supplier or customer.

[0034] It should be noted that the processing logic of the decoded data obtained by decoding the raw data of the sensor is written by the algorithm supplier or the customer, and generally includes the following operations: converting polar coordinates to Cartesian coordinates, motion compensation, filtering, converting sensor coordinate system to vehicle coordinate system, point cloud perception model processing, etc.

[0035] Furthermore, the sensor abstraction layer of the present application is also used to provide unified data storage and playback functions to facilitate upper-level application debugging. The sensor abstraction layer copies the sensor raw data read from the ring buffer to the storage queue, thereby realizing sequential storage operations on the sensor raw data. Specifically, when the upper-level application is debugging, for data storage, the intelligent driving application will copy the sensor raw data read from the ring buffer to the storage queue, thereby realizing the storage of the sensor raw data.

[0036] The sensor abstraction layer loads the stored sensor raw data into the playback queue, and calls the PushRawData interface (an interface used to implement data transmission) to send the sensor raw data in the playback queue to the decoding queue of the corresponding plug-in for decoding operations. Specifically, when the upper-layer application is debugging, for data playback, the intelligent driving application loads the stored sensor raw data into the playback queue, and then sends the sensor raw data in the playback queue to the decoding queue of the corresponding plug-in.

[0037] For further information, see Figure 4 As shown in the figure, the ring buffer in the plug-in supports multiple producers to write data and multiple consumers to read data, and can support high-frequency read and write lock-free operations. The ring buffer also has 4 read-write state buffer units. Figure 4 Filled indicates a full state, Reading indicates a read-lock state, Writing indicates a write-lock state, and Empty indicates an empty state.

[0038] The producer is the thread used to read the raw data of the sensor, that is, the thread in the plug-in that reads the raw data of the sensor from the physical interface (Ethernet / serial port) is the producer, and the producer is connected to the head of the ring buffer. The consumer is the thread used to decode the raw data of the sensor, that is, the thread that decodes the raw data of the sensor into a unified data structure, and the consumer is connected to the tail of the ring buffer.

[0039] The sensor abstraction layer design method based on the ring buffer in the embodiment of the present application isolates the upper-layer application from the physical sensor through the sensor abstraction layer, shields the differences between sensors of different models, provides a unified operation interface for the upper-layer application, and simplifies the upper-layer application design; provides a unified access specification for the physical sensor, and the sensor supplier can encapsulate the data protocol and operation method into a plug-in, which is provided to the sensor abstraction layer for calling, thereby reducing the user's workload; the sensor abstraction layer provides a unified data storage and playback function, which is convenient for upper-layer application debugging.

[0040] In a second aspect, an embodiment of the present application also provides a sensor abstraction layer design device based on a ring buffer.

[0041] In one embodiment, referring to Figure 5 , Figure 5 This is a functional module diagram of the sensor abstraction layer design device based on the ring buffer in this application. Figure 5 As shown, the sensor abstraction layer design device based on the ring buffer includes: a building module, a reading module, and a decoding module.

[0042] The construction module is used to build a sensor abstraction layer, which includes plug-ins corresponding to different types of sensors, used to realize sensor raw data reading and storage based on a circular buffer, and decode the sensor raw data into a unified data structure and a unified operation interface; the reading module is used to read the sensor raw data of the corresponding sensor based on the plug-in of the sensor abstraction layer, and store the read sensor raw data into the circular buffer; the decoding module is used to read the sensor raw data from the circular buffer in turn and perform decoding operations, and send the decoded data to the upper-level intelligent driving application.

[0043] In a third aspect, an embodiment of the present application provides a sensor abstraction layer design device based on a ring buffer. The sensor abstraction layer design device based on the ring buffer can be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.

[0044] Reference Figure 6 , Figure 6 The schematic diagram of the hardware structure of the sensor abstraction layer design device based on the ring buffer involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the sensor abstraction layer design device based on the ring buffer may include a processor, a memory, a communication interface and a communication bus.

[0045] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0046] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the interconnection of devices inside the sensor abstraction layer design device based on the ring buffer, and the interface used to realize the interconnection between the sensor abstraction layer design device based on the ring buffer and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display (Display), a keyboard (Keyboard), etc.

[0047] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0048] The processor may be a general-purpose processor, which may call the sensor abstraction layer design program based on the ring buffer stored in the memory and execute the sensor abstraction layer design method based on the ring buffer provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the sensor abstraction layer design program based on the ring buffer is called may refer to the various embodiments of the sensor abstraction layer design method based on the ring buffer of the present application, which will not be described in detail here.

[0049] Those skilled in the art will understand that Figure 6 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0050] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0051] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" 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 "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0052] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0053] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0054] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0055] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A sensor abstraction layer design method based on a ring buffer, characterized in that: The sensor abstraction layer design method based on the ring buffer includes: Constructing a sensor abstraction layer, the sensor abstraction layer includes plug-ins corresponding to different types of sensors, for realizing the reading and storage of sensor raw data based on a ring buffer, and decoding the sensor raw data to obtain a unified data structure and a unified operation interface; The plug-in based on the sensor abstraction layer reads the sensor raw data of the corresponding sensor and stores the read sensor raw data into the ring buffer; The sensor raw data is read from the ring buffer in sequence and the decoding operation is performed, and the decoded data is sent to the upper-level intelligent driving application.

2. The sensor abstraction layer design method based on the ring buffer as claimed in claim 1, characterized in that: The plug-ins include a camera plug-in corresponding to the camera, a lidar plug-in corresponding to the lidar, a millimeter-wave radar plug-in corresponding to the millimeter-wave radar, an inertial navigation plug-in corresponding to the inertial measurement unit, a satellite navigation plug-in corresponding to the satellite navigation system, and a CAN plug-in corresponding to the controller area network.

3. A sensor abstraction layer design method based on a ring buffer as claimed in claim 2, characterized in that: The unified data structure obtained after decoding the raw data of each type of sensor includes image data frame, lidar data frame, millimeter wave radar data frame, inertial unit data frame, satellite navigation data frame, and CAN data frame; The image data frame includes a timestamp, a DMA BUF, and attributes, and the lidar data frame includes a timestamp, a decoded returns, and attributes; The millimeter wave radar data frame includes timestamp, Radar Scans, and attributes, and the inertial unit data frame includes timestamp, IMU Mesurements, and attributes; The satellite navigation data frame includes a timestamp, GNSS Mesurements, and attributes, and the CAN data frame includes a timestamp, a CANFD Message, and attributes; The unified operation interface includes sensor lifecycle management, sensor data interaction, and sensor data decoding; The sensor life cycle management includes GetSensorInformation, CreateSensor, StartSensor, ResetSensor, StopSensor, and ReleaseSensor; The sensor data interaction includes GetRawData, ReturnRawData, PushRawData, RawDataReadyForDecode, SendMessage, SetFilter, and ClearFilter; The sensor data decoding includes GetDecodeConstants, GetDecodeFrame, and ValidatePacket.

4. The sensor abstraction layer design method based on the ring buffer as claimed in claim 1, characterized in that: The plug-in includes a ring buffer for storing raw sensor data read from a sensor, a decoding queue for storing raw sensor data to be decoded, and an interface for decoding raw sensor data.

5. A sensor abstraction layer design method based on a ring buffer as claimed in claim 4, characterized in that: The sensor abstraction layer-based plug-in reads the sensor raw data of the corresponding sensor and stores the read sensor raw data into a ring buffer, specifically including: The plug-in corresponding to the current sensor in the sensor abstraction layer reads the sensor's raw data; The plug-in stores the raw sensor data read into a ring buffer.

6. A sensor abstraction layer design method based on a ring buffer as claimed in claim 4, characterized in that: The process of sequentially reading the raw sensor data from the ring buffer and performing decoding operations, and sending the decoded data to the upper-layer intelligent driving application, specifically includes: The intelligent driving application reads the sensor raw data from the ring buffer in sequence and sends the read sensor raw data to the decoding queue of the corresponding plug-in; Get the raw sensor data from the decoding queue and perform decoding operations, get the decoded data and send it to the intelligent driving application; The intelligent driving application receives the decoded data and processes the decoded data.

7. A sensor abstraction layer design method based on a ring buffer as claimed in claim 6, characterized in that: The sensor abstraction layer is also used to copy the sensor raw data read from the ring buffer to the disk storage queue to implement sequential storage operations on the sensor raw data; The sensor abstraction layer is also used to load the stored sensor raw data into the playback queue, and call the PushRawData interface to send the sensor raw data in the playback queue to the decoding queue of the corresponding plug-in for decoding operation.

8. The sensor abstraction layer design method based on the ring buffer as claimed in claim 4, characterized in that: The ring buffer in the plugin supports multiple producers writing data and multiple consumers reading data; The producer is a thread for reading raw data of the sensor; The consumer is a thread for performing a decoding operation on raw data from the sensor.

9. A sensor abstraction layer design device based on a ring buffer, characterized in that: The sensor abstraction layer design device based on the ring buffer includes: A construction module, which is used to construct a sensor abstraction layer, wherein the sensor abstraction layer includes plug-ins corresponding to different types of sensors, used to realize the reading and storage of sensor raw data based on a ring buffer, and to decode the sensor raw data into a unified data structure and a unified operation interface; A reading module, which is used to read the sensor raw data of the corresponding sensor based on the plug-in of the sensor abstraction layer, and store the read sensor raw data into a ring buffer; The decoding module is used to read the sensor raw data from the ring buffer in sequence and perform decoding operations, and send the decoded data to the upper-level intelligent driving application.

10. A sensor abstraction layer design device based on a ring buffer, characterized in that: The sensor abstraction layer design device based on the ring buffer includes a processor, a memory, and a sensor abstraction layer design program based on the ring buffer stored in the memory and executable by the processor, wherein when the sensor abstraction layer design program based on the ring buffer is executed by the processor, the steps of the sensor abstraction layer design method based on the ring buffer as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Multi-sensor data fusion system based on LiteOS Internet of Things operating system

    CN110474990A

  • Image processing method and device, electronic equipment and readable storage medium

    CN113014804A

  • Framework system for abstract management of sensor data and design method

    CN114840189A

  • Interface flow controller for data center cooling system

    CN116723667A

  • Internet of Things data storage system and method based on block chain

    CN117112698A