A data reading and writing method, system, device and medium of a vehicle-mounted sensor

CN116938971BActive Publication Date: 2026-08-21CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310593805.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2026-08-21
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

但是,在日益增加的智能驾驶需求中,由于传感器随着科技的发展,设备不断迭代,技术不断革新,比如摄像头技术日新月异,视频越来越清晰,激光雷达、毫米波雷达等精度不断提高,更换传感器的厂商,或者传感器型号等需求变得更加频繁,这些传感器的迭代更新维护会是一项繁重的工作量

Benefits of technology

[0039]本发明数据需求方通过读取传感器通用配置文件获取传感器列表,查询要使用的传感器,并新增未查询到的传感器或通过修改配置文件(json/yaml)来实现传感器的灵活替换,然后建立数据通道读取传感器数据,并对传感器数据进行处理,使传感器数据格式统一,屏蔽了由于不同厂商、不同传感器协议、不同传感器导致的数据差异,减少了替换传感器的适配工作,实现了传感器的自定义部署。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116938971B_ABST
    Figure CN116938971B_ABST
Patent Text Reader

Abstract

The application discloses a kind of data reading and writing method, system, equipment and medium of vehicle-mounted sensor, method is as follows: data demand party reads the general configuration file of sensor, obtains supported sensor list;General configuration file is parsed, and the sensor to be used is inquired, if not inquired then deploy the sensor in general configuration file;Vehicle-mounted system initializes the sensor to be used and establishes data channel to carry out data transmission;Data demand party requests to read the original data of the sensor to be used, parses sensor data and unifies data format;Sensor data channel and resource are released after data transmission is completed.The application makes each sensor data format uniform, reduces data difference, shields invalid development caused by sensor difference for fusion, regulation and control, decision and other upper layer applications, reduces redundant development;Meanwhile, flexible custom deployment of sensor is realized, which greatly reduces development workload.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of sensor data transmission, specifically relating to a data reading and writing method, system, device, and medium for vehicle-mounted sensors. Background Technology

[0002] The automotive industry is in a period of rapid development, with more and more intelligent and personalized functions. In particular, as autonomous driving gradually moves towards commercial application, the requirements for how sensors read and write data are becoming increasingly stringent. Various sensors such as LiDAR, millimeter-wave radar, and cameras provide data input for intelligent driving, which means that how to flexibly use various sensors has put forward new requirements.

[0003] During sensor data acquisition, each manufacturer provides its own data acquisition methods for each sensor. However, with the increasing demands of intelligent driving, sensors are constantly evolving with technological advancements, equipment is iterating, and technologies are innovating. For example, camera technology is advancing rapidly, video quality is becoming increasingly clear, and the accuracy of LiDAR and millimeter-wave radar is continuously improving. This leads to more frequent needs for changing sensor manufacturers or sensor models, making the iterative updates and maintenance of these sensors a heavy workload.

[0004] Therefore, with the continuous development of intelligent driving technology and the constant updating of various sensors, there is an urgent need to find a new method that can facilitate the reading and writing of data from these sensors. Summary of the Invention

[0005] The main objective of this invention is to overcome the shortcomings and deficiencies of the prior art and provide a method, system, device, and medium for reading and writing data of vehicle-mounted sensors. The data requester obtains the list of supported sensors by reading the sensor general configuration file, queries the sensors to be used, adds sensors that are not found, and then reads the sensor data by establishing a data channel and processes the sensor data to unify the sensor data format and reduce data differences.

[0006] The primary objective of this invention is to provide a method for reading and writing data from an onboard sensor, comprising the following steps:

[0007] The data requester reads the common configuration file of the sensors from the vehicle system to obtain a list of supported sensors;

[0008] The data requester parses the general configuration file, queries the sensor list for the sensor to be used, and if it is not found, deploys the sensor in the general configuration file.

[0009] The vehicle system initializes the sensors to be used and establishes a data channel with the data requester.

[0010] The data requester reads the raw data from the sensors to be used, parses the sensor data, and standardizes the data format;

[0011] After data transmission is complete, release the data channels and resources of the sensor to be used.

[0012] As a preferred technical solution, the general configuration file is a JSON or YAML file;

[0013] The contents of the general configuration file include module ID, module name, module path, receiving protocol, receiving port number, and publishing data protocol;

[0014] The receiving protocol is UDP, TCP, or CAN; the publishing data protocol is DDS or ZMQ.

[0015] When the receiving protocol is UDP or TCP, the receiving port number is not the port number used by the standard protocol;

[0016] When the receiving protocol is CAN, the receiving port number is selected according to the actual situation.

[0017] As a preferred technical solution, the step of querying the sensor to be used in the sensor list specifically involves:

[0018] The data requester uses the corresponding parsing program to parse the general configuration file and obtain the module ID of the sensor to be used;

[0019] Based on the module ID, locate the module path of the sensor to be used in the general configuration file, and obtain the library file path of the sensor to be used.

[0020] Based on the path to the sensor library file to be used, open the sensor library file, load and call the interface corresponding to the module ID in the sensor library file to complete the sensor startup.

[0021] As a preferred technical solution, the step of deploying the sensor in the general configuration file if it is not found specifically involves:

[0022] The data requester uses the library files provided by the sensor supplier that cannot be found as the original data provider for the sensor;

[0023] Deployment is performed in a common configuration file, including assigning module IDs, creating module names, adding module paths, configuring the receiving protocol, selecting the receiving port number, and setting the publishing data protocol;

[0024] At the same time, the data format conversion method of the sensor is set to convert it to a common data format;

[0025] Provide a unified I / O channel for the sensor, either for application calls or for publishing data via a data publishing protocol;

[0026] The IO channels include CAN, TCP, IP, DDS, and ZMP communication channels.

[0027] As a preferred technical solution, the data requester initializes the sensor to be used, binds it to the corresponding receiving port number according to the receiving protocol of the sensor in the general configuration file, and establishes a data channel between the data requester and the sensor to be used.

[0028] As a preferred technical solution, the data requester listens in real time through the established data channel, receives messages sent by the sensor, parses them to obtain the raw data provided by the sensor, converts them according to a common data format, and then publishes them through the sensor's data publishing protocol in the common configuration file.

[0029] The second objective of this invention is to provide a data reading and writing system for vehicle-mounted sensors, which is applied to the aforementioned data reading and writing method for vehicle-mounted sensors, and includes a list acquisition module, a query module, an addition module, a channel establishment module, and a data transmission module;

[0030] The list acquisition module is used to receive requests from data requesters, read the general configuration file of sensors from the vehicle system, and obtain a list of supported sensors.

[0031] The query module is used to parse the general configuration file and query the sensor to be used in the sensor list; if the query module does not find the sensor to be used, the addition module will deploy the sensor in the general configuration file.

[0032] The channel establishment module is used to initialize the sensors to be used and establish a data channel with the data requester.

[0033] The data transmission module is used by the data requester to read the raw data from the sensor to be used, parse the sensor data, unify the data format, and release the data channel and resources of the sensor to be used after the data transmission is completed.

[0034] A third objective of this invention is to provide an electronic device, characterized in that the electronic device comprises:

[0035] At least one processor; and a memory communicatively connected to said at least one processor; wherein,

[0036] The memory stores computer program instructions that can be executed by the at least one processor, which are then executed by the at least one processor to enable the at least one processor to perform the above-described method for reading and writing data from an on-board sensor.

[0037] The fourth objective of this invention is to provide a computer-readable storage medium storing a program, which, when executed by a processor, implements the aforementioned method for reading and writing data from an on-board sensor.

[0038] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0039] This invention allows data requesters to obtain a sensor list by reading a general sensor configuration file, query the sensors to be used, and add sensors that are not found or flexibly replace sensors by modifying the configuration file (json / yaml). Then, a data channel is established to read sensor data and process the sensor data to unify the sensor data format. This shields the data differences caused by different manufacturers, different sensor protocols, and different sensors, reduces the adaptation work for replacing sensors, and realizes the custom deployment of sensors. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating a data reading and writing method for an on-board sensor according to an embodiment of the present invention;

[0042] Figure 2 This is a block diagram of a data reading and writing system for an on-board sensor according to an embodiment of the present invention;

[0043] Figure 3 This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0044] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0045] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0046] Please see Figure 1 One embodiment of this application provides a method for reading and writing data from an on-board sensor, comprising the following steps:

[0047] S1. The data requester reads the common configuration file of the sensor from the vehicle system to obtain the list of supported sensors;

[0048] When the data requester obtains the list of supported sensors, the vehicle system's sensor framework provides a universal configuration file for the sensors. This universal configuration file provides the user with a list of currently supported sensors. The universal configuration file is a JSON or YAML file, and its content includes the module ID, module name, module path, receiving protocol, receiving port number, and publishing data protocol. The receiving protocol is one of UDP, TCP, or CAN protocols; the publishing data protocol is DDS or ZMQ, etc. When the receiving protocol is UDP or TCP, the receiving port number cannot be the standard port number used by the protocol; when the receiving protocol is CAN, the receiving port number is selected according to the actual situation.

[0049] For example, in a general configuration file sensor_config.yaml, its content is as follows:

[0050]

[0051] Where moduleId is the module ID, moduleName is the module name, modulePath is the module path, recvPtotocol is the receiving protocol, recvPort is the receiving port, and pubProtocol is the publishing protocol.

[0052] S2. The data requester parses the general configuration file, queries the sensor list for the sensor to be used, and if it is not found, deploys the sensor in the general configuration file.

[0053] S21. From the list of supported sensors obtained, query the sensor to be used, specifically:

[0054] First, the data requester uses the corresponding parsing program to parse the general configuration file and obtain the module ID of the sensor to be used;

[0055] Then, based on the module ID, find the module path of the sensor to be used in the general configuration file and obtain the library file path of the sensor to be used.

[0056] Based on the path to the sensor library file to be used, open the sensor library file, load and call the interface corresponding to the module ID in the sensor library file to complete the sensor startup.

[0057] S22. For sensors that were not found, they are deployed in a general configuration file to perform sensor data parsing and conversion. The specific steps are as follows:

[0058] The data requester uses the library files provided by the sensor supplier that cannot be found as the original data provider for the sensor;

[0059] Deployment is performed in a common configuration file, including assigning module IDs, creating module names, adding module paths, configuring the receiving protocol, selecting the receiving port number, and setting the publishing data protocol;

[0060] Simultaneously, the data format conversion method for this sensor should be configured to convert it to a universal data format; for example, a universal data format (which can be considered the universal data format of the OEM) can be summarized based on the data formats defined by mainstream radar manufacturers in the industry; for example, point cloud or target data used by radar:

[0061]

[0062]

[0063]

[0064]

[0065] By converting the raw data from radar sensors into these two unified data formats, the need for frequent data format modifications due to changes in sensor protocols can be mitigated.

[0066] Finally, a unified I / O channel is provided for the sensor, either for use by the application or for distribution via a data publishing protocol.

[0067] In this invention, the IO channel includes protocols such as CAN, TCP, and IP, providing a general communication interface; if there are other extended IO channels, such as DDS or ZMQ, the factory pattern can be used to extend the new communication method and complete the adaptation of the IO channel.

[0068] S3. The data requester initializes the sensors to be used and establishes a data channel with the data requester.

[0069] After finding the sensor to be used or deploying a new sensor, the data requester initializes the sensor and binds it to the corresponding receiving port number according to the sensor's receiving protocol in the general configuration file, thus establishing a data channel between the data requester and the sensor to be used.

[0070] According to the general configuration file mentioned above, the data requester binds to a sensor via the UDP receiving protocol and port number 6666 to establish an Ethernet data channel, and uses the sensor ID to uniquely identify the sensor.

[0071] S4. The data requester requests to read the data from the sensor to be used, parses the sensor data, and standardizes the data format, specifically as follows:

[0072] The data requester listens in real time (e.g., UDP port listening) on ​​the established data channel to receive messages sent by the sensor (uniquely identified by the sensor ID). Then, it parses the messages sent by the sensor (e.g., structures sent via UDP) to obtain the sensor's raw data. The parsed raw sensor data is then converted according to a common data format (e.g., RadarDetectionExample and RadarObjectExample mentioned above). Finally, the data is published in a unified format using the sensor's data publishing protocol in the common configuration file.

[0073] S5. Release the sensor data channel and resources after data transmission is complete.

[0074] It should be noted that, for the sake of simplicity, the aforementioned method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously.

[0075] Based on the same idea as the data reading and writing method for an on-board sensor in the above embodiments, the present invention also provides a data reading and writing system for an on-board sensor, which can be used to execute the data reading and writing method for an on-board sensor described above. For ease of explanation, the structural schematic diagram of an embodiment of the data reading and writing system for an on-board sensor only shows the parts related to the embodiments of the present invention. Those skilled in the art will understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0076] Please see Figure 2In another embodiment of this application, a data reading and writing system for vehicle sensors is provided. The system includes a list acquisition module, a query module, an addition module, a channel establishment module, and a data transmission module.

[0077] The list acquisition module is used to receive requests from data requesters, read the general configuration file of the sensors from the vehicle system, and obtain a list of supported sensors.

[0078] The query module is used to parse the general configuration file and search for the sensor to be used in the sensor list; if the query module does not find the sensor to be used, the add module will deploy the sensor in the general configuration file.

[0079] The channel establishment module is used to initialize the sensors to be used and establish a data channel with the data requester;

[0080] The data transmission module is used by the data requester to read the raw data from the sensor to be used, parse the sensor data, unify the data format, and release the data channel and resources of the sensor to be used after the data transmission is completed.

[0081] It should be noted that the data reading and writing system for vehicle-mounted sensors of the present invention corresponds one-to-one with the data reading and writing method for vehicle-mounted sensors of the present invention. The technical features and beneficial effects described in the above-described embodiments of the data reading and writing method for vehicle-mounted sensors are applicable to the embodiments of the data reading and writing system for vehicle-mounted sensors. For details, please refer to the description in the embodiments of the method of the present invention, which will not be repeated here.

[0082] Furthermore, in the above embodiment of a data reading and writing system for an on-board sensor, the logical division of each program module is merely an example. In actual applications, the above functions can be assigned to different program modules as needed, for example, for the sake of corresponding hardware configuration requirements or the convenience of software implementation. That is, the internal structure of the data reading and writing system for an on-board sensor can be divided into different program modules to complete all or part of the functions described above.

[0083] Please see Figure 3 In one embodiment, an electronic device is provided for implementing a data reading and writing method for vehicle-mounted sensors. The electronic device may include a first processor, a first memory, and a bus, and may also include a computer program stored in the first memory and executable on the first processor, such as a data reading and writing program for vehicle-mounted sensors.

[0084] The first memory includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the first memory can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the first memory can be an external storage device of the electronic device, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc. Furthermore, the first memory can include both internal and external storage units of the electronic device. The first memory can be used not only to store application software and various types of data installed on the electronic device, such as the code for data reading and writing programs of vehicle sensors, but also to temporarily store data that has been output or will be output.

[0085] In some embodiments, the first processor may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The first processor is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the first memory (e.g., data read / write programs for vehicle sensors) and calls data stored in the first memory to perform various functions of the electronic device and process data.

[0086] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0087] The data read / write program for the vehicle-mounted sensors stored in the first memory of the electronic device is a combination of multiple instructions. When run in the first processor, it can achieve the following:

[0088] The data requester reads the common configuration file of the sensors from the vehicle system to obtain a list of supported sensors;

[0089] The data requester parses the general configuration file, queries the sensor list for the sensor to be used, and if it is not found, deploys the sensor in the general configuration file.

[0090] The vehicle system initializes the sensors to be used and establishes a data channel with the data requester.

[0091] The data requester reads the raw data from the sensors to be used, parses the sensor data, and standardizes the data format;

[0092] After data transmission is complete, release the data channels and resources of the sensor to be used.

[0093] Furthermore, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0094] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0095] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A method for reading and writing data from an on-board sensor, characterized in that, Includes the following steps: The data requester reads the common configuration file of the sensors from the vehicle system to obtain a list of supported sensors; The data requester parses the general configuration file, queries the sensor list for the sensor to be used, and if it is not found, deploys the sensor in the general configuration file. The vehicle system initializes the sensors to be used and establishes a data channel with the data requester. The data requester reads the raw data from the sensors to be used, parses the sensor data, and standardizes the data format; After data transmission is complete, release the data channels and resources of the sensor to be used. If the sensor is not found, it will be deployed in the general configuration file, specifically as follows: The data requester uses the library files provided by the sensor supplier that cannot be found as the original data provider for the sensor; Deployment is performed in a common configuration file, including assigning module IDs, creating module names, adding module paths, configuring the receiving protocol, selecting the receiving port number, and setting the publishing data protocol; At the same time, the data format conversion method of the sensor is set to convert it to a common data format; Provide a unified I / O channel for the sensor, either for application calls or for publishing data via a data publishing protocol.

2. The data reading and writing method for an on-board sensor according to claim 1, characterized in that, The general configuration file is a JSON or YAML file; The contents of the general configuration file include module ID, module name, module path, receiving protocol, receiving port number, and publishing data protocol; The receiving protocol is UDP, TCP, or CAN; the publishing data protocol is DDS or ZMQ. When the receiving protocol is UDP or TCP, the receiving port number is not the port number used by the standard protocol; When the receiving protocol is CAN, the receiving port number is selected according to the actual situation.

3. The data reading and writing method for an on-board sensor according to claim 2, characterized in that, The process of querying the sensor to be used from the sensor list specifically involves: The data requester uses the corresponding parsing program to parse the general configuration file and obtain the module ID of the sensor to be used; Based on the module ID, locate the module path of the sensor to be used in the general configuration file, and obtain the library file path of the sensor to be used. Based on the path to the sensor library file to be used, open the sensor library file, load and call the interface corresponding to the module ID in the sensor library file to complete the sensor startup.

4. The data reading and writing method for an on-board sensor according to claim 2, characterized in that, The IO channels include CAN, TCP, IP, DDS, and ZMP communication channels.

5. The data reading and writing method for an on-board sensor according to claim 4, characterized in that, The data requester initializes the sensor to be used, binds it to the corresponding receiving port number according to the receiving protocol of the sensor in the general configuration file, and establishes a data channel between the data requester and the sensor to be used.

6. The data reading and writing method for an on-board sensor according to claim 5, characterized in that, The data requester listens in real time through the established data channel, receives messages sent by the sensor, parses them to obtain the raw data provided by the sensor, converts them according to a common data format, and then publishes them through the sensor's data publishing protocol in the common configuration file.

7. A data reading and writing system for vehicle-mounted sensors, characterized in that, A data reading and writing method for an on-board sensor according to any one of claims 1-6 includes a list acquisition module, a query module, an addition module, a channel establishment module, and a data transmission module; The list acquisition module is used to receive requests from data requesters, read the general configuration file of sensors from the vehicle system, and obtain a list of supported sensors. The query module is used to parse the general configuration file and query the sensor to be used in the sensor list; If the query module does not find the sensor to be used, the new module will deploy the sensor in the general configuration file. The channel establishment module is used to initialize the sensors to be used and establish a data channel with the data requester. The data transmission module is used by the data requester to read the raw data from the sensor to be used, parse the sensor data, unify the data format, and release the data channel and resources of the sensor to be used after the data transmission is completed.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to said at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform a data read / write method for an on-board sensor as described in any one of claims 1-6.

9. A computer-readable storage medium storing a program, characterized in that, When the program is executed by the processor, it implements the data reading and writing method for vehicle-mounted sensors as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method for obtaining sensor data in server, obtaining system and related device

    CN109005226A

  • System for realizing sensor management and application method thereof

    CN115454526A