Vehicle cloud communication method and device, electronic equipment and computer storage medium

By treating vehicles as resource owners and using HTTP/Websocket protocols to expose services via APIs, the method simplifies communication and leverages vehicle-side services, addressing complexity and versatility issues in traditional vehicle-cloud communication.

CN119094509AActive Publication Date: 2024-12-06NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411024771.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-12-06
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

Traditional vehicle-cloud communication methods face complexities due to complex protocols like MQTT, poor versatility, and inability to leverage vehicle-side services, leading to high development costs and limited interoperability.

Method used

A vehicle-cloud communication method that treats vehicles as resource owners, using HTTP/Websocket protocols to expose service capabilities via APIs, enabling cloud applications to directly call vehicle services through API requests, and employing tunnel technology for secure communication.

Benefits of technology

Simplifies communication protocols, enhances versatility, and utilizes vehicle-side services effectively, maintaining cloud application development consistency and facilitating vehicle integration into larger systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094509A_ABST
    Figure CN119094509A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle cloud communication method and apparatus, an electronic device and a computer storage medium, in the method, a vehicle is regarded as a resource owner, which is similar to a new idea of a server side, a vehicle side exposes a data interface through protocols such as HTTP / Websocket (that is, a vehicle application service exposes a service capability which can be exposed to the outside through an API form), and the vehicle cloud communication is realized. According to the method, the cloud application or the in-vehicle application is allowed to be called in the form of an API request, servitization of the in-vehicle service to the cloud application is realized, that is, end-to-end servitization is realized, a communication protocol (an API request mode) of vehicle-cloud communication is simpler, the cloud APP can call the target service of the vehicle in the form of the API request, the universality is good, the advantages of the vehicle end servitization are fully utilized, and the method and the system are suitable for popularization and application. And the main position of the vehicle is highlighted, so that the vehicle becomes a participant of a distributed system. According to the service-oriented design, the consistency of cloud application development is kept, and a foundation is laid for integrating the vehicle into a larger system in the future.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of communications, and in particular to a vehicle-cloud communication method, device, electronic device and computer storage medium. Background Art

[0002] The vehicle-cloud communication solution refers to the use of cloud computing, the Internet of Things, the Internet of Vehicles and other technologies to achieve data interaction and service coordination between vehicles and the cloud, vehicles and vehicles, vehicles and roadside facilities, etc., in order to improve the intelligence, safety, efficiency and convenience of vehicles. The vehicle-cloud communication solution is an important part of intelligent connected vehicles and smart transportation, and is also a key technology for achieving high-level autonomous driving.

[0003] The development of vehicle-to-cloud communication solutions has gone through several stages, from the first generation of vehicle-to-cloud communication based on private TCP protocol, to the second generation of vehicle-to-cloud communication based on national standard telemetry protocol, and then to the third generation of vehicle-to-cloud communication based on MQTT IoT protocol. At present, the third generation of vehicle-to-cloud communication solution is the mainstream technology choice, with high reliability, real-time performance, flexibility and compatibility.

[0004] Although the third-generation vehicle-to-cloud communication solution has improved the performance of vehicle-to-cloud communication to a certain extent, there are still some technical defects and shortcomings, mainly in the following aspects:

[0005] Complexity: MQTT is a relatively complex protocol that requires developers to be familiar with its concepts, message publishing / subscription modes, QoS levels, topic structures, etc., as well as to perform operations such as connection management, security configuration, message serialization and parsing, which increases the difficulty and cost of development;

[0006] Non-service-oriented: MQTT regards vehicles as mere IoT devices, ignoring the vehicles’ more powerful computing and storage capabilities, as well as the higher security and privacy requirements they face. The MQTT interface is not service-oriented, and cannot fully utilize the advantages of vehicle-side service-orientedness, nor is it conducive to the consistency and simplicity of cloud application development;

[0007] Customizability: MQTT transmits semantics through payload, especially in the vehicle control scenario. Even though MQTT is standard, the semantics of vehicle control are not in a standard format yet and require customized development and adaptation, which reduces the versatility and interoperability of communication;

[0008] Message serialization and parsing: When using MQTT, developers need to serialize and parse data for transmission and processing between the vehicle and the cloud platform. This involves selecting the appropriate data format and encoding and decoding mechanism, and ensuring the correct parsing and processing of messages;

[0009] Conversion from MQTT to vehicle-side services is required, and this conversion also requires a cooperating component on the vehicle side, such as a vehicle-side vehicle-to-cloud agent, to achieve the conversion from payload to in-vehicle service call on the vehicle side.

[0010] In summary, traditional vehicle-cloud communication methods have technical problems such as complex communication protocols, poor versatility, and inability to take advantage of vehicle-side service. Summary of the invention

[0011] In view of this, the purpose of the present invention is to provide a vehicle-cloud communication method, device, electronic device and computer storage medium to alleviate the technical problems of traditional vehicle-cloud communication methods such as complex communication protocols, poor versatility and inability to utilize the advantages of vehicle-side service.

[0012] In a first aspect, an embodiment of the present invention provides a vehicle-cloud communication method, which is applied to a vehicle-cloud communication tunnel component, wherein the vehicle-cloud communication tunnel component includes: a vehicle gateway agent deployed on a vehicle and a cloud application gateway deployed on a cloud, and the method includes:

[0013] After the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, and then the cloud application gateway performs identity authentication on the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, a communication tunnel between the vehicle gateway agent and the cloud application gateway is established;

[0014] The cloud application gateway obtains an API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel;

[0015] The vehicle gateway agent sends the API request to the vehicle application service, so that the vehicle application service calls the target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent, wherein the vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API;

[0016] The vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and then the cloud application gateway sends the response of the target service to the cloud APP.

[0017] Furthermore, the method further comprises:

[0018] After the vehicle is turned off, the communication tunnel between the vehicle gateway agent and the cloud application gateway is disconnected, and the cloud APP cannot access the services provided by the vehicle.

[0019] Furthermore, the cloud application gateway includes: a plurality of service instances, and the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, including:

[0020] The vehicle gateway agent initiates a tunnel establishment request to the target service instance, and then the target service instance performs identity authentication on the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, a communication tunnel is established between the vehicle gateway agent and the target service instance.

[0021] Furthermore, the vehicle gateway agent includes: a client frpc, the service instance includes: a server frps, and the vehicle gateway agent initiates a tunnel establishment request to the target service instance, including:

[0022] The client frpc initiates a tunnel establishment request to the load balancer, so that the load balancer randomly sends the tunnel establishment request to the server frps of the target service instance of multiple service instances, and then establishes a communication tunnel between the client frpc and the server frps according to the tunnel establishment request, and shares the vehicle's routing information to other service instances of the multiple service instances.

[0023] Furthermore, the cloud application gateway obtains an API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel, including:

[0024] Other service instances of the plurality of service instances obtain an API request initiated by the cloud APP to the vehicle via the load balancer;

[0025] The other service instance determines the client frpc that is not connected to the vehicle according to the vehicle information carried in the API request, and obtains the routing information of the vehicle through query, and then sends a redirection response carrying the routing information to the cloud APP, so that the cloud APP changes the URI of the API request according to the routing information to redirect the target service instance;

[0026] The server frps of the target service instance obtains the redirection API request initiated by the cloud APP to the vehicle via the load balancer, and sends the redirection API request to the client frpc through the communication tunnel.

[0027] Furthermore, after the cloud application gateway obtains the API request initiated by the cloud APP to the vehicle, before sending the API request to the vehicle gateway agent through the communication tunnel, the method further includes:

[0028] The cloud application gateway performs identity authentication and access permission authentication on the API request.

[0029] Furthermore, the tunnel establishment request passes a two-way authentication based on TLS / national encryption.

[0030] In a second aspect, an embodiment of the present invention further provides a vehicle-cloud communication device, which is applied to a vehicle-cloud communication tunnel component, wherein the vehicle-cloud communication tunnel component includes: a vehicle gateway agent deployed on a vehicle and a cloud application gateway deployed on a cloud, and the device includes:

[0031] After the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, and then the cloud application gateway performs identity authentication on the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, a communication tunnel between the vehicle gateway agent and the cloud application gateway is established;

[0032] The cloud application gateway obtains an API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel;

[0033] The vehicle gateway agent sends the API request to the vehicle application service, so that the vehicle application service calls the target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent, wherein the vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API;

[0034] The vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and then the cloud application gateway sends the response of the target service to the cloud APP.

[0035] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0036] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to execute any method described in the first aspect above.

[0037] In an embodiment of the present invention, a vehicle-cloud communication method is provided, which is applied to a vehicle-cloud communication tunnel component, wherein the vehicle-cloud communication tunnel component includes: a vehicle gateway agent deployed on the vehicle and a cloud application gateway deployed on the cloud, and the method includes: after the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, and then the cloud application gateway authenticates the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, establishes a communication tunnel between the vehicle gateway agent and the cloud application gateway; the cloud application gateway obtains an API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel; the vehicle gateway agent sends the API request to the vehicle application service, so that the vehicle application service calls the target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent, wherein the vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API; the vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and then the cloud application gateway sends the response of the target service to the cloud APP. From the above description, it can be seen that in the vehicle-to-cloud communication method of the present invention, the vehicle is regarded as the resource owner, which is similar to the new concept of the service end. The vehicle end exposes the data interface through protocols such as HTTP / Websocket (that is, the vehicle application service will be able to expose the service capabilities to the outside through the form of API), allowing cloud applications or in-vehicle applications to call through the form of API requests, realizing the service-oriented in-vehicle service for cloud applications, that is, end-to-end service. The communication protocol of vehicle-to-cloud communication (API request method) is simpler, and the cloud APP can call the target service of the vehicle through the form of API request, which has good versatility and makes full use of the advantages of vehicle-side service, highlighting the main position of the vehicle and making it a participant in the distributed system. This service-oriented design maintains the consistency of cloud application development, and also lays the foundation for the integration of vehicles into larger systems in the future, alleviating the technical problems of traditional vehicle-to-cloud communication methods such as complex communication protocols, poor versatility, and inability to utilize the advantages of vehicle-side service. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A flow chart of a vehicle-cloud communication method provided by an embodiment of the present invention;

[0040] Figure 2A schematic diagram of the structure of a vehicle-to-cloud communication tunnel component provided in an embodiment of the present invention;

[0041] Figure 3 A schematic diagram of a cloud application gateway provided in an embodiment of the present invention routing an API request for accessing a service of the vehicle to a target service instance of the cloud application gateway;

[0042] Figure 4 A schematic diagram of establishing a communication tunnel between frpc and frps provided in an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of establishing a communication tunnel and sending an API request to a cloud APP to invoke a vehicle service provided by an embodiment of the present invention;

[0044] Figure 6 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] Traditional vehicle-cloud communication methods have technical problems such as complex communication protocols, poor versatility, and inability to take advantage of vehicle-side service.

[0047] Based on this, in the vehicle-cloud communication method of the present invention, the vehicle is regarded as the resource owner, which is similar to the new concept of the service end. The vehicle end exposes the data interface through protocols such as HTTP / Websocket (that is, the vehicle application service will be able to expose the service capabilities to the outside through the form of API), allowing cloud applications or in-vehicle applications to call through API requests, realizing the service-oriented in-vehicle service for cloud applications, that is, end-to-end service. The communication protocol of vehicle-cloud communication (API request method) is simpler, and the cloud APP can call the target service of the vehicle through the form of API request, which has good versatility and makes full use of the advantages of vehicle-side service, highlighting the main position of the vehicle and making it a participant in the distributed system. This service-oriented design maintains the consistency of cloud application development and lays the foundation for the integration of vehicles into larger systems in the future.

[0048] To facilitate understanding of this embodiment, a vehicle-to-cloud communication method disclosed in an embodiment of the present invention is first introduced in detail.

[0049] Embodiment 1:

[0050] According to an embodiment of the present invention, an embodiment of a vehicle-cloud communication method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0051] Figure 1 is a flow chart of a vehicle-cloud communication method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0052] Step S102: After the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, and then the cloud application gateway performs identity authentication on the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway;

[0053] In an embodiment of the present invention, the vehicle-cloud communication method can be applied to a vehicle-cloud communication tunnel component, which includes: a vehicle gateway agent deployed on the vehicle and a cloud application gateway deployed on the cloud. The specific structure is as follows: Figure 2 As shown, after the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway. The tunnel establishment request passes the two-way authentication based on TLS / national encryption to ensure the security of the server connected to the vehicle (i.e., the cloud application gateway). Then, the cloud application gateway authenticates the information of the vehicle gateway agent carried in the tunnel establishment request, and after the authentication is passed, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway.

[0054] Step S104, the cloud application gateway obtains the API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel;

[0055] Specifically, after the communication tunnel is established, all API requests initiated by cloud APP to the vehicle will be sent to the vehicle gateway agent through the communication tunnel by the cloud application gateway "seamlessly".

[0056] Step S106, the vehicle gateway proxy sends the API request to the vehicle application service, so that the vehicle application service calls the target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway proxy, wherein the vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API;

[0057] Specifically, the vehicle gateway proxy will forward the API request to the vehicle application service of the vehicle. Then, the vehicle application service will call the target service of the vehicle according to the API request and send the response of the target service to the vehicle gateway proxy.

[0058] The above-mentioned vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API, but this exposure does not allow the vehicle application service to directly expose the service port (i.e., API) to the public network, but rather exposes it to the public network through the cloud application gateway through the communication tunnel between the vehicle gateway proxy and the cloud application gateway. In this way, the cloud application can directly call the vehicle's target service through the communication tunnel in the form of an API request. The vehicle application service will convert the API request into a call to the vehicle's atomic service to implement the call to the vehicle's service. The vehicle application service is originally available in the vehicle, that is, it comes with the vehicle itself. In the traditional solution, the vehicle application is used to call the vehicle's services through the vehicle application service. In the present invention, a vehicle gateway proxy and a cloud application gateway are added, so that the cloud application can also call the vehicle's services.

[0059] In step S108 , the vehicle gateway proxy sends the response of the target service to the cloud application gateway through the communication tunnel, and then the cloud application gateway sends the response of the target service to the cloud APP.

[0060] Specifically, the response packet of the API request (i.e., the response of the target service) will be returned to the client that initiated the API request (usually the cloud app) through the communication tunnel of the vehicle gateway proxy → cloud application gateway.

[0061] It should be noted that the above-mentioned vehicle gateway agent, cloud application gateway and vehicle application service are all software components.

[0062] In an embodiment of the present invention, a vehicle-cloud communication method is provided, which is applied to a vehicle-cloud communication tunnel component, wherein the vehicle-cloud communication tunnel component includes: a vehicle gateway agent deployed on the vehicle and a cloud application gateway deployed on the cloud, and the method includes: after the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, and then the cloud application gateway authenticates the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, establishes a communication tunnel between the vehicle gateway agent and the cloud application gateway; the cloud application gateway obtains an API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel; the vehicle gateway agent sends the API request to the vehicle application service, so that the vehicle application service calls the target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent, wherein the vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API; the vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and then the cloud application gateway sends the response of the target service to the cloud APP. From the above description, it can be seen that in the vehicle-to-cloud communication method of the present invention, the vehicle is regarded as the resource owner, which is similar to the new concept of the service end. The vehicle end exposes the data interface through protocols such as HTTP / Websocket (that is, the vehicle application service will be able to expose the service capabilities to the outside through the form of API), allowing cloud applications or in-vehicle applications to call through the form of API requests, realizing the service-oriented in-vehicle service for cloud applications, that is, end-to-end service. The communication protocol of vehicle-to-cloud communication (API request method) is simpler, and the cloud APP can call the target service of the vehicle through the form of API request, which has good versatility and makes full use of the advantages of vehicle-side service, highlighting the main position of the vehicle and making it a participant in the distributed system. This service-oriented design maintains the consistency of cloud application development, and also lays the foundation for the integration of vehicles into larger systems in the future, alleviating the technical problems of traditional vehicle-to-cloud communication methods such as complex communication protocols, poor versatility, and inability to utilize the advantages of vehicle-side service.

[0063] The above content briefly introduces the vehicle-to-cloud communication method of the present invention. The specific contents involved therein are described in detail below.

[0064] In an optional embodiment of the present invention, the method further comprises the following steps:

[0065] After the vehicle is turned off, the communication tunnel between the vehicle gateway agent and the cloud application gateway is disconnected, and the cloud APP cannot access the services provided by the vehicle.

[0066] In an optional embodiment of the present invention, the cloud application gateway includes: multiple service instances, and the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, including:

[0067] The vehicle gateway agent initiates a tunnel establishment request to the target service instance, and the target service instance then authenticates the vehicle gateway agent information carried in the tunnel establishment request, and after the authentication is passed, establishes a communication tunnel between the vehicle gateway agent and the target service instance.

[0068] Specifically, the vehicle gateway proxy is a distributed system that contains multiple service instances. After establishing a communication tunnel, the vehicle gateway proxy will establish a connection with a service instance of the cloud application gateway (i.e., the target service instance). This requires the cloud application gateway to route the API request for accessing the vehicle's service to the target service instance of the cloud application gateway, such as Figure 3 shown.

[0069] In an optional embodiment of the present invention, after the cloud application gateway obtains the API request initiated by the cloud APP to the vehicle, before sending the API request to the vehicle gateway agent through the communication tunnel, the method further includes:

[0070] The cloud application gateway performs identity authentication and access permission authentication on API requests.

[0071] Specifically, the cloud application gateway supports the identity authentication and authorization of cloud APP (i.e. cloud application). Because the vehicle exposes the service port to the public network through the communication tunnel between the vehicle and the cloud application gateway, the cloud application gateway is responsible for the security of the vehicle's services. Therefore, for all API requests (through API calls) from the client (i.e. cloud APP), the cloud application gateway must perform strict identity authentication and access rights authentication.

[0072] In an optional embodiment of the present invention, the vehicle gateway agent includes: a client frpc, the service instance includes: a server frps, and the vehicle gateway agent initiates a tunnel establishment request to the target service instance, including:

[0073] The client frpc initiates a tunnel establishment request to the load balancer, so that the load balancer randomly sends the tunnel establishment request to the server frps of the target service instance of multiple service instances, and then establishes a communication tunnel between the client frpc and the server frps according to the tunnel establishment request, and shares the vehicle's routing information to other service instances of the multiple service instances.

[0074] Specifically, the present invention uses frp technology to establish a communication tunnel. frp is divided into client frpc and server frps. Figure 4The process of establishing a communication tunnel between the client frpc and the server frps is shown in Figure 1, where only one target service instance is shown. frpc acts as the vehicle gateway proxy in the solution, deployed and resident on the vehicle. After the vehicle is started, it connects to the target service instance of the cloud application gateway implemented based on frps (the target service instance includes not only the server frps, but also pipes, receivers and routers, which actually establishes a connection between the client frpc and the server frps). Once the connection is established, a port (i.e. the port on the right side of the receiver and router) corresponding to the port of a vehicle's service will be exposed on the cloud application gateway for cloud APP to call.

[0075] frp cannot fully meet our requirements. We cannot directly map the service ports of the vehicle one by one on the cloud application gateway. Figure 4 In the example, the service ports of three vehicles are mapped. If the number of vehicles continues to increase, the ports of the cloud application gateway cannot meet the requirements of a large number of vehicles indefinitely. Because the port resources of the cloud application gateway are limited, it is necessary to reuse the ports (referring to the ports on the right side of the receiver and router). Secondary development can be carried out based on frp to meet our personalized design.

[0076] In an optional embodiment of the present invention, the cloud application gateway obtains the API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel, specifically including the following steps:

[0077] (1) Other service instances of the multiple service instances obtain the API request initiated by the cloud APP to the vehicle via the load balancer;

[0078] (2) Other service instances determine the client frpc that is not connected to the vehicle based on the vehicle information carried in the API request, and query the vehicle's routing information, and then send a redirection response carrying the routing information to the cloud APP, so that the cloud APP changes the URI of the API request to redirect to the target service instance based on the routing information;

[0079] (3) The server frps of the target service instance obtains the redirection API request initiated by the cloud APP to the vehicle via the load balancer, and sends the redirection API request to the client frpc through the communication tunnel.

[0080] Specifically, Figure 5 As shown, multiple service instances (i.e., service instance clusters) are shown, and the process of establishing a communication tunnel and a cloud APP sending an API request to call a vehicle service is shown.

[0081] First, the frpc of the vehicle gateway agent initiates a tunnel establishment request. The load balancer randomly selects a service instance (i.e., the target service instance) for the tunnel establishment request. After selecting the first target service instance, the first target service instance synchronizes the vehicle's routing information to other service instances, telling them that the current vehicle is on this first target service instance, and the connection establishment process is completed.

[0082] When the cloud app sends an API request, the load balancer will randomly assign the API request to a service instance. For example, Figure 5 When the API request is sent to the middle service instance, the middle service instance finds that there is no connection to the vehicle corresponding to the API request, but the middle service instance knows which service instance has the connection to the above vehicle, and then feeds back to the cloud APP. The cloud APP will re-establish a redirection API request based on the domain name and route it directly to the corresponding correct target service instance. The redirection API request will be processed by the target service instance and then forwarded to the vehicle.

[0083] Here is the key points of the above process again:

[0084] On the vehicle side, since the traffic of each vehicle is not much different, a LB (load balancer) with a RR strategy (round robin) can be used to dispatch different vehicles to different service instances. When a vehicle is connected to a target service instance, the routing information of the vehicle is shared by all service instances.

[0085] However, for cloud APPs, since the API request of the cloud APP needs to be routed to the target service instance connected to the corresponding vehicle (i.e., the API request), this task can be completed through http redirection. When a cloud APP initiates an API request, the load balancer will balance it to an intermediate service instance for the first time. If there is no corresponding vehicle connection on the intermediate service instance, the intermediate service instance will query the route and return a redirection response, allowing the cloud APP to redirect to the target service instance where the corresponding vehicle is located. The method to achieve this redirection is to change the URI of the API request (and pass the vincode (vehicle representation) as a query parameter), and for the new URI, the load balancer will route it to the expected service instance (i.e., the target service instance).

[0086] The vehicle-to-cloud communication method of the present invention is compared with the traditional vehicle-to-cloud communication method below:

[0087] Vehicle role positioning:

[0088] Traditional approach: Vehicles are usually viewed as ordinary IoT devices that can only passively receive instructions or transmit data.

[0089] New approach: The vehicle is considered as a resource owner, similar to the concept of a service end, with the ability to proactively provide various services.

[0090] Communication method:

[0091] Traditional method: usually uses dedicated communication protocols, such as MQTT, to communicate with dedicated vehicle communication platforms.

[0092] New approach: Use widely supported common protocols such as HTTP and Websocket to communicate directly with services inside the vehicle.

[0093] Service provision method:

[0094] Traditional approach: Vehicles can usually only provide fixed, predefined services, which are difficult to develop and deploy, and have limited service scalability.

[0095] New approach: Vehicles can dynamically expose various services through APIs, which has higher flexibility and scalability, and can add, modify or delete services at any time according to needs.

[0096] Security:

[0097] Traditional method: There may be some security risks in communication and data transmission, and additional security measures are required to protect data security.

[0098] New method: Use common encryption protocols and identity authentication mechanisms to ensure the security of communication and data transmission and reduce security risks.

[0099] Development and maintenance costs:

[0100] Traditional method: Developers need to be familiar with dedicated communication protocols and platforms, which makes development and deployment more complicated and the maintenance cost higher.

[0101] New approach: Using widely supported common protocols and standard tools simplifies the development and deployment process and reduces maintenance costs.

[0102] The method of the present invention has the following main points:

[0103] Vehicles are considered resource owners: Traditional vehicle-to-cloud communication solutions usually consider vehicles as ordinary IoT devices, while the solution of the present invention considers vehicles as resource owners, similar to the concept of a service end. This innovation enables vehicles to actively provide various services, rather than just passively receiving instructions or transmitting data, thus providing greater space for vehicle intelligence and autonomy.

[0104] Use of HTTP / Websocket protocol: Compared with traditional vehicle communication solutions based on dedicated protocols such as MQTT, the use of general protocols such as HTTP / Websocket simplifies the development process and maintenance costs. It uses widely supported standard protocols, lowers the development threshold, and improves development efficiency.

[0105] Application of tunnel technology: By using tunnel technology, the vehicle's API interface is exposed to the public Internet, realizing two-way communication between the vehicle and the cloud. This solves the problem that the cloud cannot actively establish a connection with the vehicle in traditional vehicle communication solutions, and provides vehicles with more service capabilities and connectivity.

[0106] Service-oriented design: API services on the vehicle side are provided in a service-oriented form, so that cloud applications or in-vehicle applications can directly call these services, realizing end-to-end service-oriented communication. This innovation makes the service capabilities of the vehicle side more flexible and scalable, and provides more possibilities for data interaction and service collaboration between the vehicle and the cloud.

[0107] Embodiment 2:

[0108] An embodiment of the present invention also provides a vehicle-cloud communication device, which is mainly used to execute the vehicle-cloud communication method provided in the first embodiment of the present invention. The vehicle-cloud communication device provided in the embodiment of the present invention is specifically introduced below.

[0109] The vehicle-cloud communication device is applied to a vehicle-cloud communication tunnel component, wherein the vehicle-cloud communication tunnel component includes: a vehicle gateway agent deployed on the vehicle and a cloud application gateway deployed on the cloud. The device includes:

[0110] After the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, and then the cloud application gateway authenticates the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway;

[0111] The cloud application gateway obtains the API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway proxy through the communication tunnel;

[0112] The vehicle gateway proxy sends the API request to the vehicle application service, so that the vehicle application service calls the target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway proxy, wherein the vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API;

[0113] The vehicle gateway proxy sends the target service's response to the cloud application gateway through the communication tunnel, and the cloud application gateway then sends the target service's response to the cloud APP.

[0114] In an embodiment of the present invention, a vehicle-cloud communication device is provided, which is applied to a vehicle-cloud communication tunnel component, wherein the vehicle-cloud communication tunnel component includes: a vehicle gateway agent deployed on the vehicle and a cloud application gateway deployed on the cloud, and the device includes: after the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, and then the cloud application gateway authenticates the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, establishes a communication tunnel between the vehicle gateway agent and the cloud application gateway; the cloud application gateway obtains an API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel; the vehicle gateway agent sends the API request to the vehicle application service, so that the vehicle application service calls the target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent, wherein the vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API; the vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and then the cloud application gateway sends the response of the target service to the cloud APP. From the above description, it can be seen that in the vehicle-to-cloud communication device of the present invention, the vehicle is regarded as the resource owner, which is similar to the new concept of the service end. The vehicle end exposes the data interface through protocols such as HTTP / Websocket (that is, the vehicle application service will be able to expose the service capabilities to the outside through the form of API), allowing cloud applications or in-vehicle applications to call through the form of API requests, realizing the service-oriented in-vehicle service for cloud applications, that is, end-to-end service. The communication protocol of vehicle-to-cloud communication (API request method) is simpler, and the cloud APP can call the target service of the vehicle through the form of API request, which has good versatility and makes full use of the advantages of vehicle-side service, highlighting the main position of the vehicle and making it a participant in the distributed system. This service-oriented design maintains the consistency of cloud application development, and also lays the foundation for the integration of vehicles into larger systems in the future, alleviating the technical problems of traditional vehicle-to-cloud communication methods such as complex communication protocols, poor versatility, and inability to utilize the advantages of vehicle-side service.

[0115] Optionally, after the vehicle is turned off, the communication tunnel between the vehicle gateway agent and the cloud application gateway is disconnected, and the cloud APP cannot access the services provided by the vehicle.

[0116] Optionally, the cloud application gateway includes: multiple service instances, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, including: the vehicle gateway agent initiates a tunnel establishment request to the target service instance, and then the target service instance authenticates the information of the vehicle gateway agent carried in the tunnel establishment request, and after the authentication is passed, establishes a communication tunnel between the vehicle gateway agent and the target service instance.

[0117] Optionally, the vehicle gateway agent includes: a client frpc, and the service instance includes: a server frps. The vehicle gateway agent initiates a tunnel establishment request to the target service instance, including: the client frpc initiates a tunnel establishment request to the load balancer, so that the load balancer randomly sends the tunnel establishment request to the server frps of the target service instance of multiple service instances, and then establishes a communication tunnel between the client frpc and the server frps according to the tunnel establishment request, and shares the vehicle's routing information to other service instances of the multiple service instances.

[0118] Optionally, the cloud application gateway obtains the API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel, including: other service instances of multiple service instances obtain the API request initiated by the cloud APP to the vehicle via the load balancer; other service instances determine their client frpc that is not connected to the vehicle based on the vehicle information carried in the API request, and query the routing information of the vehicle, and then send the redirection response carrying the routing information to the cloud APP, so that the cloud APP changes the URI of the API request according to the routing information to redirect the target service instance; the server-side frps of the target service instance obtains the redirection API request initiated by the cloud APP to the vehicle via the load balancer, and sends the redirection API request to the client frpc through the communication tunnel.

[0119] Optionally, after the cloud application gateway obtains the API request initiated by the cloud APP to the vehicle, before sending the API request to the vehicle gateway agent through the communication tunnel, the method also includes: the cloud application gateway performs identity authentication and access permission authentication on the API request.

[0120] Optionally, the tunnel establishment request passes through TLS / national encryption-based two-way authentication.

[0121] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0122] like Figure 6As shown, an electronic device 600 provided in an embodiment of the present application includes: a processor 601, a memory 602 and a bus, wherein the memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 through the bus, and the processor 601 executes the machine-readable instructions to perform the steps of the above-mentioned vehicle-cloud communication method.

[0123] Specifically, the above-mentioned memory 602 and processor 601 can be general-purpose memory and processor, which are not specifically limited here. When the processor 601 runs the computer program stored in the memory 602, the above-mentioned vehicle-cloud communication method can be executed.

[0124] The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 601. The above processor 601 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.

[0125] Corresponding to the above-mentioned vehicle-cloud communication method, an embodiment of the present application also provides a computer-readable storage medium, which stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the steps of the above-mentioned vehicle-cloud communication method.

[0126] The vehicle-cloud communication device provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in the embodiment of the present application are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference can be made to the corresponding contents in the aforementioned method embodiment. Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0127] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0128] For another example, the flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0130] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0131] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or partly contribute to the prior art or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the vehicle marking method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0132] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0133] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solution of the present application, rather than to limit it. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solution recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiment of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A vehicle-cloud communication method, characterized in that: Applied to a vehicle-cloud communication tunnel component, wherein the vehicle-cloud communication tunnel component includes: a vehicle gateway agent deployed on a vehicle and a cloud application gateway deployed on a cloud, and the method includes: After the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, and then the cloud application gateway performs identity authentication on the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, a communication tunnel between the vehicle gateway agent and the cloud application gateway is established; The cloud application gateway obtains an API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel; The vehicle gateway agent sends the API request to the vehicle application service, so that the vehicle application service calls the target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent, wherein the vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API; The vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and then the cloud application gateway sends the response of the target service to the cloud APP.

2. The method according to claim 1, characterized in that The method further comprises: After the vehicle is turned off, the communication tunnel between the vehicle gateway agent and the cloud application gateway is disconnected, and the cloud APP cannot access the services provided by the vehicle.

3. The method according to claim 1, characterized in that The cloud application gateway includes: a plurality of service instances, and the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, including: The vehicle gateway agent initiates a tunnel establishment request to the target service instance, and then the target service instance performs identity authentication on the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, a communication tunnel is established between the vehicle gateway agent and the target service instance.

4. The method according to claim 3, characterized in that The vehicle gateway agent includes: a client frpc, the service instance includes: a server frps, and the vehicle gateway agent initiates a tunnel establishment request to the target service instance, including: The client frpc initiates a tunnel establishment request to the load balancer, so that the load balancer randomly sends the tunnel establishment request to the server frps of the target service instance of multiple service instances, and then establishes a communication tunnel between the client frpc and the server frps according to the tunnel establishment request, and shares the vehicle's routing information to other service instances of the multiple service instances.

5. The method according to claim 4, characterized in that The cloud application gateway obtains an API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel, including: Other service instances of the plurality of service instances obtain an API request initiated by the cloud APP to the vehicle via the load balancer; The other service instance determines the client frpc that is not connected to the vehicle according to the vehicle information carried in the API request, and obtains the routing information of the vehicle through query, and then sends a redirection response carrying the routing information to the cloud APP, so that the cloud APP changes the URI of the API request according to the routing information to redirect the target service instance; The server frps of the target service instance obtains the redirection API request initiated by the cloud APP to the vehicle via the load balancer, and sends the redirection API request to the client frpc through the communication tunnel.

6. The method according to claim 1, characterized in that After the cloud application gateway obtains the API request initiated by the cloud APP to the vehicle, before sending the API request to the vehicle gateway agent through the communication tunnel, the method further includes: The cloud application gateway performs identity authentication and access permission authentication on the API request.

7. The method according to claim 1, characterized in that The tunnel establishment request is bidirectionally authenticated based on TLS / national encryption.

8. A vehicle-cloud communication device, characterized in that: Applied to a vehicle-cloud communication tunnel component, wherein the vehicle-cloud communication tunnel component includes: a vehicle gateway agent deployed on the vehicle and a cloud application gateway deployed on the cloud, and the device includes: After the vehicle is started, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, and then the cloud application gateway performs identity authentication on the information of the vehicle gateway agent carried in the tunnel establishment request, and after the identity authentication is passed, a communication tunnel between the vehicle gateway agent and the cloud application gateway is established; The cloud application gateway obtains an API request initiated by the cloud APP to the vehicle, and sends the API request to the vehicle gateway agent through the communication tunnel; The vehicle gateway agent sends the API request to the vehicle application service, so that the vehicle application service calls the target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent, wherein the vehicle application service is used to expose the service capabilities that can be exposed to the outside in the form of an API; The vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and then the cloud application gateway sends the response of the target service to the cloud APP.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Extending mobile-to-vehicle apis to the cloud

    CN110071954A

  • Cloud-side collaborative distributed API gateway system and API calling method

    CN114584558A

  • Load balancing method, device and system and storage medium

    CN114726863A

  • Communication method, device, equipment and medium

    CN115988086A

  • Vehicle remote diagnosis and debugging method and system

    CN117826760A