Sensor data sharing method and device, vehicle and storage medium

By sharing memory between different terminals within the vehicle, cross-terminal sharing of sensor data is solved, and the problem that sensor data cannot be shared across terminals is improved, and the collaborative working ability between internal systems of the vehicle is improved.

CN119127524APending Publication Date: 2024-12-13CHINA FAW CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411115852.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the prior art, sensor data cannot be shared across terminals, resulting in limited collaborative work between internal systems of the vehicle, and it is impossible to access sensor data from different terminals at the same time by multiple processes.

Method used

By sharing memory between the first terminal and the second terminal, sensor data is acquired and sent, so that at least two processes can share the first perceptual data and the second perceptual data, sensor data sharing across terminals is realized.

Benefits of technology

It realizes sensor data sharing across terminals in the vehicle, solves the problem that sensor data cannot be shared across terminals, and improves the collaborative working ability between internal systems of the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127524A_ABST
    Figure CN119127524A_ABST
Patent Text Reader

Abstract

The invention discloses a sensor data sharing method and device, a vehicle and a storage medium, and relates to the field of automobiles. The method comprises the following steps: acquiring sensing data of a first sensor to obtain first sensing data; the first sensing data is sent to a second terminal, so that the second terminal stores the first sensing data into a second shared memory, the second shared memory is the shared memory of the second terminal, the first sensing data stored in the second shared memory is shared by at least two processes of the second terminal, and the second terminal is provided with a second sensor; obtaining sensing data of a second sensor from a second terminal to obtain second sensing data; the second sensing data is stored in a first shared memory, the first shared memory is the shared memory of the first terminal, and the second sensing data stored in the first shared memory is shared by at least two processes of the first terminal. Through the technical scheme of the embodiment of the invention, cross-terminal sensor data sharing in the vehicle can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the automotive field, and in particular to a sensor data sharing method, device, vehicle and storage medium. Background Art

[0002] In recent years, with the rapid development of autonomous driving technology, the hardware and software systems inside vehicles have become increasingly complex and integrated. Autonomous driving systems rely on a variety of high-precision sensors (such as cameras, radars, lidars, etc.) to obtain real-time information about the surrounding environment to support key functions such as environmental perception, decision making, and vehicle control.

[0003] However, in the prior art, some sensors (such as cameras based on specific frameworks such as V4L2) have resource exclusivity issues, that is, they can only be accessed by one process at a time. As a result, when multiple processes in the same terminal connected to the sensor in the vehicle need to access the same sensor data at the same time, they must rely on inefficient polling or forwarding mechanisms, which increases system complexity and latency. On the other hand, for sensors that support simultaneous access by multiple processes, although multiple processes in the same terminal connected to the sensor in the vehicle can access the sensor data at the same time, multiple processes in terminals that are not connected to the sensor cannot access the sensor data, which will affect the collaborative work between various systems within the vehicle (such as environmental perception, driving assistance, entertainment systems, etc.).

[0004] Therefore, it is urgent to propose a new method to solve the above problems. Summary of the invention

[0005] The present invention provides a sensor data sharing method, device, vehicle and storage medium, which can realize sensor data sharing across terminals in a vehicle.

[0006] In a first aspect, an embodiment of the present invention provides a sensor data sharing method, which is applied to a first terminal, where the first terminal is configured with a first sensor, and the method includes:

[0007] Acquire the sensing data of the first sensor to obtain first sensing data;

[0008] Sending the first sensed data to a second terminal so that the second terminal stores the first sensed data in a second shared memory, where the second shared memory is a shared memory of the second terminal, where the first sensed data stored in the second shared memory is shared by at least two processes of the second terminal, and where the second terminal is configured with a second sensor;

[0009] Acquire the sensing data of the second sensor from the second terminal to obtain second sensing data;

[0010] The second perception data is stored in a first shared memory, where the first shared memory is a shared memory of the first terminal, and the second perception data stored in the first shared memory is shared by at least two processes of the first terminal.

[0011] The technical solution of the present invention provides a data basis for sending the first sensed data to the second terminal by acquiring the first sensed data. Then, the first sensed data is sent to the second terminal, so that the second terminal can store the first sensed data in the second shared memory, so that at least two processes of the second terminal can share the first sensed data. Afterwards, by acquiring the second sensed data, a data basis is provided for storing the second sensed data in the first shared memory. Finally, the second sensed data is stored in the first shared memory, so that at least two processes of the first terminal can share the second sensed data. Compared with the prior art, although multiple processes in the same terminal connected to the concurrently accessible sensor in the vehicle can access the data of the sensor at the same time, multiple processes in the terminal not connected to the sensor cannot access the data of the sensor, thereby affecting the collaborative work between the various systems inside the vehicle, the present invention acquires the first sensed data, sends the first sensed data to the second terminal, so that the second terminal stores the first sensed data in the second shared memory, and then acquires the second sensed data from the second terminal, and stores the second sensed data in the first shared memory, so that at least two processes of the first terminal and the second terminal can use the first sensed data and the second sensed data, thereby realizing the sensor data sharing across terminals in the vehicle. Therefore, the present invention can solve the problem that sensor data cannot be shared across terminals.

[0012] In a second aspect, an embodiment of the present invention further provides a sensor data sharing device, which is applied to a first terminal, wherein the first terminal is configured with a first sensor, and the device includes:

[0013] A first acquisition module, used to acquire the sensing data of the first sensor to obtain first sensing data;

[0014] a sending module, configured to send the first sensed data to a second terminal, so that the second terminal stores the first sensed data in a second shared memory, wherein the second shared memory is a shared memory of the second terminal, and the first sensed data stored in the second shared memory is shared by at least two processes of the second terminal, and the second terminal is configured with a second sensor;

[0015] A second acquisition module, configured to acquire the sensing data of the second sensor from the second terminal to obtain second sensing data;

[0016] The storage module is used to store the second perception data into a first shared memory, where the first shared memory is a shared memory of the first terminal, and the second perception data stored in the first shared memory is shared by at least two processes of the first terminal.

[0017] In a third aspect, an embodiment of the present invention further provides a vehicle, the vehicle comprising:

[0018] at least one processor; and a memory communicatively coupled to the at least one processor;

[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can implement any sensor data sharing method described in the first aspect.

[0020] In a fourth aspect, an embodiment of the present invention further provides a storage medium including computer executable instructions,

[0021] The computer executable instructions implement any sensor data sharing method described in the first aspect when executed by a computer processor.

[0022] It should be noted that the above computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer-readable storage medium may be packaged together with the processor of the sensor data sharing device, or may be packaged separately from the processor of the sensor data sharing device, and this application does not limit this.

[0023] The description of the second, third and fourth aspects in this application can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second, third and fourth aspects can refer to the beneficial effect analysis of the first aspect, which will not be repeated here.

[0024] In this application, the name of the sensor data sharing device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of the claims of this application and their equivalent technologies.

[0025] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1a A flow chart of a sensor data sharing method provided by an embodiment of the present invention;

[0028] Figure 1b An example diagram of an implementation method of a sensor data sharing method provided in an embodiment of the present invention;

[0029] Figure 2a A flowchart of another sensor data sharing method provided by an embodiment of the present invention;

[0030] Figure 2b A timing diagram for allocating a shared storage space provided by an embodiment of the present invention;

[0031] Figure 2c A timing diagram of data transmission provided by an embodiment of the present invention;

[0032] Figure 2d A timing diagram for releasing a shared memory space provided by an embodiment of the present invention;

[0033] Figure 3 A schematic diagram of the structure of a sensor data sharing device provided by an embodiment of the present invention;

[0034] Figure 4 A schematic structural diagram of a vehicle provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0036] The term "and / or" in this article 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.

[0037] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0038] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application 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 may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0039] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0040] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" 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" or "for example" is intended to present related concepts in a specific way.

[0041] In the description of the present application, unless otherwise specified, “plurality” means two or more.

[0042] Figure 1a This is a flow chart of a sensor data sharing method provided by an embodiment of the present invention. This embodiment is applicable to the situation where sensor data of multiple terminals in a vehicle need to be shared. The method can be executed by a sensor data sharing device, which can be implemented in software and / or hardware. For example, the device can be a vehicle. Figure 1a The sensor data sharing method of this embodiment specifically includes the following steps:

[0043] Step 110: Acquire the perception data of the first sensor to obtain first perception data.

[0044] Specifically, the first sensor refers to a sensor configured at the first terminal, for example, the first sensor may be a speed sensor, a temperature sensor, or a humidity sensor. The first terminal refers to a control unit or computing device in the vehicle, for example, the first terminal may be an electronic control unit responsible for driving system control, a central gateway or a host computer that manages the communication network inside the vehicle, etc. Perception data refers to data collected by a sensor, for example, the perception data of a temperature sensor is a temperature value, and the perception data of a camera sensor is an image frame. The first perception data refers to the perception data acquired by the first sensor.

[0045] In a specific implementation, a suitable first sensor may be selected according to actual conditions or requirements. For example, if the first terminal needs to monitor the speed of the vehicle, a speed sensor may be selected; if the first terminal needs to monitor the environment around the vehicle, a radar sensor may be selected. Afterwards, the first sensor may be started through the first terminal to collect corresponding perception data, and then the first sensor may transmit the collected data to the first terminal via a wired or wireless method, for example, the wired method may be a controller area network (CAN), and the wireless method may be Bluetooth, so that the first terminal obtains the perception data of the first sensor and obtains the first perception data.

[0046] In this embodiment, by acquiring the perception data of the first sensor, a data basis is provided for subsequently sending the first perception data to the second terminal.

[0047] Step 120: Send the first perception data to the second terminal, so that the second terminal stores the first perception data in a second shared memory.

[0048] Specifically, the second terminal refers to another electronic control unit or computing device inside the vehicle, which undertakes functions or tasks different from those of the first terminal. For example, the second terminal can be an electronic control unit that specializes in processing environmental perception data for assisted driving or automatic driving systems. The second shared memory is a shared memory of the second terminal. The first perception data stored in the second shared memory is shared by at least two processes of the second terminal. These processes are two or more independent computing tasks running on the second terminal. They can share the data in the second shared memory and are responsible for different functions (such as data processing, analysis, decision making or control execution, etc.), but need to access the same sensor data to work together. The second terminal is configured with a second sensor. For example, the second sensor can be a light intensity sensor or a radar sensor.

[0049] In a specific implementation, after obtaining the first perception data, the first perception data can be encapsulated and processed based on operations such as formatting data, adding timestamps and / or verifying data integrity to ensure that the data is not easily tampered with or lost during transmission. Then, a suitable communication protocol is selected according to actual needs to establish a communication link between the first terminal and the second terminal. For example, the communication protocol can be CAN bus, FlexRay or Ethernet. Then, through the established communication link, the encapsulated first perception data is sent to the second terminal. After receiving the data, the second terminal can store the first perception data in the second shared memory. After the data is stored in the second shared memory, at least two processes on the second terminal can access the data simultaneously through the shared memory. These processes can read or modify the data as needed to support their respective functions and tasks.

[0050] In addition, after receiving the data, the second terminal may first perform data verification on the data to ensure the integrity and correctness of the data. For example, the data verification may include checking a checksum, a timestamp, and the like.

[0051] In this embodiment, by sending the first perception data to the second terminal, the second terminal can store the first perception data in the second shared memory, so that at least two processes of the second terminal can share the first perception data.

[0052] Step 130: Acquire the perception data of the second sensor from the second terminal to obtain second perception data.

[0053] Specifically, the second perception data refers to perception data obtained by the second sensor.

[0054] In a specific implementation, a request is first initiated to the second terminal to obtain the perception data of the second sensor. After receiving the request, the second terminal reads the second perception data from the second shared memory, and encapsulates the read second perception data based on operations such as formatting data and / or encryption. After that, the second terminal sends the encapsulated data to the first terminal through the previously established communication link. After receiving the data, the first terminal can perform parsing based on operations such as decompression, decryption and / or format conversion to restore the original perception data, i.e., the second perception data.

[0055] In this embodiment, by acquiring the second perception data, a data basis is provided for subsequently storing the second perception data in the first shared memory.

[0056] Step 140: store the second perception data into the first shared memory.

[0057] Specifically, the first shared memory is a shared memory of the first terminal, and the second perception data stored in the first shared memory is shared by at least two processes of the first terminal.

[0058] In a specific implementation, after obtaining the second perception data, the attribute information of the second perception data can be determined first, for example, the attribute information can be the data type, the data size, and whether a specific alignment method is required. Then, according to the attribute information, the storage space size required for the second perception data is calculated. For example, if the second perception data is image data, and the attribute information is the total number of pixels and the number of bytes per pixel, then the storage space size can be determined to be (total number of pixels × number of bytes per pixel) / compression ratio + additional overhead. Then, the state of the first shared memory is queried to determine whether there is enough continuous space to meet the storage requirements of the second perception data. For example, it can be determined by traversing the metadata whether there is enough continuous space to meet the storage requirements of the second perception data. When it is determined that there is enough continuous space, the specific location of the storage space where the second perception data is stored in the first shared memory can be determined by calculating the offset, and then it can be stored in the storage space in the first shared memory, and the state information of the first shared memory (such as which parts of the space have been used and which parts of the space are still available) is updated. When it is determined that there is not enough continuous space, the second perception data can be compressed to reduce the space it occupies.

[0059] In this embodiment, the second perception data is stored in the first shared memory, so that at least two processes of the first terminal can share the second perception data.

[0060] In an embodiment of the present invention, by acquiring the first sensed data, a data basis is provided for sending the first sensed data to the second terminal. Then, the first sensed data is sent to the second terminal, so that the second terminal can store the first sensed data in the second shared memory, so that at least two processes of the second terminal can share the first sensed data. Then, by acquiring the second sensed data, a data basis is provided for storing the second sensed data in the first shared memory. Finally, the second sensed data is stored in the first shared memory, so that at least two processes of the first terminal can share the second sensed data. Compared with the prior art, although multiple processes in the same terminal connected to the concurrently accessible sensor in the vehicle can access the data of the sensor at the same time, multiple processes in the terminal not connected to the sensor cannot access the data of the sensor, thereby affecting the collaborative work between the various systems inside the vehicle, the present invention acquires the first sensed data, sends the first sensed data to the second terminal, so that the second terminal stores the first sensed data in the second shared memory, and then acquires the second sensed data from the second terminal, and stores the second sensed data in the first shared memory, so that at least two processes of the first terminal and the second terminal can use the first sensed data and the second sensed data, thereby realizing the sensor data sharing across terminals in the vehicle. Therefore, the present invention can solve the problem that sensor data cannot be shared across terminals.

[0061] For example, Figure 1bAn example diagram of an implementation method of a sensor data sharing method provided by an embodiment of the present invention is shown in FIG. Figure 1b As shown, the first sensed data can be obtained through the sensor data acquisition process of the first terminal, and then stored in the shared memory of the first terminal. After that, the first sensed data can be sent to the second terminal through the data sending process of the first terminal. The second terminal receives the first sensed data through the data receiving process of the second terminal, and stores it in the shared memory of the second terminal for use by processes 1, 2, ..., n of the second terminal. After the second terminal obtains the second sensed data through the sensor data acquisition process of the second terminal, it can store it in the shared memory of the second terminal. After that, the second sensed data can be sent to the first terminal through the data sending process of the second terminal. The first terminal receives the second sensed data through the data receiving process of the first terminal, and stores it in the shared memory of the first terminal for use by processes 1, 2, ..., n of the first terminal. Among them, the number of processes of the first terminal and the second terminal can be equal or unequal.

[0062] Figure 2a A flowchart of another sensor data sharing method provided by an embodiment of the present invention. This embodiment is specific based on the above embodiment. In this embodiment, the method may also include:

[0063] Step 210: Acquire the perception data of the first sensor to obtain first perception data.

[0064] Step 211: determine the sensor subscribed by the second terminal from the first sensor, obtain the first target sensor, and send the first perception data of the first target sensor to the second terminal, so that the second terminal stores the first perception data in the second shared memory.

[0065] Specifically, the first target sensor refers to a sensor determined by the second terminal according to its actual needs and circumstances.

[0066] In a specific implementation, first, a communication link with the second terminal can be established, and the configuration information of the first sensor, such as sensor function, sensor identification, and the type of data acquired by the sensor, can be sent to the second terminal based on the established communication link. After that, the second terminal determines the required sensor according to its own needs, and sends the configuration information of the required sensor to the first terminal, that is, subscribes to the sensor from the first sensor. After the first terminal obtains the configuration information sent by the second terminal, it can determine the first target sensor according to the configuration information, for example, it can determine the first target sensor according to the sensor identification. Then, the first perception data of the first target sensor is encapsulated and sent to the second terminal through the established communication link. After receiving the data and unpacking it, the second terminal can obtain the first perception data, and then store the obtained first perception data in the second shared memory.

[0067] In this embodiment, by determining the sensor subscribed by the second terminal from the first sensor, the first target sensor is obtained, and the first perception data of the first target sensor is sent to the second terminal, thereby reducing unnecessary data transmission and saving network bandwidth and storage space.

[0068] Step 212: Acquire the perception data of the second target sensor from the second terminal to obtain second perception data.

[0069] Specifically, the second target sensor is a sensor subscribed by the first terminal from the second sensor.

[0070] In a specific implementation, the configuration information of the second sensor is obtained through the aforementioned established communication link, and then the required sensor in the second sensor is determined according to the actual situation or demand, that is, the sensor is subscribed from the second sensor, and then the configuration information of the determined sensor (the configuration information of the second target sensor) is sent to the second terminal. After receiving the configuration information of the second target sensor, the second terminal can query whether there is the perception data of the second target sensor in the second shared memory. If it exists, the data is read and packaged, and then sent to the first terminal through the established communication link. If it does not exist, then after obtaining the perception data of the second target sensor, the perception data of the second target sensor is packaged and sent to the first terminal through the established communication link. After receiving the data, the first terminal can perform parsing based on operations such as decompression, decryption and / or format conversion to restore the original perception data, that is, the second perception data.

[0071] In this embodiment, by acquiring the second perception data, a data basis is provided for subsequently storing the second perception data in the first shared memory.

[0072] Step 213: Determine attribute information of the second perception data.

[0073] Specifically, the attribute information of the second perception data refers to the detailed features or characteristics describing each component or dimension of the second perception data. For example, the attribute information of the second perception data may be the data type, data size, serial number, the identifier of the sensor that obtains the second perception data, and the maximum space of a single data unit of the sensor.

[0074] In a specific implementation, after obtaining the second perception data, the second perception data may be analyzed to obtain attribute information of the second perception data.

[0075] In this embodiment, by determining the attribute information of the second perception data, a data basis is provided for subsequently allocating storage space to the second perception data in the first shared memory.

[0076] Step 214: Allocate storage space for the second perception data in the first shared memory according to the attribute information of the second perception data.

[0077] In a specific implementation, after obtaining the attribute information of the second perception data, the data type can be determined according to the attribute information, and then the data structure for storing the data can be determined based on the data type, and then the number of bytes required for each data item in the data structure is calculated, so as to accurately calculate the total storage size required for the entire data structure. Once the storage size is determined, storage space can be allocated in the first shared memory for the second perception data according to the size.

[0078] For example, if the attribute information is the maximum space of a single data unit of the sensor for acquiring the second perception data and the number of data units expected to be allocated, the size of the allocated memory space can be determined as follows: the maximum space of a single data unit × the number of data units expected to be allocated. Figure 2b As shown, it can be found that the sensor data acquisition process of the second terminal first sends the attribute information of the second sensor to the memory allocation and management process of the second terminal, and then the memory allocation and management process of the second terminal determines the second sensor data to allocate storage space in the shared memory of the second terminal according to the obtained attribute information, and then notifies the storage address of the second sensor data to other processes of the second terminal. Then the sensor data sending process of the second terminal sends the sensor information (configuration information and attribute information) of the second sensor to the first terminal through the connection established between the first terminal and the second terminal. After the first terminal obtains the sensor information of the second sensor through the sensor data receiving process of the first terminal, it determines the sensor subscribed from the second sensor, obtains the second target sensor, and sends the configuration information of the second target sensor to the second terminal. After that, the first terminal sends the attribute information of the second target sensor to the memory allocation and management process of the first terminal, and the memory allocation and management process of the first terminal allocates storage space for the second sensor data in the first shared memory according to the attribute information of the second target sensor, and notifies other processes of the first terminal of the storage address of the second sensor data. Exemplarily, if the attribute information is the data volume of the second sensor data, the size of the allocated memory space can be directly determined as the data volume of the second sensor data. In this embodiment, storage space is allocated to the second perception data in the first shared memory according to the attribute information of the second perception data, thereby avoiding the problem of over-allocation or under-allocation of memory, thereby optimizing the utilization efficiency of system resources.

[0079] Step 215: store the second perception data into the storage space of the first shared memory.

[0080] Step 216: verify the second perception data stored in the first shared memory to obtain a verification result.

[0081] In a specific implementation, a suitable verification method may be selected according to actual conditions or requirements, for example, the verification method may be a serial number verification, a digital signature, a checksum or a cyclic redundancy check, etc. Then, the second sensed data is verified using the selected verification method to obtain a verification result.

[0082] Exemplarily, if the verification method is serial number verification, whether the verification is passed can be determined by checking whether the serial number of the second perception data is continuous. If the serial numbers are continuous, the verification result is confirmed to be passed, otherwise the verification result is confirmed to be failed. For example, if the serial number of the second perception data received last time is 999, and the serial number of the second perception data sent by the same second target sensor received this time is 1001, it can be determined that the verification result is failed. If the serial number of the second perception data received last time is 1000, and the serial number of the second perception data sent by the same second target sensor received this time is 1001, it can be determined that the verification result is passed.

[0083] For example, Figure 2c As shown, after receiving the second perception data, the second terminal first stores the second perception data in the shared memory of the second terminal for use by other processes of the second terminal. Then the second terminal sends the second perception data to the first terminal. After receiving the second perception data, the first terminal stores it in the shared memory of the first terminal for use by other processes of the first terminal. After that, the second perception data can be verified by checking the sequence number to obtain the verification result, and then determine whether it is necessary to send a data retransmission request based on the verification result. If a data retransmission request is sent, the new data can be continued to be stored in the shared memory of the first terminal after it is obtained. It is also possible to determine whether the preset data acquisition time has arrived by checking the sequence number. If data that is not stored in the shared memory of the first terminal is received within the preset data acquisition time, it can be continued to be stored in the shared memory of the first terminal.

[0084] In this embodiment, by verifying the second perception data stored in the first shared memory to obtain a verification result, it can be ensured that the data is not damaged, tampered with or lost during transmission, processing or storage, thereby ensuring the originality, accuracy and integrity of the data.

[0085] Step 217: Determine the missing data based on the verification result.

[0086] In a specific implementation, after obtaining the verification result, if the verification result is not passed, the missing data is determined according to the verification result. For example, if the verification result is not passed, and the verification method is a sequence number verification, the missing data can be determined by the sequence number. For example, if the sequence number of the second perception data received last time is 10, and the sequence number of the second perception data sent by the same second target sensor this time is 12, then it can be determined that the missing data is the second perception data with a sequence number of 11 sent by the same second target sensor.

[0087] In this embodiment, by determining missing data, it can help maintain the integrity and consistency of the data.

[0088] Step 218: Obtain missing data from the second terminal.

[0089] In a specific implementation, after determining the missing data, a request can be initiated to the second terminal to request the missing data. After receiving the request, the second terminal reads the corresponding missing data from the second shared memory, and encapsulates the read missing data based on operations such as formatting data and / or encryption. The second terminal then sends the encapsulated data to the first terminal through the previously established communication link. After receiving the data, the first terminal can perform parsing based on operations such as decompression, decryption, and / or format conversion to restore the original data, i.e., the missing data, and store the missing data in the storage space of the first shared memory.

[0090] In addition, before obtaining the missing data from the second terminal, it can be determined whether the time for obtaining the missing data exceeds the preset acquisition time. If it exceeds, the missing data is obtained from the second terminal. If it does not exceed, wait, and after reaching the preset acquisition time, re-verify the second perception data stored in the first shared memory, and obtain the verification result, and then determine whether it is necessary to obtain the missing data from the second terminal based on the verification result, thereby avoiding unnecessary instant data requests, and thus improving the efficiency and accuracy of the entire data processing process. Among them, the preset acquisition time is the time required to obtain data set in advance according to actual conditions or needs.

[0091] In this embodiment, by acquiring the missing data from the second terminal, the integrity of the data is ensured and the data quality is improved.

[0092] Step 219: Determine whether a space release condition of the first shared memory is met.

[0093] If so, execute step 221 ; if not, execute step 220 .

[0094] Specifically, the space release condition refers to the condition for releasing the shared memory space according to the actual situation or demand. For example, the space release condition may be that the processes of the first terminal and the second terminal have used up the first sense data and the second sense data, the space of the shared memory is full, or the storage time of the data in the shared memory exceeds the preset storage time.

[0095] In a specific implementation, after the second sensed data is stored in the first shared memory, it can be determined whether the space release condition of the first shared memory is met. If so, it is determined that the space of the first shared memory needs to be released at present. If not, it is determined that the space of the first shared memory does not need to be released at present.

[0096] In this embodiment, by judging whether the space release condition of the first shared memory is met, it can help reduce memory usage and prevent resource exhaustion, thereby improving resource utilization efficiency and avoiding memory fragmentation.

[0097] Further, determining whether the space release condition of the first shared memory is met includes: sending a data deletion request to each process of the first terminal; when receiving the consent deletion information fed back by each process of the first terminal, determining that the space release condition of the first shared memory is met.

[0098] Specifically, the data deletion request is used to request deletion of the second perception data.

[0099] In a specific implementation, a threshold of memory usage can be defined first, for example, the threshold can be 80% or 90%. When the usage of the first shared memory reaches or exceeds this threshold, a data deletion request is constructed, which should contain the specific data to be deleted (such as the second perception data). Then, the data deletion request is sent to all processes of the first terminal through the inter-process communication mechanism to ensure that each process that may access or hold a copy of the second perception data can receive the request. For example, the inter-process communication mechanism can be a message queue, a socket, or a semaphore in a shared memory. After sending the request, it is necessary to wait for each process of the first terminal to process the request and return feedback. After receiving feedback from all processes, these feedbacks are checked to determine whether all processes agree to delete the second perception data. If all processes return a response agreeing to delete, it can be determined that the space release condition of the first shared memory has been met.

[0100] In this embodiment, through the above steps, it is ensured that all processes have completed processing the data before deleting the data, which helps to maintain data consistency and avoid data loss or damage.

[0101] Step 220: Do not release the space of the first shared memory.

[0102] In a specific implementation, after determining that the space release condition of the first shared memory is not met, the space of the first shared memory is not released.

[0103] Step 221: Release the space of the first shared memory.

[0104] In a specific implementation, before releasing the space of the first shared memory, all processes that may access the shared memory can be notified to stop accessing by using semaphores, mutexes, or conditional variables, etc., to ensure that no process is accessing the memory area. After that, all data in the space is deleted, and the inter-process communication mechanism is used to notify all processes of the first terminal that the space of the first shared memory will be released, and then the release function is called to release the space of the first shared memory, for example, the release function can be a shm_unlink() function or a CloseHandle() function.

[0105] For example, Figure 2d As shown, after determining to release the space of the shared memory of the first terminal, the space can be released through the memory allocation and management process of the first terminal, and other processes of the first terminal and the second terminal will be notified that the space of the shared memory of the first terminal has been released. After receiving the release notification, the second terminal can check whether there is space in the released space to store the first perception data of the first target sensor. If so, the space in the shared memory of the second terminal to store the first perception data can be released through the memory allocation and management process of the second terminal, and the first terminal will be notified after the release.

[0106] In this embodiment, by releasing the space of the first shared memory, exhaustion of memory resources is avoided, normal operation of other applications or processes is ensured, and stability is enhanced.

[0107] Therefore, the technical solution of the present invention provides a data basis for sending the first sensed data to the second terminal by acquiring the first sensed data. Then, the sensor subscribed by the second terminal from the first sensor is determined, and the first target sensor is obtained, and the first sensed data of the first target sensor is sent to the second terminal, so that the second terminal stores the first sensed data in the second shared memory, while ensuring that at least two processes of the first terminal share the second sensed data, reducing unnecessary data transmission, saving network bandwidth and storage space. Then, by acquiring the second sensed data, a data basis is provided for storing the second sensed data in the first shared memory. Then, by determining the attribute information of the second sensed data, a data basis is provided for allocating storage space to the second sensed data in the first shared memory. Then, according to the attribute information of the second sensed data, storage space is allocated to the second sensed data in the first shared memory, avoiding the problem of over-allocation or under-allocation of memory, thereby optimizing the utilization efficiency of system resources. Then, by storing the second sensed data in the storage space of the first shared memory, at least two processes of the first terminal can share the second sensed data. Afterwards, the second sensed data stored in the first shared memory is verified to obtain a verification result, which ensures that the data is not damaged, tampered with, or lost during transmission, processing, or storage, and ensures the originality, accuracy, and integrity of the data. Then, the missing data is determined based on the verification result to help maintain the integrity and consistency of the data, and then the missing data is obtained from the second terminal to ensure the integrity of the data and improve the data quality. Finally, it is determined whether the space release condition of the first shared memory is met. If it is met, the space of the first shared memory is released; if it is not met, the space of the first shared memory is not released. It helps to reduce memory usage and prevent resource exhaustion, thereby improving resource utilization efficiency and avoiding memory fragmentation. Compared with the prior art, although multiple processes in the same terminal connected to the concurrently accessible sensor in the vehicle can simultaneously access the data of the sensor, multiple processes in the terminal not connected to the sensor cannot access the data of the sensor, thereby affecting the collaborative work between the various systems inside the vehicle, the present invention obtains the first perception data, sends the first perception data to the second terminal, so that the second terminal stores the first perception data in the second shared memory, and then obtains the second perception data from the second terminal and stores the second perception data in the first shared memory, so that at least two processes of the first terminal and the second terminal can use the first perception data and the second perception data, thereby realizing the sharing of sensor data across terminals in the vehicle. Therefore, the present invention can solve the problem that sensor data cannot be shared across terminals.

[0108] Figure 3A schematic diagram of the structure of a sensor data sharing device provided in an embodiment of the present invention. The device and the sensor data sharing methods of the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiments of the sensor data sharing device, reference can be made to the embodiments of the above-mentioned sensor data sharing methods.

[0109] like Figure 3 As shown, the device comprises:

[0110] A first acquisition module 310 is used to acquire the sensing data of the first sensor to obtain first sensing data;

[0111] A sending module 320, configured to send the first sensed data to a second terminal, so that the second terminal stores the first sensed data in a second shared memory, where the second shared memory is a shared memory of the second terminal, where the first sensed data stored in the second shared memory is shared by at least two processes of the second terminal, and where the second terminal is configured with a second sensor;

[0112] A second acquisition module 330 is used to acquire the perception data of the second sensor from the second terminal to obtain second perception data;

[0113] The storage module 340 is used to store the second perception data in a first shared memory, where the first shared memory is a shared memory of the first terminal, and the second perception data stored in the first shared memory is shared by at least two processes of the first terminal.

[0114] On the basis of the above embodiment, the sending module 320 sends the first perception data to the second terminal, including: determining the sensor subscribed by the second terminal from the first sensor, obtaining the first target sensor, and sending the first perception data of the first target sensor to the second terminal;

[0115] The second acquisition module 330 acquires the perception data of the second sensor from the second terminal, including: acquiring the perception data of a second target sensor from the second terminal, where the second target sensor is a sensor subscribed by the first terminal from the second sensor.

[0116] Based on the above embodiment, the device further includes:

[0117] A verification module is used to verify the second perception data stored in the first shared memory after the second perception data is stored in the first shared memory to obtain a verification result; and determine whether it is necessary to re-acquire the second perception data from the second terminal according to the verification result.

[0118] Based on the above embodiment, the verification module determines whether it is necessary to re-acquire the second perception data from the second terminal according to the verification result, including: determining missing data according to the verification result; and acquiring the missing data from the second terminal.

[0119] Based on the above embodiment, the storage module 340 is specifically used for:

[0120] Determining attribute information of the second perception data;

[0121] Allocating storage space for the second perception data in the first shared memory according to the attribute information of the second perception data;

[0122] The second perception data is stored in the storage space of the first shared memory.

[0123] Based on the above embodiment, the device further includes:

[0124] The release module is used to determine whether a space release condition of the first shared memory is met; if so, release the space of the first shared memory.

[0125] Based on the above embodiment, the release module determines whether the space release condition of the first shared memory is met, including: sending a data deletion request to each process of the first terminal, the data deletion request is used to request deletion of the second perception data; when receiving the consent deletion information feedback from each process of the first terminal, it is determined that the space release condition of the first shared memory is met.

[0126] The sensor data sharing device provided in the embodiment of the present invention can execute the sensor data sharing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0127] It is worth noting that in the embodiment of the above-mentioned sensor data sharing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0128] Figure 4 A schematic structural diagram of a vehicle provided in an embodiment of the present invention. Figure 4 A block diagram of an exemplary vehicle 4 suitable for implementing embodiments of the present invention is shown. Figure 4 The vehicle 4 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0129] like Figure 4As shown, the vehicle 4 is embodied in the form of a general purpose computing electronic device. The components of the vehicle 4 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting various system components (including the system memory 28 and the processing unit 16).

[0130] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0131] The vehicle 4 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the vehicle 4, including volatile and non-volatile media, removable and non-removable media.

[0132] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The vehicle 4 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0133] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0134] The vehicle 4 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the vehicle 4, and / or any device that enables the vehicle 4 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the vehicle 4 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. Figure 4 As shown, the network adapter 20 communicates with other modules of the vehicle 4 via the bus 18. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with the vehicle 4, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0135] The processing unit 16 executes various functional applications and page displays by running the program stored in the system memory 28, for example, to implement the sensor data sharing method provided in the embodiment of the present invention, which is applied to a first terminal, wherein the first terminal is configured with a first sensor, and the method includes:

[0136] Acquire the sensing data of the first sensor to obtain first sensing data;

[0137] Sending the first sensed data to a second terminal so that the second terminal stores the first sensed data in a second shared memory, where the second shared memory is a shared memory of the second terminal, where the first sensed data stored in the second shared memory is shared by at least two processes of the second terminal, and where the second terminal is configured with a second sensor;

[0138] Acquire the sensing data of the second sensor from the second terminal to obtain second sensing data;

[0139] The second perception data is stored in a first shared memory, where the first shared memory is a shared memory of the first terminal, and the second perception data stored in the first shared memory is shared by at least two processes of the first terminal.

[0140] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the sensor data sharing method provided by any embodiment of the present invention.

[0141] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the sensor data sharing method provided by the embodiment of the present invention is implemented, for example, and is applied to a first terminal, wherein the first terminal is configured with a first sensor. The method includes:

[0142] Acquire the sensing data of the first sensor to obtain first sensing data;

[0143] Sending the first sensed data to a second terminal so that the second terminal stores the first sensed data in a second shared memory, where the second shared memory is a shared memory of the second terminal, where the first sensed data stored in the second shared memory is shared by at least two processes of the second terminal, and where the second terminal is configured with a second sensor;

[0144] Acquire the sensing data of the second sensor from the second terminal to obtain second sensing data;

[0145] The second perception data is stored in a first shared memory, where the first shared memory is a shared memory of the first terminal, and the second perception data stored in the first shared memory is shared by at least two processes of the first terminal.

[0146] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0147] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0148] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0149] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0150] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0151] In addition, the acquisition, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of national laws and regulations.

[0152] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A sensor data sharing method, characterized in that: Applied to a first terminal, the first terminal is configured with a first sensor, and the method includes: Acquire the sensing data of the first sensor to obtain first sensing data; Sending the first sensed data to a second terminal so that the second terminal stores the first sensed data in a second shared memory, where the second shared memory is a shared memory of the second terminal, where the first sensed data stored in the second shared memory is shared by at least two processes of the second terminal, and where the second terminal is configured with a second sensor; Acquire the sensing data of the second sensor from the second terminal to obtain second sensing data; The second perception data is stored in a first shared memory, where the first shared memory is a shared memory of the first terminal, and the second perception data stored in the first shared memory is shared by at least two processes of the first terminal.

2. The sensor data sharing method according to claim 1, characterized in that: The sending the first sensing data to the second terminal includes: determining a sensor subscribed by the second terminal from the first sensor, obtaining a first target sensor, and sending the first sensing data of the first target sensor to the second terminal; The acquiring the perception data of the second sensor from the second terminal includes: acquiring the perception data of a second target sensor from the second terminal, where the second target sensor is a sensor subscribed by the first terminal from the second sensor.

3. The sensor data sharing method according to claim 1, characterized in that: After storing the second perception data into the first shared memory, the method further includes: Verifying the second sensed data stored in the first shared memory to obtain a verification result; Determine whether it is necessary to reacquire the second perception data from the second terminal according to the verification result.

4. The sensor data sharing method according to claim 3, characterized in that: The determining, according to the verification result, whether it is necessary to reacquire the second sensing data from the second terminal includes: Determine missing data according to the verification result; The missing data is obtained from the second terminal.

5. The sensor data sharing method according to claim 1, characterized in that: The storing the second sensed data into the first shared memory comprises: Determining attribute information of the second perception data; Allocating storage space for the second perception data in the first shared memory according to the attribute information of the second perception data; The second perception data is stored in the storage space of the first shared memory.

6. The sensor data sharing method according to claim 1, characterized in that: The method further comprises: Determining whether a space release condition of the first shared memory is met; If the limit is reached, the space of the first shared memory is released.

7. The sensor data sharing method according to claim 6, wherein the determining whether a space release condition of the first shared memory is met comprises: Sending a data deletion request to each process of the first terminal, where the data deletion request is used to request deletion of the second perception data; When the deletion consent information fed back by each process of the first terminal is received, it is determined that the space release condition of the first shared memory is met.

8. A sensor data sharing device, characterized in that: Applied to a first terminal, the first terminal is configured with a first sensor, and the device includes: A first acquisition module, used to acquire the sensing data of the first sensor to obtain first sensing data; a sending module, configured to send the first sensed data to a second terminal, so that the second terminal stores the first sensed data in a second shared memory, wherein the second shared memory is a shared memory of the second terminal, and the first sensed data stored in the second shared memory is shared by at least two processes of the second terminal, and the second terminal is configured with a second sensor; A second acquisition module, configured to acquire the sensing data of the second sensor from the second terminal to obtain second sensing data; The storage module is used to store the second perception data into a first shared memory, where the first shared memory is a shared memory of the first terminal, and the second perception data stored in the first shared memory is shared by at least two processes of the first terminal.

9. A vehicle, characterized in that: The vehicle comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the sensor data sharing method described in any one of claims 1-7.

10. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, the sensor data sharing method according to any one of claims 1 to 7 is implemented.