Search

CN-121478515-B - SOMEIP communication method, vehicle and medium

CN121478515BCN 121478515 BCN121478515 BCN 121478515BCN-121478515-B

Abstract

The application provides a SOMEIP communication method, a vehicle and a medium, which are applied to an android system, wherein the android system comprises a first application process, a SOMEIP daemon process and a system service management binder manager process, and the method comprises the steps that the first application process acquires a remote handle of a first binder of the SOMEIP daemon process from the binder manager process; and SOMEIP the daemon transmits the data to be transmitted of the first application to the second application based on the destination communication endpoint after inquiring the destination communication endpoint in response to the first request. Therefore, the technical problems of communication performance bottleneck and the like of the android system in the prior art can be solved.

Inventors

  • LU ZHE
  • FU CHAOHUI
  • HAN YONG
  • DOU PING

Assignees

  • 浙江吉利控股集团有限公司
  • 吉利汽车研究院(宁波)有限公司

Dates

Publication Date
20260505
Application Date
20260107

Claims (10)

  1. 1. An extensible service-oriented middleware protocol SOMEIP communication method, which is characterized by being applied to an android system, wherein the android system comprises a first application process, a SOMEIP daemon process and a system service management manager process, and the method comprises the following steps: the first application process obtains a remote handle of a first binder of the SOMEIP daemon from the binder manager process, the first binder being determined based on a client identifier of the SOMEIP daemon; The first application process sends a first request to the SOMEIP daemon through a remote handle of the first binder, wherein the first request is used for requesting the SOMEIP daemon to inquire a destination communication endpoint corresponding to data to be sent in the first application; The SOMEIP daemon receives the first request through the local handle of the first binder, and after the destination communication endpoint is queried in response to the first request, the data to be sent of the first application is transmitted to a second application based on the destination communication endpoint.
  2. 2. The method of claim 1, wherein the transmitting the data to be transmitted of the first application to a second application based on the destination communication endpoint comprises: And transmitting the data to be transmitted of the first application to the second application based on the domain communication mode between the first application and the second application and the destination communication endpoint.
  3. 3. The method of claim 2, wherein the domain communication mode is intra-domain communication, the destination communication endpoint is a communication endpoint of a second application process corresponding to the second application, and querying the destination communication endpoint in response to the first request further comprises: The SOMEIP daemon acquires a remote handle of a second binder of the first application process from the binder manager process, and sends a first response to the first application process through the remote handle of the second binder, wherein the first response carries a client identifier of the second application process corresponding to the destination communication endpoint, and the second binder is determined based on the client identifier of the first application process; The transmitting the data to be transmitted of the first application to the second application based on the domain communication mode between the first application and the second application and the destination communication endpoint includes: After the first application process receives the first response through the local handle of the second binder, acquiring a far-end handle of a third binder of the second application process from the binder manager process based on a client identifier of the second application program, and sending a second request to the second application process through the far-end handle of the third binder, wherein the second request is used for requesting to forward data to be sent of the first application to the second application, and the third binder is determined based on the client identifier of the second application process; And after the second application process receives the second request through the local handle of the third binder, responding to the second request and forwarding the data to be sent of the first application to the second application.
  4. 4. A method according to claim 3, characterized in that the method further comprises: The second application process obtains the remote handle of the first binder of the SOMEIP daemon from the binder manager process, and sends a third request to the SOMEIP daemon through the remote handle of the first binder, wherein the third request is used for requesting the SOMEIP daemon to inquire the communication endpoint of the first application process corresponding to response data in the second application; After receiving the third request through the local handle of the first binder, the SOMEIP daemon queries the client identifier of the first application process, obtains the remote handle of the third binder of the second application process from the binder manager process, and sends a third response to the second application process through the remote handle of the third binder, wherein the third response carries the client identifier of the first application process; after the second application process receives the third response through the local handle of the third binder, acquiring a remote handle of a second binder of the first application process from the binder manager process based on a client identifier of the first application process, and sending a fourth request to the first application process through the remote handle of the second binder, wherein the fourth request is used for requesting the first application process to forward response data of the second application to the first application; After the first application process receives the fourth request through the local handle of the second binder, response data of the second application is forwarded to the first application in response to the fourth request.
  5. 5. The method according to claim 2, wherein the domain communication mode is inter-domain communication, the destination communication endpoint is an endpoint that communicates with a domain in which the second application is located, the first request carries data to be sent of the first application, and the transmitting the data to be sent of the first application to the second application based on the domain communication mode between the first application and the second application and the destination communication endpoint includes: The SOMEIP daemon routes data to be sent of the first application to the destination communication endpoint; And the destination communication terminal forwards the data to be sent of the first application to an opposite terminal protocol stack, so that the opposite terminal protocol stack forwards the data to be sent of the first application to the second application again, and the opposite terminal protocol stack is SOMEIP protocol stack adopted by a client where the second application is located.
  6. 6. The method of claim 5, wherein the method further comprises: after receiving the response data of the second application sent by the opposite-end protocol stack, the destination communication endpoint routes the response data of the second application to the SOMEIP daemon; The SOMEIP daemon acquires a remote handle of a second binder of the first application process from the binder manager process, and sends response data of the second application to the first application process through the remote handle of the second binder; And after receiving the response data of the second application through the local handle of the second binder, the first application process forwards the response data of the second application to the first application.
  7. 7. The method according to claim 3 or 4, characterized in that the method further comprises: The SOMEIP daemon creates the first binder based on the client identification of the SOMEIP daemon and registers a remote handle of the first binder into the binder manager process; After the target application process is successfully connected with the SOMEIP daemon, the target application process sends an allocation request to the SOMEIP daemon through a remote handle of the first binder, wherein the allocation request is used for requesting the SOMEIP daemon to allocate a client identifier of the target application process; After receiving the allocation request through the local handle of the first binder, the SOMEIP daemon sends an allocation response to the target application process through the first binder, wherein the allocation response carries a client identifier of the target application process; After the target application process receives the allocation response, determining a target binder of the target application process based on a client identifier of the target application process, and registering a remote handle of the target binder in the binder manager process; Wherein, when the target application process is the first application process, the target binder is the second binder; and/or, when the target application process is the second application process, the target binder is the third binder.
  8. 8. The method of claim 7, wherein before the target application process is successfully connected to the SOMEIP daemon, the method further comprises: The target application process sends a connection request of a remote handle of the first binder to the SOMEIP daemon, wherein the connection request carries a local handle of the first binder; After receiving the connection request, the SOMEIP daemon attempts to establish a connection of the remote handle and the local handle of the first binder to determine whether the target application process and the SOMEIP daemon are successfully connected.
  9. 9. A vehicle, characterized by comprising: A processor; a memory for storing processor-executable instructions, wherein the processor is configured to execute the executable instructions to perform the steps of the method of any one of claims 1-8.
  10. 10. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method of any of claims 1 to 8.

Description

SOMEIP communication method, vehicle and medium Technical Field The application relates to the technical field of automobiles, in particular to SOMEIP communication method, vehicle and medium. Background In the current automotive field, android systems are often used in devices such as multimedia, cockpit instrument controllers, etc. However, there are some problems in the conventional inter-process communication in the android system, for example, performance bottlenecks exist in the Unix domain socket (Unix Domain Socket) communication mode, and particularly when the communication data volume is large, the load of the central processing unit (Central Processing Unit, CPU) is greatly increased, so that the system performance is affected. Therefore, there is a need to propose a better communication scheme based on the android system. Disclosure of Invention In view of the above, the embodiments of the present application are directed to providing a SOMEIP communication method, a vehicle and a medium, which can solve the technical problems of the android system in the prior art, such as a communication performance bottleneck. In a first aspect, the present application provides a SOMEIP communication method applied to an android system, where the android system includes a first application process, a SOMEIP daemon process, and a system service management manager process, the method includes: the first application process obtains a remote handle of a first binder of the SOMEIP daemon from the binder manager process, the first binder being determined based on a client identifier of the SOMEIP daemon; The first application process sends a first request to the SOMEIP daemon through a remote handle of the first binder, wherein the first request is used for requesting the SOMEIP daemon to inquire a destination communication endpoint corresponding to data to be sent in the first application; The SOMEIP daemon receives the first request through the local handle of the first binder, and after the destination communication endpoint is queried in response to the first request, the data to be sent of the first application is transmitted to the second application based on the destination communication endpoint. In some embodiments, the transmitting the data to be transmitted of the first application to the second application based on the destination communication endpoint includes: And transmitting the data to be transmitted of the first application to the second application based on the domain communication mode between the first application and the second application and the destination communication endpoint. In some embodiments, the domain communication manner is intra-domain communication, the destination communication endpoint is a communication endpoint of a second application process corresponding to the second application, and querying the destination communication endpoint in response to the first request further includes: The SOMEIP daemon acquires a remote handle of a second binder of the first application process from the binder manager process, and sends a first response to the first application process through the remote handle of the second binder, wherein the first response carries a client identifier of the second application process corresponding to the destination communication endpoint, and the second binder is determined based on the client identifier of the first application process; The transmitting the data to be transmitted of the first application to the second application based on the domain communication mode between the first application and the second application and the destination communication endpoint includes: After the first application process receives the first response through the local handle of the second binder, acquiring a far-end handle of a third binder of the second application process from the binder manager process based on a client identifier of the second application program, and sending a second request to the second application process through the far-end handle of the third binder, wherein the second request is used for requesting to forward data to be sent of the first application to the second application, and the third binder is determined based on the client identifier of the second application process; And after the second application process receives the second request through the local handle of the third binder, responding to the second request and forwarding the data to be sent of the first application to the second application. In some embodiments, the method further comprises: The second application process obtains the remote handle of the first binder of the SOMEIP daemon from the binder manager process, and sends a third request to the SOMEIP daemon through the remote handle of the first binder, wherein the third request is used for requesting the SOMEIP daemon to inquire the communication endpoint of the first application process corresponding to response