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

By treating vehicles as resource owners and employing HTTP/Websocket protocols and communication tunneling technology, end-to-end service provision for vehicle services is achieved, solving the complexity and universality issues of traditional vehicle-cloud communication methods and enhancing the vehicle's dominant position and service capabilities in the distributed system.

CN119094509BActive Publication Date: 2026-07-10NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD
Filing Date
2024-07-29
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional vehicle-to-cloud communication methods suffer from problems such as complex communication protocols, poor universality, and inability to leverage the advantages of vehicle-side service-oriented architecture.

Method used

Treating vehicles as resource owners and exposing data interfaces using protocols such as HTTP/Websocket, a communication tunnel is established between the vehicle gateway proxy and the cloud application gateway, allowing cloud applications or in-vehicle applications to call vehicle services via API requests, thus achieving end-to-end service provisioning.

Benefits of technology

It simplifies communication protocols, improves universality and flexibility, fully leverages the advantages of vehicle-side service-oriented architecture, maintains consistency in cloud application development, and lays the foundation for vehicles to integrate into larger systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094509B_ABST
    Figure CN119094509B_ABST
Patent Text Reader

Abstract

This invention provides a vehicle-to-cloud communication method, device, electronic device, and computer storage medium. In this method, the vehicle is treated as the resource owner, similar to a server-side concept. The vehicle exposes data interfaces via protocols such as HTTP / WebSocket (i.e., vehicle application services expose their external service capabilities through APIs), allowing cloud applications or in-vehicle applications to call these services via API requests. This achieves service-oriented architecture for in-vehicle services to cloud applications, i.e., end-to-end service-oriented architecture. The vehicle-to-cloud communication protocol (API request method) is simpler; cloud apps can call target services from the vehicle via API requests, offering good versatility and fully leveraging the advantages of vehicle-side service-oriented architecture. It highlights the vehicle's central role, making it a participant in the distributed system. This service-oriented design maintains consistency in cloud application development and lays the foundation for future integration of vehicles into larger systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a vehicle-to-cloud communication method, apparatus, electronic device, and computer storage medium. Background Technology

[0002] Vehicle-to-cloud (V2X) communication solutions utilize technologies such as cloud computing, the Internet of Things (IoT), and vehicle-to-everything (V2X) to enable data interaction and service collaboration between vehicles and the cloud, between vehicles themselves, and between vehicles and roadside infrastructure. This aims to improve the intelligence, safety, efficiency, and convenience of vehicles. V2X communication solutions are an important component of intelligent connected vehicles and smart transportation, and a key technology for achieving high-level autonomous driving.

[0003] The development of vehicle-to-cloud (V2X) communication solutions has gone through several stages, from the first generation based on the proprietary TCP protocol, to the second generation based on the national standard telemetry protocol, and then to the third generation based on the MQTT IoT protocol. Currently, the third-generation V2X communication solution is the mainstream technology choice, offering 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 some extent, it still has 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 publish / subscribe patterns, 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 treats vehicles merely as IoT devices, ignoring their greater computing and storage capabilities, as well as their higher security and privacy requirements. MQTT's interface is not service-oriented, failing to fully leverage the advantages of in-vehicle service-oriented architecture and hindering consistency and simplicity in cloud application development.

[0007] Customization: MQTT transmits semantics through the payload, especially in vehicle control scenarios. Even though MQTT is a standard, the semantics for vehicle control are not currently in a standard format, requiring customized development and adaptation, which reduces the universality and interoperability of communication.

[0008] Message serialization and parsing: When using MQTT, developers need to serialize and parse data for transmission and processing between vehicles and cloud platforms. This involves selecting appropriate data formats and encoding / decoding mechanisms, and ensuring correct message parsing and processing.

[0009] This requires a conversion from MQTT to vehicle-side services, and this conversion also requires a cooperating component on the vehicle side, such as a vehicle-side cloud proxy, to realize the conversion from payload to in-vehicle service calls on the vehicle side.

[0010] In summary, traditional vehicle-to-cloud communication methods suffer from technical problems such as complex communication protocols, poor universality, and inability to leverage the advantages of vehicle-side service-oriented architecture. Summary of the Invention

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

[0012] In a first aspect, embodiments of the present invention provide a vehicle-to-cloud communication method applied to a vehicle-to-cloud communication tunnel component, wherein the vehicle-to-cloud communication tunnel component includes: a vehicle gateway proxy deployed on a vehicle and a cloud application gateway deployed in the cloud, and the method includes:

[0013] After the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway. Then, the cloud application gateway authenticates the vehicle gateway agent's information carried in the tunnel establishment request. After successful authentication, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway.

[0014] 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;

[0015] 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. The vehicle application service is used to expose service capabilities that can be exposed to the outside through the form of 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 also includes:

[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 is unable to access the services provided by the vehicle.

[0019] Furthermore, the cloud application gateway includes: multiple service instances, and the vehicle gateway proxy 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. The target service instance then authenticates the vehicle gateway agent's information carried in the tunnel establishment request. After successful authentication, a communication tunnel is established between the vehicle gateway agent and the target service instance.

[0021] Furthermore, the vehicle gateway proxy includes a client frpc, the service instance includes a server frps, and the vehicle gateway proxy 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 with other service instances of multiple service instances.

[0023] Furthermore, 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, including:

[0024] Other service instances of the multiple service instances obtain the API requests initiated by the cloud APP to the vehicle through the load balancer;

[0025] The 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 routing information of the vehicle. Then, they send 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 and redirects the target service instance.

[0026] The server-side frps of the target service instance obtains the redirect API request initiated by the cloud APP to the vehicle via the load balancer, and sends the redirect 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 proxy through the communication tunnel, the method further includes:

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

[0029] Furthermore, the tunnel establishment request is made through two-way authentication based on TLS / national cryptography.

[0030] Secondly, embodiments of the present invention also provide a vehicle-to-cloud communication device applied to a vehicle-to-cloud communication tunnel component, wherein the vehicle-to-cloud communication tunnel component includes: a vehicle gateway proxy deployed on a vehicle and a cloud application gateway deployed in the cloud, and the device includes:

[0031] After the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway. Then, the cloud application gateway authenticates the vehicle gateway agent's information carried in the tunnel establishment request. After successful authentication, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway.

[0032] 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;

[0033] 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. The vehicle application service is used to expose service capabilities that can be exposed to the outside through the form of 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] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the first aspects above.

[0036] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method described in any of the first aspects above.

[0037] In this embodiment of the invention, a vehicle-to-cloud communication method is provided, applied to a vehicle-to-cloud communication tunnel component. The vehicle-to-cloud communication tunnel component includes a vehicle gateway agent deployed on a vehicle and a cloud application gateway deployed in the cloud. The method includes: after the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway; the cloud application gateway then authenticates the vehicle gateway agent's information carried in the tunnel establishment request; after successful authentication, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway; the cloud application gateway obtains an API request initiated by a cloud-based 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 a vehicle application service, enabling the vehicle application service to invoke a target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent; the vehicle application service exposes service capabilities that can be exposed to the outside world via API; the vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and the cloud application gateway then sends the response of the target service to the cloud app. As described above, the vehicle-to-cloud communication method of this invention treats the vehicle as the resource owner, similar to a new server-side concept. The vehicle exposes data interfaces via protocols such as HTTP / WebSocket (i.e., vehicle application services expose their external service capabilities via APIs), allowing cloud applications or in-vehicle applications to call these services via API requests. This achieves service-oriented architecture for in-vehicle services to cloud applications, i.e., end-to-end service-oriented architecture. The communication protocol (API request method) of vehicle-to-cloud communication is simpler, and cloud apps can call the vehicle's target services via API requests. It has good versatility, fully utilizes the advantages of vehicle-side service-oriented architecture, highlights the vehicle's dominant position, and makes it a participant in the distributed system. This service-oriented design maintains the consistency of cloud application development and lays the foundation for the future integration of vehicles into larger systems, 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-oriented architecture. Attached Figure Description

[0038] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0039] Figure 1 A flowchart of a vehicle-to-cloud communication method provided in an embodiment of the present invention;

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

[0041] Figure 3 This is a schematic diagram illustrating how a cloud application gateway, as provided in an embodiment of the present invention, routes API requests for accessing services of the vehicle to a target service instance of the cloud application gateway.

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

[0043] Figure 5 This is a schematic diagram illustrating the establishment of a communication tunnel and the sending of an API request by a cloud-based APP to invoke vehicle services, as provided in an embodiment of the present invention.

[0044] Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0045] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] Traditional vehicle-to-cloud communication methods suffer from technical problems such as complex communication protocols, poor universality, and inability to leverage the advantages of vehicle-side service-oriented architecture.

[0047] Based on this, the vehicle-to-cloud communication method of this invention treats the vehicle as the resource owner, similar to a new server-side concept. The vehicle exposes data interfaces through protocols such as HTTP / WebSocket (i.e., vehicle application services expose their external service capabilities via APIs), allowing cloud applications or in-vehicle applications to call these services via API requests. This achieves service-oriented architecture for in-vehicle services to cloud applications, i.e., end-to-end service-oriented architecture. The communication protocol (API request method) of vehicle-to-cloud communication is simpler, and cloud apps can call the vehicle's target services through API requests. It has good versatility, fully utilizes the advantages of vehicle-side service-oriented architecture, highlights the vehicle's dominant position, and makes it a participant in the distributed system. This service-oriented design maintains consistency in cloud application development and lays the foundation for the future integration of vehicles into larger systems.

[0048] To facilitate understanding of this embodiment, a vehicle-to-cloud communication method disclosed in this embodiment of the invention will first be described in detail.

[0049] Example 1:

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

[0051] Figure 1 This is a flowchart of a vehicle-to-cloud communication method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0052] Step S102: After the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway. Then, the cloud application gateway authenticates the vehicle gateway agent's information carried in the tunnel establishment request. After the authentication is successful, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway.

[0053] In this embodiment of the invention, the vehicle-to-cloud communication method can be applied to a vehicle-to-cloud communication tunnel component, which includes: a vehicle gateway agent deployed on the vehicle and a cloud application gateway deployed in the cloud, with the specific structure as follows: Figure 2 As shown, after the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway. This tunnel establishment request uses two-way authentication based on TLS / national cryptography to ensure the security of the server (i.e., the cloud application gateway) connected to the vehicle. Then, the cloud application gateway authenticates the vehicle gateway agent's information carried in the tunnel establishment request. After successful authentication, 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 apps to the vehicle will be seamlessly transmitted from the cloud application gateway to the vehicle gateway agent through the communication tunnel.

[0056] Step S106: The vehicle gateway proxy sends an 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. The vehicle application service is used to expose service capabilities that can be exposed to the outside through the form of API.

[0057] Specifically, the vehicle gateway agent forwards the API request to the vehicle's application service. Then, the vehicle application service calls the vehicle's target service based on the API request and sends the target service's response to the vehicle gateway agent.

[0058] The aforementioned vehicle application service exposes service capabilities that can be made public via APIs. However, this exposure does not involve directly exposing the service port (i.e., the API) to the public network. Instead, it exposes the API to the public network through a communication tunnel between the vehicle gateway proxy and the cloud application gateway. This allows cloud applications to directly call the vehicle's target services via the communication tunnel using API requests. The vehicle application service translates API requests into calls to the vehicle's atomic services, thus enabling the invocation of vehicle services. This vehicle application service is inherent to the vehicle; it is built into the vehicle itself. Traditional solutions use this vehicle application service to call other vehicle services. In this invention, a vehicle gateway proxy and a cloud application gateway are added, enabling cloud applications to also call vehicle services.

[0059] In step S108, 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.

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

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

[0062] In this embodiment of the invention, a vehicle-to-cloud communication method is provided, applied to a vehicle-to-cloud communication tunnel component. The vehicle-to-cloud communication tunnel component includes a vehicle gateway agent deployed on a vehicle and a cloud application gateway deployed in the cloud. The method includes: after the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway; the cloud application gateway then authenticates the vehicle gateway agent's information carried in the tunnel establishment request; after successful authentication, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway; the cloud application gateway obtains an API request initiated by a cloud-based 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 a vehicle application service, enabling the vehicle application service to invoke a target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent; the vehicle application service exposes service capabilities that can be exposed to the outside world via API; the vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and the cloud application gateway then sends the response of the target service to the cloud app. As described above, the vehicle-to-cloud communication method of this invention treats the vehicle as the resource owner, similar to a new server-side concept. The vehicle exposes data interfaces via protocols such as HTTP / WebSocket (i.e., vehicle application services expose their external service capabilities via APIs), allowing cloud applications or in-vehicle applications to call these services via API requests. This achieves service-oriented architecture for in-vehicle services to cloud applications, i.e., end-to-end service-oriented architecture. The communication protocol (API request method) of vehicle-to-cloud communication is simpler, and cloud apps can call the vehicle's target services via API requests. It has good versatility, fully utilizes the advantages of vehicle-side service-oriented architecture, highlights the vehicle's dominant position, and makes it a participant in the distributed system. This service-oriented design maintains the consistency of cloud application development and lays the foundation for the future integration of vehicles into larger systems, 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-oriented architecture.

[0063] The above provides a brief overview of the vehicle-to-cloud communication method of the present invention. The specific details involved will be described in detail below.

[0064] In an optional embodiment of the present invention, the method further includes 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. The target service instance then authenticates the vehicle gateway agent's identity using the information carried in the tunnel establishment request. After successful authentication, a communication tunnel is established between the vehicle gateway agent and the target service instance.

[0068] Specifically, the vehicle gateway proxy is a distributed system containing multiple service instances. After establishing a communication tunnel, the vehicle gateway proxy establishes a connection with a specific service instance (i.e., the target service instance) of the cloud application gateway. This requires the cloud application gateway to route API requests for services accessing the vehicle to the target service instance of the cloud application gateway, such as... Figure 3 As 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, and 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 authorization for API requests.

[0071] Specifically, the cloud application gateway supports identity authentication and authorization for cloud-based apps (i.e., cloud applications). Because vehicles expose their service ports 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 (via API calls) from clients (i.e., cloud apps), the cloud application gateway must perform strict identity authentication and access permission authorization.

[0072] In an optional embodiment of the present invention, the vehicle gateway proxy includes a client frpc, and the service instance includes a server frps. The vehicle gateway proxy 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. Then, according to the tunnel establishment request, a communication tunnel is established between the client frpc and the server frps, and the vehicle routing information is shared with other service instances of multiple service instances.

[0074] Specifically, this invention uses frp technology to establish a communication tunnel. frp consists of a client frpc and a server frps. Figure 4The diagram illustrates the process of establishing a communication tunnel between the client frpc and the server frps, showing only one target service instance. The frpc acts as the vehicle gateway proxy in the solution, deployed and residing on the vehicle. After the vehicle starts, 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; in effect, the client frpc establishes a connection with the server frps). Once the connection is established, the cloud application gateway exposes a port (i.e., the port on the right side of the receiver and router) corresponding to the port of a specific vehicle service for the cloud application to access.

[0075] frp cannot fully meet our requirements; we cannot directly map the service ports of vehicles one by one on the cloud application gateway. Figure 4 The code maps ports for services of three vehicles. However, if the number of vehicles continues to increase, the cloud application gateway's ports cannot infinitely meet the demands of a large number of vehicles because the cloud application gateway's port resources are limited. Therefore, port reuse (referring to the ports on the receiver and the right side of the router) is necessary. We can perform secondary development based on frp to meet our customized design needs.

[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 proxy through a communication tunnel, specifically including the following steps:

[0077] (1) Other service instances of multiple service instances obtain API requests initiated by the cloud APP to the vehicle through the load balancer.

[0078] (2) Other service instances determine the client frpc of the unconnected vehicle based on the vehicle information carried in the API request, and query the vehicle's routing information. Then, they send the redirection response carrying the routing information to the cloud APP so that the cloud APP can change the URI of the API request and redirect the target service instance according to the routing information.

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

[0080] Specifically, such as Figure 5 As shown, multiple service instances (i.e., a service instance cluster) are illustrated, along with the process of establishing a communication tunnel and the cloud-based app sending API requests to invoke the vehicle's services.

[0081] First, the vehicle gateway agent's frpc 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 will synchronize the vehicle's routing information to other service instances, informing them that the current vehicle is on this first target service instance, and the connection establishment process ends.

[0082] When a cloud-based app sends an API request, the load balancer will randomly assign the API request to a service instance. For example, when assigned to... Figure 5 When the intermediate service instance is on the server, it finds that there is no connection to the vehicle corresponding to the API request. However, the intermediate service instance knows which service instance has the connection to the vehicle. It then reports this to the cloud APP. The cloud APP will re-establish the redirect API request based on the domain name and directly route it to the correct target service instance. The redirect API request will then be processed by the target service instance and forwarded to the vehicle.

[0083] To reiterate the key points of the above process:

[0084] On the vehicle side, since the traffic of each vehicle is not significantly different, a load balancer (LB) using a round-robin strategy can be used to schedule different vehicles to different service instances. Once a vehicle connects to a target service instance, its routing information is shared by all service instances.

[0085] However, for cloud-based apps, since the API requests from cloud-based apps need to be routed to the target service instance of the corresponding vehicle connection, this can be accomplished through HTTP redirection. When a cloud-based app initiates an API request, the load balancer initially distributes it to an intermediate service instance. If the intermediate service instance does not have a connection to the corresponding vehicle, it will query the routing table and return a redirection response, directing the cloud-based app to the target service instance where the corresponding vehicle resides. This redirection is achieved by changing the URI of the API request (passing the vincode (the vehicle's representation) as a query parameter). 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 will be compared with the traditional vehicle-to-cloud communication method below:

[0087] Vehicle role positioning:

[0088] Traditional approach: Vehicles are usually treated as ordinary Internet of Things (IoT) devices that can only passively receive instructions or transmit data.

[0089] The new approach treats vehicles as resource owners, similar to the concept of a server, 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 a dedicated vehicle communication platform.

[0092] The new approach: uses widely supported common protocols, such as HTTP and WebSocket, to communicate directly with services inside the vehicle.

[0093] Service delivery 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 via APIs, offering greater flexibility and scalability, allowing services to be added, modified, or deleted at any time as needed.

[0096] Security:

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

[0098] The new approach employs universal encryption protocols and authentication mechanisms to ensure the security of communication and data transmission, thereby reducing security risks.

[0099] Development and maintenance costs:

[0100] Traditional approach: Developers need to be familiar with dedicated communication protocols and platforms, making development and deployment more complex and maintenance costs higher.

[0101] The new approach simplifies the development and deployment process and reduces maintenance costs by using widely supported common protocols and standard tools.

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

[0103] Vehicles are viewed as resource owners: Traditional vehicle-to-cloud communication solutions typically treat vehicles as ordinary IoT devices, while the solution of this invention treats vehicles as resource owners, similar to the concept of a server. This innovation enables vehicles to proactively provide various services, rather than simply passively receiving instructions or transmitting data, thus providing greater scope for vehicle intelligence and autonomy.

[0104] The use of HTTP / WebSocket protocols: Compared to traditional vehicle communication solutions based on proprietary protocols such as MQTT, using common protocols like HTTP / WebSocket simplifies the development process and reduces maintenance costs. Utilizing widely supported standard protocols lowers the development threshold and improves development efficiency.

[0105] Application of tunneling technology: By using tunneling technology to expose the vehicle's API interface to the public internet, bidirectional communication between the vehicle and the cloud is achieved. This solves the problem in traditional vehicle communication solutions where the cloud cannot actively establish a connection with the vehicle, providing the vehicle with more service capabilities and connectivity.

[0106] Service-oriented design: The vehicle's API services are provided in a service-oriented manner, allowing cloud applications or in-vehicle applications to directly call these services, realizing end-to-end service-oriented communication. This innovation makes the vehicle's service capabilities more flexible and scalable, providing more possibilities for data interaction and service collaboration between the vehicle and the cloud.

[0107] Example 2:

[0108] This invention also provides a vehicle-to-cloud communication device, which is mainly used to execute the vehicle-to-cloud communication method provided in Embodiment 1 of this invention. The following is a detailed description of the vehicle-to-cloud communication device provided in this invention.

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

[0110] After the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway. The cloud application gateway then authenticates the vehicle gateway agent's identity based on the information carried in the tunnel establishment request. After successful authentication, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway.

[0111] The cloud application gateway obtains API requests initiated by the cloud-based app to the vehicle and sends the API requests to the vehicle gateway agent through the communication tunnel;

[0112] The vehicle gateway proxy sends API requests to the vehicle application service, so that the vehicle application service can 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. The vehicle application service is used to expose service capabilities that can be exposed to the outside through the form of API.

[0113] 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.

[0114] In this embodiment of the invention, a vehicle-to-cloud communication device is provided, applied to a vehicle-to-cloud communication tunnel component. The vehicle-to-cloud communication tunnel component includes: a vehicle gateway agent deployed on a vehicle and a cloud application gateway deployed in the cloud. The device includes: after the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway; the cloud application gateway then authenticates the vehicle gateway agent's information carried in the tunnel establishment request; after successful authentication, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway; the cloud application gateway obtains an API request initiated by a cloud-based 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 a vehicle application service, enabling the vehicle application service to invoke a target service of the vehicle according to the API request, and sends the response of the target service to the vehicle gateway agent; the vehicle application service exposes service capabilities that can be exposed to the outside world via API; the vehicle gateway agent sends the response of the target service to the cloud application gateway through the communication tunnel, and the cloud application gateway then sends the response of the target service to the cloud app. As described above, the vehicle-to-cloud communication device of this invention treats the vehicle as the resource owner, similar to a new server-side concept. The vehicle exposes data interfaces via protocols such as HTTP / WebSocket (i.e., vehicle application services expose their external service capabilities through APIs), allowing cloud applications or in-vehicle applications to call these services via API requests. This achieves service-oriented architecture for in-vehicle services to cloud applications, i.e., end-to-end service-oriented architecture. The communication protocol (API request method) of vehicle-to-cloud communication is simpler, and cloud apps can call the vehicle's target services through API requests. It has good versatility, fully utilizes the advantages of vehicle-side service-oriented architecture, highlights the vehicle's dominant position, and makes it a participant in the distributed system. This service-oriented design maintains the consistency of cloud application development and lays the foundation for the future integration of vehicles into larger systems, 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-oriented architecture.

[0115] Optionally, after the vehicle is turned off, the communication tunnel between the vehicle gateway agent and the cloud application gateway is disconnected, thus preventing the cloud app from accessing the services provided by the vehicle.

[0116] Optionally, the cloud application gateway includes: multiple 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 authenticates the vehicle gateway agent's information carried in the tunnel establishment request, and after successful authentication, 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 initiating 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 with other service instances of 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 proxy through the communication tunnel. This includes: other service instances of multiple service instances obtaining the API request initiated by the cloud APP to the vehicle through the load balancer; other service instances determining the client frpc of the unconnected vehicle based on the vehicle information carried in the API request, querying the vehicle's routing information, and then sending 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 and redirects the target service instance; the server frps of the target service instance obtaining the redirection API request initiated by the cloud APP to the vehicle through the load balancer and sending 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 further includes: the cloud application gateway performing identity authentication and access permission authorization on the API request.

[0120] Optionally, the tunnel establishment request is made through two-way authentication based on TLS / national cryptography.

[0121] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0122] like Figure 6As shown in the embodiment of this application, an electronic device 600 includes a processor 601, a memory 602, and a bus. 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 via the bus, and the processor 601 executes the machine-readable instructions to perform the steps of the vehicle-to-cloud communication method described above.

[0123] Specifically, the memory 602 and processor 601 mentioned above can be general-purpose memory and processor, without any specific limitations. When the processor 601 runs the computer program stored in the memory 602, it can execute the above-mentioned vehicle-to-cloud communication method.

[0124] The processor 601 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 601 or by instructions in software form. The processor 601 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may 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 gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 602, and processor 601 reads the information from memory 602 and, in conjunction with its hardware, completes the steps of the above method.

[0125] Corresponding to the above vehicle-to-cloud communication method, this application embodiment also provides a computer-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to perform the steps of the above vehicle-to-cloud communication method.

[0126] The vehicle-to-cloud communication device provided in this application embodiment can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.

[0127] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0128] For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

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

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

[0131] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the vehicle marking method described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0132] It should be noted that similar labels and letters in the following figures indicate similar items. 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 used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0133] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A vehicle-to-cloud communication method, characterized in that, An application is provided for a vehicle-to-cloud communication tunnel component, wherein the vehicle-to-cloud communication tunnel component includes: a vehicle gateway proxy deployed on a vehicle and a cloud application gateway deployed in the cloud, and the method includes: After the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway. The cloud application gateway then authenticates the vehicle gateway agent's information carried in the tunnel establishment request. After successful authentication, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway. The tunnel establishment request is based on TLS / national cryptographic bidirectional authentication. 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; 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. The vehicle application service is used to expose service capabilities that can be exposed to the outside through API, so that the cloud APP can directly call the target service of the vehicle through API request. 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; The cloud application gateway includes multiple service instances, and the vehicle gateway proxy 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. The target service instance then authenticates the vehicle gateway agent's information carried in the tunnel establishment request. After successful authentication, a communication tunnel is established between the vehicle gateway agent and the target service instance. The vehicle gateway proxy includes a client frpc, and the service instance includes a server frps. The vehicle gateway proxy 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 with other service instances of multiple service instances. The cloud application gateway obtains API requests initiated by the cloud-based app to the vehicle and sends the API requests to the vehicle gateway proxy through the communication tunnel, including: Other service instances of the multiple service instances obtain the API requests initiated by the cloud APP to the vehicle through the load balancer; The 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 routing information of the vehicle. Then, they send 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 and redirects the target service instance. The server-side frps of the target service instance obtains the redirect API request initiated by the cloud APP to the vehicle via the load balancer, and sends the redirect API request to the client frpc through the communication tunnel.

2. The method according to claim 1, characterized in that, The method further includes: 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 is unable to access the services provided by the vehicle.

3. 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, and before sending the API request to the vehicle gateway proxy through the communication tunnel, the method further includes: The cloud application gateway performs identity authentication and access permission authorization on the API requests.

4. The method according to claim 1, characterized in that, The tunnel establishment request is made through two-way authentication based on TLS / national cryptography.

5. A vehicle-to-cloud communication device, characterized in that, An application is provided for a vehicle-to-cloud communication tunnel component, wherein the vehicle-to-cloud communication tunnel component includes: a vehicle gateway agent deployed on a vehicle and a cloud application gateway deployed in the cloud, the device comprising: After the vehicle starts, the vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway. The cloud application gateway then authenticates the vehicle gateway agent's information carried in the tunnel establishment request. After successful authentication, a communication tunnel is established between the vehicle gateway agent and the cloud application gateway. The tunnel establishment request is based on TLS / national cryptographic bidirectional authentication. 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; 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. The vehicle application service is used to expose service capabilities that can be exposed to the outside through API, so that the cloud APP can directly call the target service of the vehicle through API request. 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; The cloud application gateway includes multiple service instances. The vehicle gateway agent initiates a tunnel establishment request to the cloud application gateway, which includes: the vehicle gateway agent initiates a tunnel establishment request to the target service instance, and then the target service instance authenticates the vehicle gateway agent's information carried in the tunnel establishment request. After the authentication is successful, a communication tunnel is established between the vehicle gateway agent and the target service instance. The vehicle gateway proxy includes a client frpc, and the service instance includes a server frps. The vehicle gateway proxy initiates a tunnel establishment request to the target service instance, including: the client frpc initiating 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 multiple service instances. 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. This includes: other service instances of the multiple service instances obtaining the API request initiated by the cloud APP to the vehicle via the load balancer; the other service instances determining the client frpc that is not connected to the vehicle based on the vehicle information carried in the API request, querying the routing information of the vehicle, and then sending 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 and redirects to the target service instance; the server frps of the target service instance obtaining the redirection API request initiated by the cloud APP to the vehicle via the load balancer and sending the redirection API request to the client frpc through the communication tunnel.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method according to any one of claims 1 to 4.