Intelligent cockpit data sharing method, vehicle computer and system

In the dual-vehicle computer system of the smart cockpit, the first vehicle computer acts as an RTSP server to publish camera data, and the second vehicle computer serves as an RTSP client to receive and decode the data, write it into the shared memory space, and provide a camera interface, which solves the problem of third-party problems. The problem that the public version application cannot use the camera data of another car enables efficient data sharing and reduces development costs.

CN118250522BActive Publication Date: 2024-09-20ZHIDA CHENGYUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410675245.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-20
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

In the existing technology, the third-party public version of the smart cockpit application cannot share the camera data of another vehicle system by modifying the source code, resulting in the inability to use the camera data of another vehicle system.

Method used

In the dual-vehicle computer system of the smart cockpit, the first vehicle computer acts as an RTSP server to publish camera data, and the second vehicle computer acts as an RTSP client to request and receive data, and decodes the received data and writes it into the shared memory space. Provides a camera interface to the Android application layer, allowing third-party public applications to obtain camera data of another car through Android's native Camera2 API.

Benefits of technology

It enables third-party public applications such as WeChat and Whatsapp to use the camera data of another vehicle in the smart cockpit by calling the native Camera2 API, reducing software development costs and cycles and improving the versatility of the smart vehicle system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118250522B
    Figure CN118250522B
Patent Text Reader

Abstract

The present invention discloses a smart cockpit data sharing method, a vehicle and a system, the method comprising: a first vehicle starts a background service process to obtain first vehicle camera data and publishes the first vehicle camera data as an RTSP server; a second vehicle starts a background service process to request the first vehicle camera data from the RTSP server as an RTSP client; after the client successfully connects to the server, the first vehicle camera data published by the server is received; the client decodes the received first vehicle camera data and writes it into a shared memory space; after the Android system of the second vehicle obtains the first vehicle camera data from the shared memory space, a camera interface is provided to the Android application layer, so that the Android application of the second vehicle obtains the first vehicle camera data through the camera interface. This solves the problem that the third-party public version application between the dual vehicle systems and dual systems of the smart cockpit cannot use the camera data of another vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart car technology, and in particular to a smart cockpit data sharing method and system. Background Art

[0002] With the rapid development of smart cockpits, consumers' requirements for the comfort and intelligent interactive experience of smart cockpits are also increasing. Passengers can interact with the car computer through multiple interactive methods such as multi-screen interaction, voice control, gesture recognition, etc. In order to provide a smoother, richer personalized and interactive experience, the smart cockpit will be equipped with dual car computers, which are responsible for the screen display, device driver and interactive processing of the front and rear rows respectively, thereby improving the overall cockpit experience.

[0003] Many interactive scenarios of the smart cockpit require the sharing of camera data between the front and rear car machines. For example, in the OMS (Occupancy Monitoring System) function, the front car machine needs to use the camera data of the rear car machine to collect and monitor the status data of the rear passengers. In another scenario, the rear car machine function also needs the camera data of the front car machine to check the road conditions ahead. In other application scenarios, the sharing of camera data between the front and rear car machines can help improve the interactivity and entertainment of the smart cockpit.

[0004] In the prior art, after the front and rear row car computers are turned on, the RTSP (Real Time Streaming Protocol) Server background service for obtaining camera data is started as the server, and the front and rear row applications that need to use the camera data are clients. When the front row car computer application needs to use the camera data of the rear row car computer, the front row car computer application client sends a data request to the rear row car computer server. After the rear row car computer server receives the request and verifies it, it builds a data transmission channel with the front row car computer application client to transmit the camera data. The transmission process for the rear row car computer application client to obtain the front row car computer camera data is the same, that is, when the rear row car computer application client needs to use the camera data of the front row car computer, the rear row car computer application client sends a data request to the front row car computer server. After the front row car computer server receives the request and verifies it, it builds a data transmission channel with the rear row car computer application client, and the front row car computer server and the rear row car computer application client transmit camera data.

[0005] The disadvantage of the prior art is that only application clients that can modify the source code, that is, RTSP clients implemented by code, can connect to the RTSP server of another vehicle system, so as to request and use the camera data of another vehicle system. As for third-party public version application clients, since the source code of the third-party public version application clients cannot be modified, programmable third-party public version application RTSP clients cannot be implemented, and thus the RTSP server of another vehicle system cannot be connected, resulting in the third-party public version application clients being unable to use the camera data of another vehicle system. Summary of the invention

[0006] One of the purposes of the present invention is to overcome the deficiencies in the prior art and to provide a smart cockpit data sharing method, vehicle computer and system, thereby solving the problem that the third-party public version application between the dual vehicle computer and dual system of the smart cockpit cannot use the camera data of another vehicle computer.

[0007] In order to solve the above technical problems, in a first aspect, an embodiment of the present invention provides a smart cockpit data sharing method, the method comprising:

[0008] The first vehicle machine starts a background service process for obtaining the first vehicle machine camera data and publishing the first vehicle machine camera data as an RTSP server;

[0009] The second vehicle machine starts a background service process, which is used to request the camera data of the first vehicle machine from the RTSP server as an RTSP client;

[0010] After the RTSP client is successfully connected to the RTSP server, receiving the first vehicle camera data published by the RTSP server;

[0011] The RTSP client decodes the received first vehicle camera data and writes the decoded data into a shared memory space;

[0012] After the Android system of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space, it provides a camera interface to the Android application layer, so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface.

[0013] Preferably, the RTSP server obtains the vehicle camera data by calling the Android native Camera2 API, and encodes the vehicle camera data in YUV format to generate H.264 format camera data.

[0014] Preferably, after the Android system of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space, providing a camera interface to the Android application layer specifically includes:

[0015] The hardware abstraction layer service of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space;

[0016] After the Android system framework layer camera service of the second vehicle machine obtains the first vehicle machine camera data from the hardware abstraction layer service, it provides a camera interface to the Android application layer.

[0017] Preferably, the RTSP client decodes the received first vehicle camera data and writes the decoded data into the shared memory space, specifically comprising:

[0018] The RTSP client generates a first driver file node for writing data, and simultaneously generates a second driver file node for reading data;

[0019] The RTSP client writes the decoded first vehicle camera data into the first driver file node by calling a driver interface based on the Android native V4L2 framework API.

[0020] As a second aspect of the present invention, an embodiment of the present invention provides a second vehicle computer for intelligent cockpit data sharing, the second vehicle computer comprising:

[0021] A data request module, used to start a background service process to request the first vehicle camera data from the RTSP server as an RTSP client, wherein the first vehicle camera starts the background service process to obtain the first vehicle camera data and publishes the first vehicle camera data as an RTSP server;

[0022] A receiving module, configured to receive the first vehicle camera data published by the RTSP server after the RTSP client establishes a connection with the RTSP server;

[0023] A data writing module, used for decoding the received first vehicle camera data and writing it into a shared memory space;

[0024] A data reading module, used for acquiring the camera data of the first vehicle machine from the shared memory space through the Android system of the second vehicle machine;

[0025] The interface module is used to provide a camera interface to the Android application layer, so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface.

[0026] Preferably, the Android application switches the camera to the first vehicle camera or the second vehicle camera by switching the CameraID in the camera interface parameter.

[0027] Preferably, the Android application is a third-party public version camera application module of the second vehicle computer. The third-party public version camera application module calls the camera interface and switches the CameraID in the interface parameters so that the Android system native camera application module obtains the first vehicle computer camera data from the Android hardware abstraction layer service, and passes it to the second vehicle computer third-party public version camera application module to obtain the first vehicle computer camera data.

[0028] As a second aspect of the present invention, an embodiment of the present invention provides a smart cockpit data sharing system, the system comprising:

[0029] The first vehicle machine and the second vehicle machine, wherein the first vehicle machine starts its own background service process to serve as the first vehicle machine RTSP server and obtains and publishes the camera data of the vehicle machine;

[0030] The second vehicle machine starts its own background service process to serve as the second vehicle machine RTSP client, and requests the camera data of the first vehicle machine;

[0031] After the RTSP client is successfully connected to the RTSP server, receiving the first vehicle camera data published by the RTSP server;

[0032] The RTSP client decodes the received first vehicle camera data and writes the decoded data into a shared memory space;

[0033] After the Android system of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space, it provides a camera interface to the Android application layer, so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface.

[0034] Preferably, the second vehicle computer comprises:

[0035] A data request module, used to start a background service process to request the first vehicle camera data from the RTSP server as an RTSP client, wherein the first vehicle camera starts the background service process to obtain the first vehicle camera data and publishes the first vehicle camera data as an RTSP server;

[0036] A receiving module, configured to receive the first vehicle camera data published by the RTSP server after the RTSP client establishes a connection with the RTSP server;

[0037] A data writing module, used for decoding the received first vehicle camera data and writing it into a shared memory space;

[0038] A data reading module, used for acquiring the camera data of the first vehicle machine from the shared memory space through the Android system of the second vehicle machine;

[0039] The interface module is used to provide a camera interface to the Android application layer, so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface.

[0040] Preferably, the Android application is a third-party public version camera application module of the second vehicle computer. The third-party public version camera application module calls the camera interface and switches the CameraID in the interface parameters so that the Android system native camera application module obtains the first vehicle computer camera data from the Android hardware abstraction layer service, and passes it to the second vehicle computer third-party public version camera application module to obtain the first vehicle computer camera data.

[0041] Compared with the prior art, the smart cockpit data sharing method, vehicle computer and system provided by the embodiments of the present invention have at least the following beneficial effects:

[0042] In the dual-car and dual-system smart cockpit, the embodiment of the present invention enables third-party public applications in a single car machine, such as WeChat, Whatsapp, etc., to use the camera data of another car machine by calling the Android native Camera2 API. Compared with the conventional method of the prior art, if the car machine application wants to use the camera data of another car machine, it must be customized and developed, which makes the third-party public application require high customization and development costs. The technical solution of the embodiment of the present invention allows the third-party public application to share the camera data of another car machine by calling the native Camera2 API, which greatly reduces the software development cost and cycle of the car machine, and greatly improves the versatility of the smart vehicle system. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The preferred implementation modes will be described below in a clear and understandable manner with reference to the accompanying drawings to further illustrate the above-mentioned characteristics, technical features, advantages and implementation methods of the present invention.

[0044] Figure 1 This is a flow chart of a smart cockpit data sharing method according to an embodiment of the present invention;

[0045] Figure 2 is a flow chart of a smart cockpit data sharing method according to another embodiment of the present invention;

[0046] Figure 3is a block diagram of a smart cockpit data sharing system according to an embodiment of the present invention;

[0047] Figure 4 The present invention is a vehicle-mounted computer block diagram for intelligent cockpit data sharing according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.

[0049] In order to simplify the drawings, only the parts related to the invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".

[0050] The following mainly takes some specific embodiments as examples to describe in detail the implementation of the technical solution of the present invention.

[0051] like Figure 1 As shown, a smart cockpit data sharing method in an embodiment of the present invention includes:

[0052] S1, the first vehicle machine starts a background service process to obtain the first vehicle machine camera data and publishes the first vehicle machine camera data as an RTSP server;

[0053] S2, the second vehicle machine starts a background service process to request the first vehicle machine camera data from the RTSP server as an RTSP client;

[0054] S3, after the RTSP client is successfully connected to the RTSP server, receiving the first vehicle camera data published by the RTSP server;

[0055] S4, the RTSP client decodes the received first vehicle camera data and writes it into a shared memory space;

[0056] S5. After the Android system of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space, it provides a camera interface to the Android application layer so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface.

[0057] The following describes the specific implementation of the present invention in combination with the implementation of the smart cockpit of a smart car. For example, the first vehicle head unit is used as the front vehicle head unit, and the second vehicle head unit is used as the rear vehicle head unit. Figure 2 As shown in the figure, the process of using the front-row car camera data by the third-party public version application of the rear-row car machine includes:

[0058] After the front car machine is turned on, a background service process DaemonA is started to obtain the camera data of the car machine and serve as the RTSP server of the front car machine;

[0059] Preferably, the RTSP server obtains the camera data of the vehicle by calling the Android native Camera2 API, and encodes the camera data of the vehicle in YUV format to generate the camera data in H.264 format. That is, the front vehicle RTSP server obtains the camera data of the vehicle by calling the Android native Camera2 API, and encodes the camera data of the vehicle in YUV format into H.264 format for publishing;

[0060] After the rear-row vehicle machine is turned on, a background service process Daemon B is started and set as the rear-row vehicle machine RTSP client, which connects to the front-row vehicle machine RTSP server and requests the camera data of the front-row vehicle machine. After the rear-row vehicle machine RTSP client successfully connects to the front-row vehicle machine RTSP server, the rear-row vehicle machine RTSP client receives the H.264 format camera data published by the front-row vehicle machine RTSP server.

[0061] Here, the communication between the rear-row vehicle machine RTSP client and the front-row vehicle machine RTSP server adopts a data transmission channel based on the RTSP protocol.

[0062] Preferably, the front-row vehicle machine RTSP server obtains the vehicle machine camera data by calling the Android native Camera2 API, and encodes the vehicle machine camera data in YUV format to generate H.264 format camera data.

[0063] The rear-row vehicle camera RTSP client decodes the received front-row vehicle camera camera data in H.264 format to generate the front-row vehicle camera camera data in YUV format;

[0064] Preferably, the RTSP client decodes the received first vehicle camera data and writes the decoded data into the shared memory space, specifically comprising:

[0065] The RTSP client generates a first driver file node for writing data, and simultaneously generates a second driver file node for reading data;

[0066] The RTSP client writes the decoded first vehicle camera data into the first driver file node by calling a driver interface based on the native V4L2 framework API.

[0067] That is, the rear-row car machine RTSP client writes the decoded YUV format front-row car machine camera data into the first driver file node Video 1 by calling the driver interface based on the native V4L2 framework API. The rear-row car machine driver shares the first driver file node Video 1 data with the second driver file node Video 2 by means of shared memory.

[0068] After the Android system of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space, providing a camera interface to the Android application layer specifically includes:

[0069] The hardware abstraction layer service of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space;

[0070] After the Android system framework layer camera service of the second vehicle machine obtains the first vehicle machine camera data from the hardware abstraction layer service, it provides a camera interface to the Android application layer.

[0071] The rear vehicle machine Android Camera HAL reads the front vehicle machine camera data from the second driver file node Video2 by calling the native V4L2 framework API.

[0072] The native CameraService of the rear-row vehicle machine Android system obtains the camera data of the front-row vehicle machine from the rear-row vehicle machine Android Camera HAL.

[0073] The native CameraService of the rear-row car machine Android system provides the Camera2 API to the rear-row car machine Android application layer, and the rear-row car machine Android application obtains the front-row car machine camera data by calling the Camera2 API.

[0074] Preferably, the rear-seat car machine Android application can switch the camera by switching the API parameter CameraID. The native CameraService of the rear-seat car machine Android system supports two CameraIDs 0 and 1 by default. The CameraID0 corresponds to the front camera, and the CameraID 1 corresponds to the rear camera.

[0075] As a preferred embodiment, the CameraID 0 corresponds to the rear-row vehicle machine, i.e., the local camera, i.e., the rear-row camera, and the CameraID 1 corresponds to the front-row vehicle machine camera. When the rear-row vehicle machine Android application switches the API parameter CameraID to 1, the rear-row vehicle machine Android system native CameraService will pass the front-row vehicle machine camera data obtained from the rear-row vehicle machine Android Camera HAL to the rear-row vehicle machine Android application.

[0076] like Figure 2 As shown, in a specific embodiment of the present invention, for example, click on a third-party public camera application, such as WeChat, on the rear car terminal, and then use WeChat to initiate a video call with a friend. At this time, call Camera2API to initiate the camera opening process, the default CameraID is 0, and the WeChat call interface displays the rear car camera screen, that is, the local camera screen, and then click the "Camera Reverse" button, call Camera2 API to set the parameter CameraID to 1, and the WeChat video call interface can display the front car camera screen.

[0077] Compared with the prior art, the smart cockpit data sharing method provided by the embodiment of the present invention has at least the following beneficial effects: in the smart cockpit dual-car machine dual system, the embodiment of the present invention enables third-party public version applications in a single car machine, such as WeChat, Whatsapp, etc., to use the camera data of another car machine by calling the Android native Camera2 API. Compared with the prior art, if the car machine application wants to use the camera data of another car machine, it must be customized and developed in the conventional way, which makes the third-party public version application require high customization and development costs. The technical solution of the embodiment of the present invention enables the third-party public version application to share the camera data of another car machine by calling the native Camera2 API, which greatly reduces the software development cost and cycle of the car machine, and greatly improves the versatility of the smart vehicle system.

[0078] An embodiment of the present invention further provides a smart cockpit data sharing system, the system comprising:

[0079] The first vehicle machine and the second vehicle machine, wherein the first vehicle machine starts its own background service process to serve as the first vehicle machine RTSP server and obtains and publishes the camera data of the vehicle machine;

[0080] The second vehicle machine starts its own background service process to serve as the second vehicle machine RTSP client, and requests the camera data of the first vehicle machine;

[0081] After the RTSP client is successfully connected to the RTSP server, receiving the first vehicle camera data published by the RTSP server;

[0082] The RTSP client decodes the received first vehicle camera data and writes the decoded data into a shared memory space;

[0083] After the Android system of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space, it provides a camera interface to the Android application layer, so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface.

[0084] Preferably, the second vehicle computer comprises:

[0085] A data request module, used to start a background service process to request the first vehicle camera data from the RTSP server as an RTSP client, wherein the first vehicle camera starts the background service process to obtain the first vehicle camera data and publishes the first vehicle camera data as an RTSP server;

[0086] A receiving module, configured to receive the first vehicle camera data published by the RTSP server after the RTSP client establishes a connection with the RTSP server;

[0087] A data writing module, used for decoding the received first vehicle camera data and writing it into a shared memory space;

[0088] A data reading module, used for acquiring the camera data of the first vehicle machine from the shared memory space through the Android system of the second vehicle machine;

[0089] The interface module is used to provide a camera interface to the Android application layer, so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface.

[0090] Preferably, the Android application is a third-party public version camera application module of the second vehicle computer. The third-party public version camera application module calls the camera interface and switches the CameraID in the interface parameters so that the Android system native camera application module obtains the first vehicle computer camera data from the Android hardware abstraction layer service, and passes it to the second vehicle computer third-party public version camera application module to obtain the first vehicle computer camera data.

[0091] See also Figure 3As a specific implementation of the present invention, the first vehicle computer and the second vehicle computer correspond to the front vehicle computer and the rear vehicle computer respectively. The communication between the front and rear dual vehicle computers establishes a data transmission channel based on the RTSP protocol.

[0092] For example, in one implementation, when the rear-row vehicle computer starts the background service as an RTSP client, it calls the Android system's native Camera2 API and obtains the vehicle computer's camera data to publish to the front-row vehicle computer RTSP client. The data request module of the rear-row vehicle computer requests the camera data of the front-row vehicle computer. After the RTSP client establishes a connection with the RTSP server, the receiving module receives the first vehicle computer camera data published by the RTSP server. The data writing module generates a file node Video1 for writing data, and at the same time generates a file node Video2 for reading data. After the data request module of the rear-row vehicle computer RTSP client obtains the front-row vehicle computer camera data, it calls the native V4L2 framework API, and the data writing module writes the front-row vehicle computer camera data to the file node Video1. At the same time, the rear-row vehicle computer driver shares the front-row vehicle computer camera data to the file node Video2 through shared memory.

[0093] The data reading module of the rear-row car machine uses Android Camera HAL as a bridge between the driver and the Android system's native CameraService. It calls the Android native V4L2 framework API to read the front-row car machine camera data from the driver file node Video2 and connect the front-row car machine camera data to the Android system's native CameraService.

[0094] The interface module provides the Camera2API to the Android application layer through the Android system's native CameraService. The Android application module obtains camera data by calling the camera interface Camera2 API. At the same time, the Android application module can switch cameras by switching the CameraID in the API parameters. The Android system's native CameraService supports two CameraIDs 0 and 1 by default. CameraID 0 corresponds to the front camera, and CameraID 1 corresponds to the rear camera.

[0095] As an optimization, in the present invention, CameraID 0 corresponds to the vehicle camera, and CameraID 1 corresponds to the front vehicle camera. When the Android application switches the API parameter CameraID to 1, the Android system native CameraService obtains the front vehicle camera data from the Android Camera HAL and passes it to the Android application.

[0096] The third-party public version camera application module for the rear-seat vehicle machine calls the camera interface, switches the CameraID in the interface parameters so that the native camera application module of the Android system obtains the rear-seat vehicle machine camera data from the Android hardware abstraction layer service, and passes it to the third-party public version camera application module for the rear-seat vehicle machine to obtain the first vehicle machine camera data.

[0097] As another situation of the embodiment of the present invention, the front vehicle computer and the rear vehicle computer can respectively serve as the RTSP client and the RTSP server at the same time based on the actual data sharing demand, and become the second vehicle computer and the first vehicle computer.

[0098] For example, in another case of the implementation of the present invention, when the front row vehicle machine background service module acts as the front row RTSP client, it requests the rear row vehicle machine camera data from the rear row vehicle machine RTSP server;

[0099] When acting as the RTSP client of the front-row car machine, the data writing module of the front-row car machine generates a file node Video1 for writing data, and at the same time generates a file node Video2 for reading data. After the receiving module of the front-row car machine receives the camera data of the rear-row car machine, it calls the native V4L2 framework API, and the data writing module writes the camera data of the rear-row car machine to the file node Video1. At the same time, the data writing module of the front-row car machine shares the camera data of the rear-row car machine to the file node Video2 through shared memory.

[0100] The front-row car machine hardware abstract service layer serves as a bridge between the driver module and the Android system's native CameraService. By calling the native V4L2 framework API, the front-row car machine's data reader module reads the rear-row car machine camera data from the driver file node Video2 and connects the rear-row car machine camera data to the Android system's native CameraService.

[0101] The front-row vehicle machine interface module provides the camera interface Camera2 API to the Android application layer. The Android application obtains the camera data by calling the camera interface Camera2 API. At the same time, the Android application can switch the camera by switching the CameraID in the API parameter. The Android system native CameraService supports two CameraIDs 0 and 1 by default. CameraID 0 corresponds to the front camera, and CameraID 1 corresponds to the rear camera. As a preferred implementation, CameraID 0 can be corresponding to the vehicle machine camera, and CameraID 1 can be corresponding to the rear-row vehicle machine camera. When the Android application switches the CameraID in the API parameter to 1, the Android system native CameraService obtains the rear-row vehicle machine camera data from the Android Camera HAL and passes it to the Android application.

[0102] The third-party public version camera application module of the front car machine will call the Android system native Camera2 API to initiate a request to obtain camera data and display the camera screen. At this time, switch the API parameter CameraID to 1 to obtain and display the rear car machine camera data.

[0103] like Figure 4 As shown, as a third aspect of the present invention, an embodiment of the present invention provides a second vehicle computer for intelligent cockpit data sharing, the second vehicle computer comprising:

[0104] A data request module, used to start a background service process to request the first vehicle camera data from the RTSP server as an RTSP client, wherein the first vehicle camera starts the background service process to obtain the first vehicle camera data and publishes the first vehicle camera data as an RTSP server;

[0105] A receiving module, configured to receive the first vehicle camera data published by the RTSP server after the RTSP client establishes a connection with the RTSP server;

[0106] A data writing module, used for decoding the received first vehicle camera data and writing it into a shared memory space;

[0107] A data reading module, used for acquiring the camera data of the first vehicle machine from the shared memory space through the Android system of the second vehicle machine;

[0108] The interface module is used to provide a camera interface to the Android application layer, so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface.

[0109] Preferably, the Android application switches the camera to the first vehicle camera or the second vehicle camera by switching the CameraID in the camera interface parameter.

[0110] Preferably, the Android application is a third-party public version camera application module of the second vehicle computer. The third-party public version camera application module calls the camera interface and switches the CameraID in the interface parameters so that the Android system native camera application module obtains the first vehicle computer camera data from the Android hardware abstraction layer service, and passes it to the second vehicle computer third-party public version camera application module to obtain the first vehicle computer camera data.

[0111] Preferably, the Android application is a third-party public camera application module for the second vehicle machine. The third-party public camera application module calls the Android system native Camera2 API, switches the API parameter CameraID to 1, and the Android system native CameraService obtains the front vehicle machine camera data from the Android Camera HAL, and passes it to the second vehicle machine third-party public camera application module to obtain the first vehicle machine camera data and display it.

[0112] Here, the data sharing method between the second vehicle computer and the first vehicle computer is the same as that in the aforementioned implementation mode, and will not be described in detail.

[0113] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A smart cockpit data sharing method, characterized in that: The method comprises: The first vehicle machine starts a background service process to obtain the first vehicle machine camera data and publishes the first vehicle machine camera data as an RTSP server; The second vehicle machine starts a background service process to request the first vehicle machine camera data from the RTSP server as an RTSP client; After the RTSP client is successfully connected to the RTSP server, receiving the first vehicle camera data published by the RTSP server; The RTSP client decodes the received first vehicle camera data and writes the decoded data into a shared memory space; After the Android system of the second vehicle machine obtains the first vehicle machine camera data from the shared memory space, it provides a camera interface to the Android application layer so that the Android application of the second vehicle machine can obtain the first vehicle machine camera data through the camera interface. When the Android application is a third-party public version camera application module of the second vehicle machine, the third-party public version camera application module calls the camera interface and switches the CameraID in the camera interface parameters so that the Android system native camera application module obtains the first vehicle machine camera data from the Android hardware abstraction layer service, and passes it to the third-party public version camera application module of the second vehicle machine to obtain the first vehicle machine camera data.

2. The smart cockpit data sharing method according to claim 1, characterized in that: Before the RTSP server publishes the first vehicle camera data, the following steps are also included: The RTSP server obtains the camera data of the vehicle by calling the Android native Camera2 API, and encodes the camera data of the vehicle in YUV format to generate camera data in H.264 format.

3. The smart cockpit data sharing method according to claim 1, characterized in that: After the Android system of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space, providing a camera interface to the Android application layer specifically includes: The hardware abstraction layer service of the second vehicle machine obtains the camera data of the first vehicle machine from the shared memory space; After the Android system framework layer camera service of the second vehicle machine obtains the first vehicle machine camera data from the hardware abstraction layer service, it provides a camera interface to the Android application layer.

4. The smart cockpit data sharing method according to claim 3, characterized in that: The RTSP client decoding the received first vehicle camera data and writing the data into the shared memory space specifically includes: The RTSP client generates a first driver file node for writing data and simultaneously generates a second driver file node for reading data; The RTSP client writes the decoded first vehicle camera data into the first driver file node by calling a driver interface based on the Android native V4L2 framework API.

5. A second vehicle computer for intelligent cockpit data sharing, characterized in that: The second vehicle computer comprises: A data request module, used to start a background service process to request the first vehicle camera data from the RTSP server as an RTSP client, wherein the first vehicle camera starts the background service process to obtain the first vehicle camera data and publishes the first vehicle camera data as an RTSP server; A receiving module, configured to receive the first vehicle camera data published by the RTSP server after the RTSP client establishes a connection with the RTSP server; A data writing module, used for decoding the received first vehicle camera data and writing it into a shared memory space; A data reading module, used for acquiring the camera data of the first vehicle machine from the shared memory space through the Android system of the second vehicle machine; An interface module is used to provide a camera interface to the Android application layer so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface. When the Android application is a third-party public version camera application module of the second vehicle machine, the third-party public version camera application module calls the camera interface and switches the CameraID in the camera interface parameters so that the native camera application module of the Android system obtains the first vehicle machine camera data from the Android hardware abstraction layer service and passes it to the third-party public version camera application module of the second vehicle machine to obtain the first vehicle machine camera data.

6. The second vehicle computer for intelligent cockpit data sharing according to claim 5, characterized in that: The Android application switches the camera to the first vehicle camera or the second vehicle camera by switching the CameraID in the camera interface parameter.

7. An intelligent cockpit data sharing system, characterized in that: The system comprises: The first vehicle machine and the second vehicle machine, wherein the first vehicle machine starts its own background service process to serve as the first vehicle machine RTSP server and obtains and publishes the camera data of the vehicle machine; The second vehicle machine starts its own background service process to serve as the second vehicle machine RTSP client, and requests the camera data of the first vehicle machine; After the RTSP client is successfully connected to the RTSP server, receiving the first vehicle camera data published by the RTSP server; The RTSP client decodes the received first vehicle camera data and writes the decoded data into a shared memory space; After the Android system of the second vehicle machine obtains the first vehicle machine camera data from the shared memory space, it provides a camera interface to the Android application layer so that the Android application of the second vehicle machine can obtain the first vehicle machine camera data through the camera interface. When the Android application is a third-party public version camera application module of the second vehicle machine, the third-party public version camera application module calls the camera interface and switches the CameraID in the camera interface parameters so that the Android system native camera application module obtains the first vehicle machine camera data from the Android hardware abstraction layer service, and passes it to the third-party public version camera application module of the second vehicle machine to obtain the first vehicle machine camera data.

8. The intelligent cockpit data sharing system according to claim 7, characterized in that: The second vehicle computer comprises: A data request module, used to start a background service process to request the first vehicle camera data from the RTSP server as an RTSP client, wherein the first vehicle camera starts the background service process to obtain the first vehicle camera data and publishes the first vehicle camera data as an RTSP server; A receiving module, configured to receive the first vehicle camera data published by the RTSP server after the RTSP client establishes a connection with the RTSP server; A data writing module, used for decoding the received first vehicle camera data and writing it into a shared memory space; A data reading module, used for acquiring the camera data of the first vehicle machine from the shared memory space through the Android system of the second vehicle machine; The interface module is used to provide a camera interface to the Android application layer, so that the Android application of the second vehicle machine can obtain the camera data of the first vehicle machine through the camera interface.

9. The intelligent cockpit data sharing system according to claim 7 or 8, characterized in that: The Android application is a third-party public camera application module for the second vehicle computer. The third-party public camera application module calls the camera interface and switches the CameraID in the interface parameters so that the Android system native camera application module obtains the first vehicle computer camera data from the Android hardware abstraction layer service and passes it to the second vehicle computer third-party public camera application module to obtain the first vehicle computer camera data.